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

bshrikan

Members
  • Posts

    10
  • Joined

  • Last visited

bshrikan's Achievements

Apprentice

Apprentice (3/14)

  • Dedicated Rare
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. When generating a report URL using REST APIs from the backend, you may encounter issues with the URL when using multi-valued parameters. The report URL is often broken into different parts on the square bracket parts, and resulting URL won't work. In this article, we will explain the issue and provide a solution to resolve it. Issue: The issue occurs when the report URL is generated with square brackets, i.e., [,], for multi-valued parameters. As a result, the URL is broken into different parts, and the resulting URL doesn't work. Solution: To resolve the issue, you need to add the relaxedQueryChars attribute under the Connector tag in the server.xml file (%TOMCAT_HOME%/conf). The relaxedQueryChars attribute must include the square brackets, [,], to allow for the processing of the request. Example Configuration: <Connector port="applicable-Port" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000" redirectPort="applicable-Port" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml" relaxedQueryChars="[,]" /> If your application requires additional special characters that are not supported by Tomcat by default, you can add those characters to the relaxedQueryChars attribute as well, separated by a comma. After making the changes, follow these steps: Stop the Tomcat serverClear the ./tomcat/temp/ and ./tomcat/work/ directoriesRestart the serverTest the report again.
  2. Issue: Customer reported an issue, while testing existing server connection in the Jaspersoft Studio they got 404 error with error stack trace like below: faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (401) faultActor: faultNode: faultDetail: {}:return code: 401<!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Bad credentials</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/9.0.34</h3></body></html> {http://xml.apache.org/axis/}HttpErrorCode:401(401) at com.jaspersoft.ireport.jasperserver.ws.http.JSSCommonsHTTPSender$3.handleResponse(JSSCommonsHTTPSender.java:245) at com.jaspersoft.ireport.jasperserver.ws.http.JSSCommonsHTTPSender$3.handleResponse(JSSCommonsHTTPSender.java:1) at org.apache.http.client.fluent.Response.handleResponse(Response.java:90) at com.jaspersoft.ireport.jasperserver.ws.http.JSSCommonsHTTPSender.invoke(JSSCommonsHTTPSender.java:221)[/code]Cause: Upon inspecting Advanced Settings in Server Profile Wizard for associated connection, it is found out that Use Protocol option was set to "SOAP Only". Since, the SOAP webservice has been removed from newer versions of Jaspersoft Studio hence this issue incurred. Resolution: To resolve the issue, the Use Protocol option needs to be switched to "REST only" or "REST, if fails then SOAP".
  3. Issue: Customer reported this issue when they created new JNDI connection. In jasperserver logs following error trace could be seen when testing the connection: java.sql.SQLException: Cannot create PoolableConnectionFactory (Login failed for user 'xxxxx'. ClientConnectionId:e2c4ed97-fea5-40a1-b14a-2d1292a66887) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:668) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:543) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:752) at ...... java.lang.Thread.run(Thread.java:748) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'xxxxx'. ClientConnectionId:e2c4ed97-fea5-40a1-b14a-2d1292a66887 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at ..... They were using SQLServer DB client. Cause: In META-INF/config.xml, their custom JNDI data source didn't have "factory" attribute. Resolution: To resolve the issue- add the "factory" attribute. It looks something like this: factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory"
  4. Issue: After applying hotfix getting below error and application server won't start: Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering. Cause: This error is caused due to Spring Web Libraries that are required for the JasperReports Server but due to duplicate/multiple versions of same JARs present in the library creates a conflict for application server/tomcat. Resolution: To address this you can: 1. Go to the following path <jasper-home-dir>WEB-INFlib 2. Look for the following jar files and see if they are not duplicated[check for spring jars]: spring......[x.y.z]......jar 3.You may encounter different versions of the files: for e.g. spring-web-5.2.20.RELEASE.jar & spring-web-5.2.22.RELEASE.jar 4. Remove all the older versions and leave the newest release. 5. Now, clear tomcat/temp and tomcat/work and restart it. NOTE: Please make sure to follow all instructions specified in the readme.txt when applying the Hotfix and make sure you have deleted all the files specified in the 'Deleted files:' section.
  5. bshrikan

    Permission Mask 22

    Query: In the document TIB_js-jrs_7.5_REST-API-Reference.pdf, permission mask 22 is missing : • No access: 0 • Administer: 1 • Read-only: 2 • Read-write: 6 • Read-delete: 18 • Read-write-delete: 30 • Execute-only: 32 But we have values of 22 in jiobjectpermission repository table. Explanation: Permission mask 22 is a remnant of prior versions of JasperReports Server. It was originally created as the hash for the authorization combination of Read, Write, and Delete access. However, in later versions of JRS, it has been replaced by mask 30, which equates to Read, Write, Create and Delete access. Originally, it was decided to keep the two masks because the "create" access doesn't really apply to publishing a report (which would require write access). "Create" is more for folders, which are "created" in the sense that they originate in JRS. However, it was decided that this was a minor difference and that keeping both 22 and 30 would be redundant. There should not be any items that are set to 22 in post JRS 7.2.x versions that are new installations and not upgrades from prior versions. However, a 22 would work as intended due to backward compatibility.
  6. This could be achieved using the 'borderColor' property- <hc:chartProperty name="plotOptions.series.borderColor" value="red"/> This would render result as seen in the below picture: You may refer to the below links to explore this Highchart library property and other properties: borderColor Property jsFiddle Demo
  7. Issue:How to change the font size of HTML5 pie chart data labels? Resolution:You can use following property in your JRXML report to change font of HTML5 pie chart data labels: <hc:chartProperty name="plotOptions.pie.dataLabels.style.fontSize"> <hc:propertyExpression><![CDATA[20]]></hc:propertyExpression></hc:chartProperty>[/code]
  8. Issue:If the data labels contain lengthy text, the text gets cut off in the middle. Is there any way to wrap the data labels of HTML5 Pie charts? Resolution:In order to wrap the data labels, we can use style.textOverflow property and set its value to "clip", this will allow text to wrap to multiple lines. Try to set below property in your JRXML report: <hc:chartProperty name="plotOptions.pie.dataLabels.style.textOverflow" value="clip"/>[/code]This is how Pie chart looks when data labels are not wrapped. After setting above mentioned property the data labels get wrapped. Please, refer to this link which describes this property and demonstrates its use on jsfiddle.
  9. This sample report demonstrates how you can remove metric notations like K- thousands and M-millions from the HTML5 bar chart. Initially, HTML5 Bar chart looks like this: You can see the salaries shown in the HTML5 bar chart are represented using k metric notation. In order to apply thousands separator format you need to perform the following steps: 1. Right Click on Chart select Edit Chart Properties 2. Switch to the 'Chart Formatting' tab 3. Click on the 'Show Advanced Properties button at the bottom of the dialog box. 4. In Default section: Follow this path yAxis->labels>format 5. Now edit the current value field, check the 'Use Expression' checkbox, and put below value: "${value:00,.2f}" [include the double quotes, the $ sign is given for appending currency symbol] 6. Now Apply and save the changes, and run the report. [This should append $ currency to the numbers and also add thousands separator to the value.] Jaspersoft uses Highcharts library to generate HTML5 charts, you may explore this site for your tailored needs. Attached is a zipped sample JRXML report which runs off the sample Foodmart database and hence a JDBC connection to the Foodmart database is required, also the chart can be viewed on the last page of report as it is placed in the summary band. Please check Dataset and Query Dialog to test the below query: SELECT department.department_description, employee.position_title, employee.salary, employee.gender FROM employee INNER JOIN department ON department.department_id = employee.department_id limit 40
  10. If Tomcat is run as root on Linux, the export of Reports, Ad Hoc Views, and Dashboards fails. To avoid this, set this property to true: net.sf.jasperreports.chrome.argument.no-sandbox=true By default, this is set to false. After setting this property, restart JasperReports Server to enable it. Issue: It has been observed that many times users see error such as below even after setting the above property from JasperReports Server Admin guide/Installation guide: Configuration for Exporting Reports, Ad Hoc Views, and Dashboards when Web Server is Run as Root on Linux 2020-06-11T17:32:19,031 ERROR SecureExceptionHandlerImpl,http-nio-8080-exec-8:116 - com.github.kklisura.cdt.launch.exceptions.ChromeProcessTimeoutException: Failed while waiting for chrome to start: Timeout expired! Chrome output: [0611/173218.897370:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. Cause: This has been observed sometimes that users copy the property from the documentation and paste it in .../WEB-INF/classes/jasperreports.properties file. And many times it goes unnoticed that it did not get copied correctly and the "hyphen" is missing or getting converted to some other character[e.g. net.sf.jasperreports.chrome.argument.nosandbox=true] from the property- it should be 'no-sandbox'. Resolution: The idea is to double-check if the entry of the property has been made correctly. It's a very simple thing but gets overlooked sometimes. For information about configuring this property, see JasperReports Server Admin Guide
×
×
  • Create New...