Jump to content
We've recently updated our Privacy Statement, available here ×

ghudson_1

Members
  • Posts

    284
  • Joined

  • Last visited

  • Days Won

    3

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by ghudson_1

  1. Issue DescriptionA customer tries to access their JasperReports Server from behind a proxy or loadbalancer and find this error in their logs: 2016-09-15 11:41:11,534 ERROR CsrfGuard,http-nio-8080-exec-6:44 - potential cross-site request forgery (CSRF) attack thwarted (user:, ip:192.168.150.15, method:POST, uri:/jasperserver-pro/rest_v2/reports/organizations/8001/Reports/uic_s_month_adm/inputControls/, error:required token is missing from the request) ResolutionThe CsrfGuard is protecting from Cross Site Request Forgery - https://www.owasp.org/index.php/Cross-Site_Request_Forgery (CSRF) The message "required token is missing from the request" indicates that our application is expecting a token which isn't present in the http headers forwarded from the proxy or loadbalancer. The token we expect is defined in jasperserver-proWEB-INFcsrfjrs.csrfguard.properties, org.owasp.csrfguard.TokenName=OWASP_CSRFTOKEN In 5.6.x the value was JASPER_CSRF_TOKEN, but in 6.3.x it is OWASP_CSRFTOKEN . Your network engineers should evaluate the headers and ensure the correct token is being passed Ref. Case 00071217
  2. Issue DescriptionA customer put their JasperReports Server appserver behind a loadbalancer or proxy and encountered the following error in the logs and login page would just loop back to itself upon submission: 2016-09-09 15:26:58,020 ERROR CsrfGuard,http-nio-8080-exec-4:44 - Referer domain https://oursite.com/jasperserver-pro/login.html does not match request domain: http://192.168.150.23:8080/jasperserver-pro/JavaScriptServlet ResolutionThe message means that the CSRFGuard is doing it's work to try and be protective. In this case the http request is coming from 192.168.150.23, but the browser url being used is oursite.com, so this looks like CSRF (Cross Site Request Forgery). There are three options: configure your proxy / IIS to pass correct headers See the first answer at http://stackoverflow.com/questions/22483397/csrfguard-behind-a-reverse-proxy set org.owasp.csrfguard.JavascriptServlet.refererMatchDomain=false in jasperserver-proWEB-INFcsrfjrs.csrfguard.properties . Doing so might compromise the security a bit. set org.owasp.csrfguard.JavascriptServlet.refererPattern = .* , in the same file, documented below: For reference: https://www.owasp.org/index.php/Cross-Site_Request_Forgery (CSRF) Ref. Case 00071217
  3. Could be this, eh? https://bugs.openjdk.java.net/browse/JDK-8140601 for grins & giggles i'd try installing and using a different JDK on the client.
  4. Via Font Extensions you can add entire font Family for use. Font Extensions are discussed in the Studio Guide. This will make the entire set available for use in the report. iText API is called when the PDF is actually created. Do you see something in iText regarding your issue with how the font is actually being embedded? Can you provide more info?
  5. Sounds like you are already familiar with passing attributes into a domain, but if not, and you had a way of setting attributes dynamically you could pass them into a derived table: http://community.jaspersoft.com/wiki/using-attributes-domains-derived-table Attributes can be set via REST api... so theoretically some third party app could post new values into a user's profile dynamically.
  6. You cannot parameterize derived tables directly in JRS 6.3.0 or prior. In some future version they hope to have the ability to reference parameters in derived tables. Have you considered creating Ad Hoc Views from topics that are domain based? Using Studio, you create a new jrxml report with queries against your domain, and these queries within Studio can be parameterized (via typical jrxml parameters). And of course you define the fields. Then publish this report to the JRS topics folder, then create your Ad Hoc View from this topic.
  7. Issue DescriptionIn 6.1.x you can parameterize a derived table of a domain via 6.x attributes defined within user profile, tenant or server-wide level ResolutionFollowing is a sequence for passing an attribute from a user's profile into a derived table. Derived tables basically insert their query "inline" into the greater sql query generated by the domain semantic layer of code in JasperReports Server: 1. Created a user attribute named myCity, value Raleigh. Per the guide, the syntax for accessing this value would be {attribute('myCity','User')} 2. Created derived table with a query containing your attribute syntax: select * from orders where shipcity != '{attribute('myCity','User')}' Note the single-quotes due to postgres syntax. Add the shipcountry field and any other fields derived table to the display tab of the domain and save. 3. Create a new Ad Hoc View from the domain, include the derived table and drag the shipcountry field into the pane. The action results in this query seen via the Ad Hoc View Query or cache: select "shipcountry"from (select * from orders where shipcity != 'Raleigh') "query"group by "shipcountry"order by "shipcountry" limit 1000 For management of attributes see the Administrator Guide.
  8. Issue DescriptionA customer had a report containing fusion elements, like a map component. When they try to export the report to excel they get a blank grey box in place of any map output with the message [Flash component not Supported] . ResolutionExcel and other Microsoft products don't support flash which is output by fusion components. You can make PhantomJS the renderer for all Fusion components (charts, widgets, maps), meaning instead of Flash being output an image/svg will be output. In the JasperReports Server Administration guide see section "Configuring a JavaScript Engine for Graphical Report Rendering" with sub-section "To configure JasperReports Server to use PhantomJS for Pro Charts (Fusion)", edit the following properties: Per that documentation, if you are using windows, you can just download phantomJS and add the following to /WEB-INF/classes/jasperreports.properties: com.jaspersoft.jasperreports.fusion.phantomjs.executable.path=C:\phantomjs2\bin\phantomjs.exe Ref. Case 00068897
  9. Issue DescriptionA customer's passwords to their database changed and they were using config file encryption described in the install guide's section "Encrypting passwords configuration" (these steps are located in the Security Guide in newer versions of JRS). The guide's steps for "Encrypting passwords configuration" involve running js-install.bat/sh, but this will cause a full drop and redeploy of the JasperReports Server WAR / webapp. A customer needed to regenerate new files with the new password, but didn't want to drop the webpp / WAR ResolutionA shortcut to avoid the full redeployment of the JasperReports Server webapp is to just run "js-ant refresh-config" from command-line instead of "js-install". Then you can manually copy the files which have the encrypted passwords, like buildomaticbuild_confdefaultwebappMETA-INFcontext.xml , over to the deployed webapp within your appserver. Ref. Case 00070670
  10. Issue Description [toc on_off::hide=1]Scheduler output typically has a filename which contains a hyphen. A pattern like MM-dd-yyyy results in a filename like Postcall_report-07-26-2016, but a customer would like to remove the hyphen so that the output is like Postcall_reportMM-dd-yyyy ResolutionWithin the downloadable source code there is a customization that can be made. In class 6.1srcJasperReports-Server-6.1.0-srcjasperserverjasperserver-api-implenginesrcmainjavacomjaspersoftjasperserverapiengineschedulingquartzReportExecutionJob.java there is a getBaseFileName() which makes use of a static variable, below which can be modified to another character or an empty string : public static final String REPOSITORY_FILENAME_SEQUENCE_SEPARATOR = "-"; This class was found mostly with find-in-files tools, searching within the deployed WAR as well as the source-code, using display labels from the UI, the .properties containing the display labels, the .jsp or .htm files containing input name values, and the .java files containing references to this input name value. Ref. Case 00070262
  11. Issue Description [toc on_off::hide=1]A customer wants the help URL in TIBCO JasperReports® Server pages link to a report created within JasperReports Server. ResolutionThe help URL can be configured within webappsjasperserver-proWEB-INFapplicationContext-webHelp.xml There are three main properties within the xml file above: hostURL This is the host and port, even potential context path to be dynamically created in the help URL.pagePrefix This is the sole page (.html , .jsp, etc) which is added to the host. If this is left blank, it won't be included.helpContextMap These values are added to then end of the url, based upon 'helpContext' predifined in pages, and it is here by default to act in conjunction with a # sign to form an web hyperlink anchor. If these are left blank, they'll not be included.Something like the following is one way to have the help link throughtout the JasperReports Server route to one specific page within JasperReports Server. The syntax is tricky, be especially careful with the ampersands. Plain '&' will cause an xml parsing error during startup. Here each value in the helpContextMap should be left blank : <property name="hostURL" value="http://localhost:8080/jasperserver-pro"/> <property name="pagePrefix" value="/flow.html?_flowId=viewReportFlow&amp;_flowId=viewReportFlow&amp;reportUnit=%2Forganizations%2Forganization_1%2Fadhoc%2Ftopics%2FAllAccounts"/> <property name="helpContextMap"> <map> <entry key="default" value=""/> etcetera. Ref. Case 00070221
  12. Issue DescriptionDuring the installation process of jasperreports-server-5.1-windows-x64-installer.exe on a Windows Server OS, a customer saw an error 'error running vcredistg_x64'. After clicking the 'ok' button the installation seemed to complete. The log ended with the line 'Installation completed' , but there was script error in the middle of other normal log output, like: [09:19:21] Initializing database Executing vcredist_x64.exe /q Script exit code: 3010 Script output: Script stderr: Program ended with an error exit code Error running vcredist_x64.exe /q : Program ended with an error exit code ResolutionResearch shows the exit code of 3010 means that a restart is required before newly installed software can be used (found on Microsoft's MSDN). Essentially the vcredist ( "Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)") is indicating to the OS that cannot be used until a reboot is performed. After the reboot the customer no longer experienced the errors. Ref. Case 00070014
  13. Since 4.5, Jasper Reports Server has built-in security validation which uses regex to prohibit things like delete statements within SQL queries (other sql injection): http://community.jaspersoft.com/wiki/jaspersoft-security-changes-and-configuration Of course this is JRS, not the development tools like Studio.
  14. Issue DescriptionA customer's dual-axis chart is showing values that are not in their desired range of scale. For example they have values ranging between 0 and 60 on the Y axis, but due to Highcharts default calculations it is beginning the low starting point for the range at -20. Often the Highcharts property 'yAxis.min' will help limit or define the range, but a trick is required when you have a dual-axis chart ResolutionyAxis.min, added thru Advanced Properties will only impact the first axis. To impact the second axis, directly in the jrxml source, add an additional chartSetting element for the secondary axis using the following property to designate which axis you are referring to: <hc:chartProperty name="_jrAxisIndex"> <hc:propertyExpression><![CDATA[1]]></hc:propertyExpression></p> See the attached .jrxml which runs against Studio's "sample DB" as an example. For reference on the HighCharts yAxis.min property see: http://api.highcharts.com/highcharts#yAxis.min Ref. Case 00069569 minforsecondaxis.jrxml
  15. Issue DescriptionIn previous versions a .jsp could simply be modified to hide or modify the output options, like PDF, ODT, etc on the "Create Schedule" page. In 6.2.1 these .jsp have been removed due an architectural change, so a different approach is required. ResolutionBackground:To make the scheduling pages even more browser-driven or client-side driven, we stuck the output options into a javascript based model in which there is a ".htm" is just a template that the .js files write-out at runtime. Pertinent Info:To improve performance for the UI as a whole, we've designed an optimize process which combines templates and necessary .js files into a single .js file used for specific actions. So when running the webapp in optimized mode we're requesting fewer individual files and the total size of the files requested is smaller. In this case outputTabTemplate.htm, SchedulerController.js and several other .js files get combined by the optimization process. Steps:For the sake of testing, you can edit webappsjasperserver-proscriptsbower_componentsjrs-uisrcschedulertemplateeditoroutputTabTemplate.htm and ensure &_opt=false is added to the url (or disable optimization in js.config.properties). For example your edit can be the removal of PDF by commenting out the entire leaf: <!-- Customization Greg Hudson June 22 2016 to hide PDF as an export/output option on the schedule creation pages<li class="leaf"><div class="control checkBox"><label class="wrap" for="scheduler_box_1" title="{{- i18n["report.output.pdf.label.tooltip"] }}">{{- i18n["report.output.pdf.label"] }}</label><input id="scheduler_box_1" name="outputFormats" value="PDF" type="checkbox"></div></li>end customization --> To finalize your change so that is used while the session/webapp is in optimized mode you can edit webappsjasperserver-proscriptsbower_componentsjrs-uisrcschedulertemplateeditoroutputTabTemplate.htm then go thru the optimization process listed in the JasperReports Server Ultimate Guide (6.x here ) . Between tests, remember to clear browser cache to get the lastest .js files. Ref. Case 00069381
  16. Issue DescriptionWhen viewing a dashboard in JasperReports Server, a customer selected the export icon to export to PDF,PNG, etc and received the error: "Dashboard renderer not found or failed to start. Please contact your system administrator" ResolutionThis is typically caused by misconfiguration surrounding phantom.js , logfiles will confirm. Per the User Guide, to export a dashboard the export button must be enabled via Dashboard Properties and PhantomJS has been installed the application server host and configured. PhantomJS can be installed from http://phantomjs.org/ . For exporting to dashboard your WEB-INFljs.config.properties must contain a valid path for entry "phantomjs.binary", like: phantomjs.binary=C:\tools_apps\phantomjs2\bin\phantomjs.exe OR phantomjs.binary=/usr/bin/phantomjs Restart after making updates to .properties files, then test again. Full information on installing and configuring phantomjs is discussed in the Administration Guide: http://community.jaspersoft.com/documentation/tibco-jasperreports-server-administration-guide/v62/configuring-jasperreports-librar-0#Configuring_a_JavaScript_Engine Ref. Case 00069613
  17. post your jasperserver.log to help rule out wiether or not the problem is your setup of phantom.js
  18. The layers of JRS performing image related actions are all java, so I suspect you'll have problems with .wmf files which are windows-OS oriented. https://en.wikipedia.org/wiki/Windows_Metafile To use them, you'll need to convert that image to SVG, or hyperlink to them instead of embedding them in the actual report.
  19. Issue DescriptionA customer encountered the following error when running reports which contained bar code elements. A different customer encountered the same error during import/export actions from the UI. In the former case the customer was using Weblogic 12.1.3as their appserver , in the latter the appserver was Tomcat 8. Caused by: java.lang.VerifyError: (class: org/castor/xml/XMLConfiguration, method: newInstance signature: ()Lorg/castor/core/util/Configuration;) Incompatible argument to function Interestingly, not all Weblogic 12.1.3 or Tomcat 8 customers have met this issue. This is probably due to the complexities of class loading performed by the JVM and appservers. ResolutionRemove castor-1.2.jar from the WEB-INFlib directory of your appserver, restart the webapp. This file was inadvertently left in the build, but unnoticed since classloading is probably often picking up the correct replace jars which are already in place Ref. Case 00068480
  20. Issue DescriptionAn exception occurs when trying to use Sybase SQL Anywhere 16 with Jaspersoft Studio: java.lang.UnsatisfiedLinkError: Native Library C:Program FilesSQL Anywhere 16Bin64dbjdbc16.dll already loaded in another classloader at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1904) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at sybase.jdbc4.sqlanywhere.IDriver.try_load(IDriver.java:485) at sybase.jdbc4.sqlanywhere.IDriver.(IDriver.java:423) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:156) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:145) ... ResolutionThe customer was trying to use the Sybase driver which was a Type 2 jdbc driver. Type 2 jdbc drivers don't connect directly to a db server, they go thru layers of proprietary db vendor-specific code first, like .dlls on a windows machine. In contrast, Type 4 jdbc drivers make a db connection directly via sockets to the server. Studio classloading seems to have problems with these types of older drivers which connect via native files like .dlls. There is a workaround, similar to answer #2 here - http://stackoverflow.com/questions/10637585/native-library-sqljdbc-auth-dll-already-loaded-in-another-classloader 1) Copy sajdbc4.jar from the Sybase Java folder ("SQL Anywhere 16Java") to "Program FilesTIBCOJaspersoft Studio-6.2.0.finalfeaturesjre.win32.win32.x86_64.feature_1.8.0.u74jrelibext" 2) Copy the DLLs from the Sybase bin folder ("SQL Anywhere 16Bin64") to "Program FilesTIBCOJaspersoft Studio-6.2.0.finalfeaturesjre.win32.win32.x86_64.feature_1.8.0.u74" Ref. Case 00067659
  21. Issue DescriptionA customer is embedding reports via visualize.js. While navigating between pages of the reports we are getting loading message for reports with slower responding pages (they're large and query intensive). They prefer not to see this loading message. ResolutionTo avoid the "loading" overlay, use "loadingOverlay: false," , like: report = v.report({ resource: reportName, //to have no overlay at all, set to false loadingOverlay: false, container: "#reportContainer", Ref. Case 00064113
  22. Issue DescriptionA customer needed to install JasperReports Server on a machine with no external network connections, a host only adapter that does not allow multi-cast traffic. This caused JRS to fail on startup with error: 2015-11-13 02:51:15,637 ERROR MulticastRMICacheManagerPeerProvider,localhost-startStop-1:98 - Error starting heartbeat. Error was: No such device java.net.SocketException: No such device ResolutionOur Ehcache related files have a configuration like this: <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"properties="peerDiscovery=automatic,multicastGroupAddress=228.0.0.1,multicastGroupPort=4446,timeToLive=1"/> This configuration is used to broadcast messages in clustered environment and it is assigning 228.0.0.1 as the multicast address. If you cannot "ping 228.0.0.1", which you can't if no network connection, then try setting peerDiscovery to manual instead of automatic, like: peerDiscovery=manual,multicas... This needs to be done in four files within WEB-INF: engine-ehcache.xml, olap-ehcache.xml, ehcache.xml, and ehcache_hibernate.xml. Ref. Case 00064684
  23. Is this pdf's font okay when the report is executed within iReport or Studio? If so, then use "font extensions", to ensure you are bundling up the ttfs appropriately and getting them into the runtime classpath appropriately.
  24. what is the expression of the textfield you are trying to use? Based on your screenshots, it looks almost like the expression is just the following... like no method of the scriptlet is being called: <textFieldExpression><![CDATA[$P{TestTW_Scriptlet}]]></textFieldExpression>
×
×
  • Create New...