Jump to content

Friendly User

Members
  • Posts

    435
  • Joined

  • Last visited

  • Days Won

    2

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by Friendly User

  1. Problem: You are trying to run JasperSoft Studio and your loading screen splash just hangs without any progress for a long time. Solution: This problem is most likely workspace problem. Try running JasperSoft Studio with -clean flag (for example in Windows right click on the icon -> Properties -> Shortcut tab -> set target to include -clean. For example "C:JaspersoftJaspersoft Studio Professional-6.2.1.finalJaspersoft Studio Professional.exe -clean" Another thing you can try is backing up the reports from your project workspace, deleting the workspace and have JSS re-create workspace from scratch.
  2. Problem:You have created a report with a Widgets Pro element like Fusion Gantt Chart. When running the report in TIBCO JasperReports® Server 6.2.0, you do not see the report and get an error in developer tools network trace where request for the resource 'http://localhost:8080/jasperserver-pro/fusion/maps/FusionCharts.HC.gantt.js' returns a 404. Solution:This happens because the default renderer for the widgets is set to java script. You can make Gantt diagram work if you do the following change: go to {JRS WAR}/WEB-INF/classes/ edit jasperreports.properties file uncomment #com.jaspersoft.jasperreports.fusion.widgets.render.type=flash comment com.jaspersoft.jasperreports.fusion.widgets.render.type=html5 restart the server. This is to be fixed in newer versions of JasperReports® Server.
  3. Problem: You have created a report and uploaded it to JasperReports server. When exporting that report to XLSX and opening it you get "problem with some content" error. Solution: This problem can be related to complex date format patterns. For example pattern like this: EEE, d MMM yyyy h:mm a z This is a Java pattern and it doesn't have a match in Excel. It gets transformed into something like this: 42433.5511111109 and will be the source of this error.
  4. Problem: You have an ad hoc view with date field that uses date format which includes AM/PM component. For example: MMM dd, yyyy HH:mm:ss a When you export this to XLS or XLSX you get invalid mask for cell format: mmm d, yyyy h:mm:ss a Solution: Edit the applicationContext.xml file, find the following section: <util:map id="formatPatternsMap"> <!--entry key="$ #,##0.00" value="$ #,##0.00"/--> </util:map> Add the following entries: <entry key="MMM d, yyyy h:mm:ss a" value="MMM d, yyyy h:mm:ss AM/PM"/> <entry key="h:mm:ss a" value="h:mm:ss AM/PM"/> Save the file and restart the server.
  5. Problem:You are developing a report that has a background band and uses table component. When you run the report, the table component shows above the background and does not show the background band behind itself. Solution:The reason for this is that table component has it's own set of styles that are not transparent. You need to change that by making the table element itself transparent (select table -> transparent -> checked) and set the transparent properties in table styles to true.
  6. Problem: You are trying to upload any resource to JasperReports Serevr using JasperSoft Studio repository explorer. When you upload the resource you get an error: " Path must include project and resource name:/" (could be slightly different, could include another folder) Solution: Please try to do the following: 1. Right click on server connection -> Edit server connection 2. Expand Advanced properties by clicking the [+] 3. Workspace folder -> click on [...] button 4. Select any folder, you can select even the folder that was previously set. Preferably to set it to your project home like /MyReports/Server-Connection-Name
  7. Scenario: > I am building a new ad hoc report, and noticed that all of my fields that return 0 or 1 values from our SQL database show up as True or False in the ad hoc report view designer. I do not want these to be converted, and wish to preserve the original data format. How do I keep Jaspersoft from automatically changing these values? Solution: by default the BIT JDBC type is mapped to java.lang.Boolean according to applicationContext-semanticLayer.xml. Take a look at the bean here: <bean name="jdbcMetaConfiguration" class="com.jaspersoft.commons.semantic.metaapi.impl.jdbc.JdbcMetaConfiguration"> <property name="jdbc2JavaTypeMapping"> You can change it here to java.lang.Integer. This will result in all new domains mapping SQL BIT to Java Integer type. If you have an existing domain the change won't be reflected there. To change it in the existing domain edit the domain, go to Edit with Domain designer, download the domain schema.xml file by clicking export design. In the schema.xml file find the field definition you have. Try searching by java.lang.Boolean. For example: <resources> <jdbcTable id="dbo_Table_2" datasourceId="ebala" tableName="schema1.Table_2"> <fieldList> <field id="TestBit" fieldDBName="TestBit" type="java.lang.Boolean" /> </fieldList> </jdbcTable> </resources>
  8. Problem:I have a report that I want to upload to JasperReports® Server, it has a JSON data adapter as a data source. How can I add a sub report to this report when it already resides on my JasperReports Server? On JasperReports Server, this report has a remote JDBC data source. Solution:Here are the steps to upload JSON report to the server: Upload a JSON data file to the server. If you are using JasperReports Server, < 6.0: to do that in Jaspersoft® Studio create a new "XML File" object, give it a name and ID and on the step of uploading the actual file don't choose an XML file and upload your json file instead. If you are using JasperReports Server, 6.0 and higher: use JasperReports Server UI and do Create -> File -> Content resource instead. Create a data adapter for the JSON file you uploaded. You can do that in studio by creating New Data Adapter object in the repository. Upload the desired data adapter and then modify it. JSON data adapter XML structure looks like this: <?xml version="1.0" encoding="UTF-8" ?><jsonDataAdapter class="net.sf.jasperreports.data.json.JsonDataAdapterImpl"> <name>data adapter name here</name> <fileName>repo:/path/to/JSON/file/you/uploaded</fileName> <useConnection>true</useConnection> <timeZone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:java.lang.String"> America/Los_Angeles </timeZone> <locale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:java.lang.String"> en_US </locale> <selectExpression></selectExpression> <datePattern>yyyy-mm-dd</datePattern> <numberPattern>#,##0.###</numberPattern></jsonDataAdapter>[/code]After uploading the data adapter you may need to modify this XML. Chances are it'll point to something wrong in <fileName> tag like C:MyReportsadapter.xml or like that. I had that when first doing this sample. You may also upload data adapter as an XML file just like we did in step 1. In the report you want to upload you need to specify the following property to point it to use the JSON data adapter we just created as a data source: net.sf.jasperreports.data.adapter In JRXML it looks like this: <property name="net.sf.jasperreports.data.adapter" value="repo:/path/to/Data/Adapter"/>[/code]After you specified the correct path to the data adapter resource in the repository upload the report. Test if it works. When uploading the report you'll be prompted to select the data source for the report. Select "Don't Use Any Data Source" option when prompted (this is important). Now for the subreport. Assuming you already have a report residing somewhere in JasperReports Server repository and you want to use it as a subreport. We need to do two steps to have this work: In subreport JRXML specify a property com.jaspersoft.jrs.data.source and point it to existing datasource or domain in repository. For example: <property name="com.jaspersoft.jrs.data.source" value="/path/to/DataSource"/>[/code]In subreport expression specify the path to subreport JRXML and NOT subreport unit. Something like this: "repo:/path/to/subreport_files/main_jrxml" You can get the URI of the main_jrxml object by hovering over it in the Jaspersoft Studio and waiting for tooltip to appear. When you create a subreport object in main report, do not pass a connection to it either. Property <property name="com.jaspersoft.jrs.data.source" value="/path/to/DataSource"/> can be used with any type of data sources. This way you can create reports where main report uses one data source, say JDBC, and have subreports which use domains, analysis schemas, JSON data adapters, other JDBC connections as data sources.
  9. Problem:TIBCO JasperReports® Server deployed on Tomcat. We are receiving errors when our user selects "All" in a multi-select input control. The error is "Parameter values exceeded allow maximum: 512". Is there a configuration setting for increasing the number of selected items allowed? Solution:Append the following property to <apache tomcat>/conf/catalina.properties: org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000[/code]
  10. Problem:I am trying to create a report with relative dates that I want to deploy to TIBCO JasperReports Server later. How do I define the relative date parameters, how do I use them in a query, how do I create input controls for those parameters on a server. Solution:Create a parameter of type net.sf.jasperreports.types.date.DateRange. If you need a default value expression this parameter can have it defined like this: <parameter name="Parameter1" class="net.sf.jasperreports.types.date.DateRange"> <defaultValueExpression> <![CDATA[new net.sf.jasperreports.types.date.DateRangeBuilder.DateRangeBuilder("YEAR-100").toDateRange()]]> </defaultValueExpression></parameter>[/code]This parameter can then be used in the query but it needs to be used in $X clause. For example in my sample the query is defined like this: select birth_date from public.employee where $X{LESS, birth_date, Parameter1}[/code]$X{} clause requires you to define three or four arguments. First argument is the filtering function. Second argument is the column name in the database which you would like to filter. Third and fourth arguments are the parameter names in the report that you want to use as the filtering criteria. In this case the $X clause will resolve to select birth_date from public.employee where birth_date < parameter1. Functions can be the following: LESS, GREATER, EQUAL, NOTEQUAL, IN, NOTIN, BETWEEN. Only between requires you to specify two parameter names which will define the boundaries. For more information about this please refer to the JasperReports SourceForge.net Sample Reference Once you have a parameter and a query you can run the report locally in iReport or Jaspersoft Studio. Once ran you will be prompted for a value. Here you can put either the actual date (7/29/2015, 2/2/1914 etc.) or the relative date (YEAR-100, MONTH+2). This functionality mirrors the functionality in ad hoc designer. Possible values for relative dates are: DAY, WEEK, MONTH, QUARTER, SEMI, YEAR When you deploy the report to JasperReports Server you will need to create an input control for this parameter. The input control needs to have the same id as the parameter name, needs to be a Single Value selection control and needs to have Date data type. In JasperReports Server you will see a calendar for this input control and will be able to choose date. However you can write in the field the relative date keyword and operation and it will be a valid input.
  11. Problem:I have a working LDAP configuration that authenticates and everything fine, but it is assigning my users to Org ID: organization_1, Org Name: Organization every time instead of the default organization I specified in my applicationContext-externalAuth-LDAP-mt.xml using the defaultOrganization parameter Solution:If organization_1 is currently the only organization in your server then the users will be automatically assigned to that organization. You need first to create the organization you are going to be using as default. After this the users will get assigned to it. The code does not create that organization and expects it to exist beforehand.
  12. Hypothetical situation:We would like to change the color when highlighting the options of change chart type. For instance it's highlighting orange when you hover over it. How do we do this in the theme? we would like to change this to grey or black.Is there an option to disable allowing the user to change chart type per report by report basis.Solution:That button, and it's properties, are defined by default here: jasperreports-highcharts-6.1.0.jar/com/jaspersoft/jasperreports/highcharts/charts/resources/jive.highcharts.vm.css : .jive_chartSettingsIcon { position : absolute; background : url(${path}com/jaspersoft/jasperreports/highcharts/charts/resources/images/chart_options_button_sprite.png); width : 32px; height : 23px; left : 0px; top : 0px; cursor : pointer; z-index : 3; margin : 0; padding : 0; border : 0; outline : 0; font-size : 100%; vertical-align: baseline; } You can change the: background : url(${path}com/jaspersoft/jasperreports/highcharts/charts/resources/images/chart_options_button_sprite.png); The image is inside the same JAR. So if you want to use that icon you can extract it from the JAR and then use inside your theme. In your overrides.css you'll need to override the background property. If you want to disable the button on per-report basis you can use the following property. It can be defined both on report level to disable interactivity for all charts in the report or on the element level to restrict specific charts: <property name="com.jaspersoft.jasperreports.highcharts.interactive" value="false"/>
  13. Problem:There is a TIBCO JasperReports® Server that is deployed behind an IIS proxy. When users are running ad hoc reports with a large number of filters/input controls the filtering does not get applied. The REST request for the filters returns a 400 error: HTTP/1.1 400 Bad RequestContent-Type: text/html; charset=us-asciiServer: Microsoft-HTTPAPI/2.0Date: Fri, 28 Aug 2015 16:45:30 GMTConnection: closeContent-Length: 324[/code]Solution:This solution is only relevant if you have TIBCO JasperReports Server deployed behind IIS. IIS is used quite commonly as a proxy server that sits in front of the application server in Windows shops. Default settings of the proxy server permit you from sending requests with large URL segment which is what happens in this case. They get defaulted to 400 response and fail. The default limit for the URL segment is 260 characters, the setting is found in the http.sys settings on Windows Servers. The defaults, which are unspecified on a stock Windows Server 2008 install, are documented on this KB, https://support.microsoft.com/en-us/kb/820129 The relevant setting in this case is named "UrlSegmentMaxLength", a DWORD value with a default of 260, can be configured between 0 - 32,766 chars. In the above example, the largest segment generated in the ajax request was 760 chars. Increasing the setting to 8092 in the registry, and rebooting the server resolves the issue for the foreseeable future.
  14. Problem:You have created a Javabean data source and want to filter the values for the report based on the parameter value. Solution:Bean data source requires a factory class with a static method that will return the collection or an array of java beans. There isn't a way TIBCO JasperReports® Library can pass some value to that factory class which means whatever data is to be passed to TIBCO JasperReports Library needs to be defined beforehand in the static method. You can use Filter Expressions for the data and apply the filtering through it. In your Dataset and Query dialog in TIBCO Jaspersoft® Studio please navigate to the bottom half and notice the tabs with Fields, Parameters, Sorting, Filter Expression, Data preview. Click on Filter Expression and add an expression you want to use. Every single record obtained from Datasource.next() method will be then compared against that expression. If true the record will make it into final result set. For example: $F{shipcountry}.equals($P{countryParam}[/code]
  15. Hypothetical situation:You have a report that has an input control associated with it. That input control allows you to pick multiple values. You as administrator do not want users to be able to retrieve a lot of values for the report and therefore overburdening the server. You want to restrict the number of values user can pick. Solution:While it is not possible to limit this from the TIBCO JasperReports® Server side as of v6.1.1, you can, as a report developer, add checks inside the report itself of how large is the array of the parameter associated with the input control. If the size is larger than X you can choose not to print the table element for example. Attached is a simple sample based on the SugarCRM database. It has a country input control. The report itself has main report unit with a dummy query (select 1 as field1) and a table element which has print when expression. That print-when expression takes the parameter associated with input control and checks the array size. If the size is larger than 5 then the table is not printed and related query is not executed. limitedselectionreport.jrxml export_2.zip
  16. Problem:When trying to open TIBCO JasperReports® Server repository from TIBCO Jaspersoft® Studio the following error is thrown: [toc]AxisFaultfaultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userExceptionfaultSubcode:faultString: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_namefaultActor:faultNode:faultDetail:{http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_nameat sun.security.ssl.ClientHandshaker.handshakeAlert(Unknown Source)at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254)at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:7)at org.apache.http.client.fluent.Executor.execute(Executor.java:206)at com.jaspersoft.ireport.jasperserver.ws.http.JSSCommonsHTTPSender.invoke(JSSCommonsHTTPSender.java:226)at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)at org.apache.axis.client.Call.invokeEngine(Call.java:2784)at org.apache.axis.client.Call.invoke(Call.java:2767)at org.apache.axis.client.Call.invoke(Call.java:2443)at org.apache.axis.client.Call.invoke(Call.java:2366)at org.apache.axis.client.Call.invoke(Call.java:1812)at com.jaspersoft.ireport.jasperserver.ws.RepositorySoapBindingStub.list(RepositorySoapBindingStub.java:336)at com.jaspersoft.ireport.jasperserver.ws.WSClient.getVersion(WSClient.java:158)at com.jaspersoft.studio.server.protocol.soap.SoapConnection.getServerInfo(SoapConnection.java:108)at com.jaspersoft.studio.server.protocol.soap.SoapConnection.connect(SoapConnection.java:136)at com.jaspersoft.studio.server.protocol.ProxyConnection.connect(ProxyConnection.java:99)at com.jaspersoft.studio.server.WSClientHelper.connect(WSClientHelper.java:86)at com.jaspersoft.studio.server.WSClientHelper.connectGetData(WSClientHelper.java:119)at com.jaspersoft.studio.server.action.server.EditServerAction$1.run(EditServerAction.java:92)at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54){http://xml.apache.org/axis/}hostname:L00696[/code]Solution:Close your TIBCO Jaspersoft® Studio Pro if running. Locate your TIBCO Jaspersoft Studio Pro folder. Edit the Jaspersoft Studio Professional.ini in the root folder of TIBCO Jaspersoft Studio Append -Djsse.enableSNIExtension=false to JVM Opts section. Should look something like this: -vmargs-Xms128m-Xmx1024m-XX:PermSize=128M-XX:MaxPermSize=256M-XX:+CMSClassUnloadingEnabled-XX:+UseConcMarkSweepGC-Dfile.encoding=UTF-8-Djava.net.preferIPv4Stack=true-Djsse.enableSNIExtension=false [/code]Restart the TIBCO Jaspersoft Studio.
  17. Question:It is not clear from the web services API doc what is the lifespan of the report provided via ReportExecution service. How long it stays in the repository and when/how it would be cleaned up. Answer:The report output does not get saved to repository, it's getting saved in the session instead and it gets discarded once the session is destroyed (closed or expired).
  18. Hypothetical situation:You want to install the TIBCO JasperReports® Server on your client's servers and want to provide your own branding. For that you have developed a theme. How to correctly ship that theme and make it default after installlation without additional administration. Solution:There are two approaches here. They both essentially modify the default catalog. First one: Deploy the TIBCO JasperReports Server with minimum catalog (without samples and such).Upload your theme.Set the theme as active theme as superuser.Export the repository using the import-export tool (please refer to the TIBCO JasperReports Server Administrator guide (attached) on using the import-export tool). The key you are interested when exporting would be --everything).Once exported you'll have a zip. That zip should have a flag as to what themes are currently active. You can import it to some other new server with --update flag and that should force that theme to be used. You can import that archive before you finally deploy the TIBCO JasperReports Server.The theme gets assigned on organizational level including the root theme. TIBCO JasperReports Server doesn't have capability to export single organizations as of 6.1.1. The theme used is defined in the XML-descriptor of the exported organization. For the root this is defined in {exported archive}/organizations/organizations.xml. The theme used is defined here (I am using a custom theme): <theme>New Theme Name</theme>This is also true for other organizations like organization_1. Another approach would be to modify the import-minimal catalog itself. For that go to buildomatic/install_resources/export and find the catalog that your are going to be using. Change the contents of the zip file to replace the default theme with your own.
  19. Problem:You have a report with a text field where you want to use styled text markup. For example: "<style><b>Some text: </b></style>" + $F{SomeField}[/code]While this works fine for most fields, some fields do not get the bold style applied. Solution:Styled text is essentially an XML and follows the same rules and restrictions as XML. $F{SomeField} which is appended to styled text might contain symbols which are not allowed in XML without escaping them like ampersand. These symbols need to be escaped before appending.
  20. Problem:TIBCO JasperReports® Server was previously deployed on Tomcat 7 and then was re-deployed on Tomcat 8. The deployment was successful and the user decided to port the existing Tomcat 7 JNDI connections to Tomcat 8. The user copies the connection definitions from old context.xml and pastes them into new one which doesn't work and Tomcat 8 now fails to deploy TIBCO JasperReports Server. Solution:TIBCO JasperReports Server. has two JNDI data source factories implementations: factory="com.jaspersoft.jasperserver.tomcat.jndi.JSBasicDataSourceFactory"factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory"[/code]JSBasicDataSourceFactory is used if the tomcat-dbcp.jar is present in the Tomcat classpath. The JSCommonsBasicDataSourceFactory if that JAR is missing. However in Tomcat 8 you essentially need to use JSCommonsBasicDataSourceFactory because of the internal tomcat changes. So when you copy the data sources to Tomcat 8 you need to make sure that the correct factory is set.
  21. Problem:I am trying to grab resource information about an xml file that is stored in the repository. I'm wanting to obtain the create/updateDate for the file resource. I am using the standard rest_v2/resources GET call with the Accept: application/repository.file+json header. The URL looks like this: http://someserver.com/jasperserver-pro/rest_v2/resources/organizations/organization_1/Reports/Report.xml When I attempt this call I get this response. <errorCode> unexpected.error</errorCode><message> No enum constant com.jaspersoft.jasperserver.dto.resources.ClientFile.FileType.XML</message>[/code]This only happens to some XML files stored on the server but not the others. Solution/Explanation:This problem is most likely caused by creating the XML files using SOAP web services previously. For example SOAP will have this method: xmlFileResourceDescriptor.setResourceProperty(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE, "XML");[/code]This resource descriptor while defined by SOAP and resulted in a valid XML file is however missing from the REST v2 resource descriptor enum. The content type for SOAP call is an all-caps XML. You would need to recreate those files again using REST_v2 calls with the correct content type.
  22. Problem:A job is scheduled jasper REST_v2 API with date parameter, job descriptor some thing like: [toc]{ "version" : 0, "username" : "jasperadmin", "label" : "Some label", "description" : "Some descr", "trigger" : { "simpleTrigger": { "version" : 0, "timezone" : "America/New_York", "calendarName" : null, "startType" : 1, "startDate" : null, "endDate" : null, "misfireInstruction" : 0, "occurrenceCount" : 1, "recurrenceInterval" : -1, "recurrenceIntervalUnit": "" } }, "source" : { "reportUnitURI": "/some/path/toReport", "parameters" : { "parameterValues": { "EndDate" : "2015-05-07 00:00", "StartDate" : "2015-05-01 00:00", "REPORT_TIME_ZONE": "America/New_York", "UserID" : 105 } } }, "baseOutputFilename" : "some output", "outputLocale" : "en-US", "mailNotification" : { "version" : 0, "toAddresses" : { "address": ["user@jasperserver"] }, "ccAddresses" : { "address": [] }, "bccAddresses" : { "address": [] }, "subject" : "Some subject", "messageText" : "See attached report.", "skipEmptyReports" : false, "messageTextWhenJobFails" : null, "includingStackTraceWhenJobFails" : false, "skipNotificationWhenJobFails" : false, "resultSendType" : "SEND_ATTACHMENT" }, "alert" : null, "outputTimeZone" : "America/New_York", "repositoryDestination": { "version": 0, "folderURI" : null, "sequentialFilenames" : false, "overwriteFiles" : false, "outputDescription" : null, "timestampPattern" : null, "saveToRepository" : false, "defaultReportOutputFolderURI" : null, "usingDefaultReportOutputFolderURI": false, "outputLocalFolder" : null },[/code]When this request is sent to the server an error is thrown: An error occurred while executing it. [see nested exception: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date] at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.throwJobExecutionException(ReportExecution Job.java:338) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.checkExceptions(ReportExecutionJob.java:33 0) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:605) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:222) at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:49) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.setDate(JRJdbcQueryExecuter.java:649) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.setStatementParameter(JRJdbcQueryExecuter.java:577) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.setStatementParameter(JRJdbcQueryExecuter.java:399) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter$1.visit(JRJdbcQueryExecuter.java:332) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter$QueryParameter.accept(JRAbstractQueryExecuter.java:157) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.visitQueryParameters(JRAbstractQueryExecuter.java:646) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:317) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:196) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1114) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:691) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1314) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:931) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) Solution:First of all you need to make sure that the ContentType of the reuest is set to application/job+json. This is very important because otherwise the type unmarshalling will be incorrect and cause errors. Secondly to pass the values you need to use the following syntax: "parameterName": ["value"] Something like this: "parameters": { "parameterValues": { "date": ["2014-12-01T00:00:00+00:00"] } }[/code]Here is an example of a valid and correct job descriptor: Content-Type: application/job+json{ "version" : 0, "username" : "superuser", "label" : "test", "description" : "", "trigger" : { "simpleTrigger": { "id" : 3816, "version" : 0, "timezone" : "America/Los_Angeles", "calendarName" : null, "startType" : 2, "startDate" : "2015-09-26 10:00", "endDate" : null, "misfireInstruction": 0, "occurrenceCount" : 1, "recurrenceInterval": null } }, "source" : { "reportUnitURI": "/organizations/organization_1/AdditionalResourcesForTesting/Reports_With_Controls/Date/Date_equals_2_1_1", "parameters" : { "parameterValues" : { "date": ["2014-12-01T00:00:00+00:00"] } } }, "baseOutputFilename" : "Cascading_multi_select_report", "outputLocale" : "", "mailNotification" : null, "alert" : { "id" : 0, "version" : -1, "recipient" : "OWNER_AND_ADMIN", "toAddresses" : { "address": [] }, "jobState" : "FAIL_ONLY", "messageText" : null, "messageTextWhenJobFails": null, "subject" : null, "includingStackTrace" : true, "includingReportJobInfo" : true }, "outputTimeZone" : "America/Los_Angeles", "repositoryDestination": { "id" : 3817, "version" : 0, "folderURI" : "/organizations/organization_1/reports", "sequentialFilenames" : false, "overwriteFiles" : false, "outputDescription" : "", "timestampPattern" : null, "saveToRepository" : true, "defaultReportOutputFolderURI" : null, "usingDefaultReportOutputFolderURI": false, "outputLocalFolder" : null, "outputFTPInfo" : { "userName" : null, "password" : null, "folderPath": null, "serverName": null } }, "outputFormats" : { "outputFormat": ["PDF"] }}[/code]
  23. Problem:The TIBCO Jaspersoft® Studio installed on MacOS machine uses a very old version of Java. Solution:While normally TIBCO Jaspersoft Studio comes with an already packaged version of Java, MacOS classpath variables might interfere with the configuration and force TIBCO Jaspersoft Studio to use a really old version of Java like 1.5 or 1.6 depending on the OS version. You normally would get a prompt during the installation asking to allow to use an older version. If you do get that here is what you can do: - Install the latest JDK 1.7 from DMG downloaded from Oracle (i.e. 1.7.0_67) - Locate your TIBCO Jaspersoft Studio applications, usually something like /Applications/TIBCO Jaspersoft Studio 6.0.1.final and right click on the Jaspersoft Studio application. Choose “Show Package Contents”. Locate the .ini file inside the subfolder path Contents/MacOS. Edit the Jaspersoft Studio.ini file and remove the lines -vm and below if present. It is needed because it appears that the presence of the -vm flag fires the warning dialog asking for Java SE 6 installation. - Launch TIBCO Jaspersoft Studio as usual.
  24. Symptoms:User added hive-jdbc.jar to the tomcat/lib folder to be able to use Hive as JDBC data source. This caused the issue of tomcat not starting and failing to load the root context: Jun 05, 2015 11:06:54 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /opt/jaspersoft/jasperreports-server-6.0.1/apache-tomcat/webapps/ROOT Jun 05, 2015 11:06:54 AM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [standardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig; at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1351) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more Jun 05, 2015 11:06:54 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /opt/jaspersoft/jasperreports-server-6.0.1/apache-tomcat/webapps/ROOT Jun 05, 2015 11:06:54 AM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [standardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig; at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1351) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more Solution/explanation:The added JAR file causes a classloading conflict within the Tomcat itself. Some of the classes that the JAR introduces conflict with the native classes Tomcat uses. This JAR needs to be removed. In order to use the Hive as a JDBC or JNDI data source you need to use the driver that comes with the TIBCO JasperReports® Server itself. Here is an example of JNDI connection definition for Hive2 server: <Resource name="jdbc/hive2" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="username" password="pword" driverClassName="tibcosoftware.jdbc.hive.HiveDriver" testOnBorrow="true" accessToUnderlyingConnectionAllowed = "true" url="jdbc:tibcosoftware:hive://some.hive.db.location.com:10001;TransactionMode=ignore"/>[/code]Here as you can see the driverClassName is used as tibcosoftware.jdbc.hive.HiveDriver which is already available in TIBCO JasperReports Server and does not require you to deploy additional jar files. The same class can be also used later in TIBCO JasperReports Server.
  25. Problem:Modification of an existing ad hoc chart report in TIBCO Jaspersoft Studio and adding the custom advanced properties has no effect after deploying the modified report to the server. This problem is actual for Jaspersoft Studio versions lower than 6.1.0. Solution:Jaspersoft Studio for that version incorrectly applies the chart properties on JRXML level f. Jaspersoft Studio applies changes to <jrhc:chartSetting name="_jrs_adhoc"> context when it needs to be done in default one. For example: <componentElement> <reportElement key="chart" positionType="Float" mode="Opaque" x="5" y="5" width="572" height="330" uuid="8747e007-66ea-4606-8b91-ef7723f7af57"/> <jrhc:chart xmlns:jrhc="http://jaspersoft.com/highcharts" xsi:schemaLocation="http://jaspersoft.com/highcharts http://jaspersoft.com/schema/highcharts.xsd" type="Line" preferredHeight="353"> <jrhc:chartSetting name="_jrs_adhoc"> <jrhc:chartProperty name="_JRS_ADHOC_CHART_STATE"> <jrhc:propertyExpression> <![CDATA[$P{_JRS_ADHOC_CHART_STATE}]]> </jrhc:propertyExpression> </jrhc:chartProperty> <jrhc:chartProperty name="_JRS_ADHOC_QUERY_DATA"> <jrhc:propertyExpression> <![CDATA[$P{_JRS_ADHOC_QUERY_DATA}]]> </jrhc:propertyExpression> </jrhc:chartProperty> <jrhc:chartProperty name="tooltip.valueDecimals"> <jrhc:propertyExpression> <![CDATA[new Integer(0)]]> </jrhc:propertyExpression> </jrhc:chartProperty> <jrhc:chartProperty name="tooltip.valueSuffix"> <jrhc:propertyExpression> <![CDATA["%"]]> </jrhc:propertyExpression> </jrhc:chartProperty> </jrhc:chartSetting> </jrhc:chart></componentElement>[/code]As you can see here the <jrhc:chartSetting name="_jrs_adhoc"> is set to "_jrs_adhoc" and these do not get consumed by the renderer later when deployed to JasperReport Server. What you should do is go to the source of the report and manually append the properties. For example try to append following segment inside <jrhc:chart> element: <jrhc:chartSetting name="default"> <jrhc:chartProperty name="tooltip.valueSuffix"> <jrhc:propertyExpression> <![CDATA["%"]]> </jrhc:propertyExpression> </jrhc:chartProperty></jrhc:chartSetting>[/code]As you can see here the chartSetting is set to "default" and this will be consumed by the renderer. You can override some chart properties for ad hoc charts in Jaspersoft Studio v6.1.0 in section Ad Hoc Overrides in Advanced chart properties. Also in newer versions you can add the custom properties in the ad hoc editor itself in chart format section (6.2.0 and higher).
×
×
  • Create New...