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

Jivan Phadtare

Jaspersoft Staff
  • Posts

    50
  • Joined

  • Last visited

 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 Jivan Phadtare

  1. Issue : Post upgrading to Jasperserver 8.0.3 users will get "Heartbeat Data Collection" dialog message on a dashboard rendered by scheduling. (PFA : "Region_Dashboard.pdf") Customer would like to prevent showing this dialog on scheduling rendering. Cause : Post upgrade heartbeat related properties from file "js.config.properties" will get changed which causing this dialog message to be displayed. Resolution : "Heartbeat Data Collection" dialog message can be prevented by modifiying below properties from "js.config.properties" file. "js.config.properties" file can be found at location : <Tomcat_Installed_Path>webappsjasperserver-proWEB-INF Set these values to false to prevent showing this dialog. --------------------------------- # Enable or disable HeartBeat heartbeat.enabled= heartbeat.askForPermission.enabled= heartbeat.permissionGranted.enabled= --------------------------------- Note : Restart the Jasperserver post modifying the "js.config.properties" file in order to reflect the changes. region_dashboard.pdf
  2. Hello, To create report based on domain - first need to create data adapter for domain. While creating data adapter select data adapter type as 'Jaspersoft Server' (FYI - attached sample data adapter screenshot "Domain_Data_Adapter.png") Once data adapter is created while creating new report select already created data adapter. (FYI - attached sample screenshot which shows report created based on domain "Report_Based_On_Domain.png") For more details about working with Domains, you can refer the below community article. https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v780/working-domains Hope you will find this useful.
  3. Hello, Jasper Report 6.20.0 is very old version. There are many versions released post JRS 6.2. Most latest version of jasperserver is 8.0 and 8.1 You can try using one of the most latest version.
  4. Issue: In Jasperserver UI while creating datasource, MySQL JDBC connection is getting timed out when DNS connection URL is used. (FYI - PFA screenshot "8.0.2_MySQL_JDBC_DNS.jpg") If instead of DNS URL, actual host URL of the RDS Aurora MySQL database is provided then connection is working fine. (FYI - PFA screenshot "8.0.2_MySQL_JDBC_URL.jpg") Resolution: There are multiple reasons for DNS URL connections not working, below are few steps through which we can narrow down the issue and can find the root cause of it. 1) First, we need to analyze the 'jasperserver.log' and 'catalina.out' log files. If there are any suspicious error's in these 2 files then these error log will help us to investigate it further. 'jasperserver.log' file is available at location : <Tomcat_Path>webappsjasperserver-proWEB-INFlogs Tomcat 'catalina.out' log is available at location : <Tomcat_Path>logs If there is no any error in log file then we can put the JDBC logger into debug mode and reproduce the issue to have dubug logs. Below JDBC connection loggers from 'log4j2.properties' file located at : "<Tomcat_Path>webappsjasperserver-proWEB-INF" can be put at debug level. # JDBC Connection Logging #logger.comjaspersoftjasperserverapienginejasperreportsserviceimplJdbcDataSourceService.name=com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService # logger.comjaspersoftjasperserverapienginejasperreportsserviceimplJdbcDataSourceService.level=DEBUG # logger.comjaspersoftjasperserverapienginejasperreportsserviceimplJndiJdbcDataSourceService.name=com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JndiJdbcDataSourceService # logger.comjaspersoftjasperserverapienginejasperreportsserviceimplJndiJdbcDataSourceService.level=DEBUG # logger.comjaspersoftjasperserverwaractionReportDataSourceAction.name=com.jaspersoft.jasperserver.war.action.ReportDataSourceAction # logger.comjaspersoftjasperserverwaractionReportDataSourceAction.level=DEBUG # logger.comjaspersoftcommonsdataratorJdbcDataSet.name=com.jaspersoft.commons.datarator.JdbcDataSet # logger.comjaspersoftcommonsdataratorJdbcDataSet.level=DEBUG # logger.comjaspersoftjasperserverapimetadatacommonutilValidationUtil.name=com.jaspersoft.jasperserver.api.metadata.common.util.ValidationUtil # logger.comjaspersoftjasperserverapimetadatacommonutilValidationUtil.level=DEBUG # logger.comjaspersoftcommonssemanticdsimplJdbcDataSetFactory.name=com.jaspersoft.commons.semantic.dsimpl.JdbcDataSetFactory # logger.comjaspersoftcommonssemanticdsimplJdbcDataSetFactory.level=DEBUG # logger.comjaspersoftcommonssemanticmetaapiimpljdbcBaseJdbcMetaDataFactoryImpl.name=com.jaspersoft.commons.semantic.metaapi.impl.jdbc.BaseJdbcMetaDataFactoryImpl # logger.comjaspersoftcommonssemanticmetaapiimpljdbcBaseJdbcMetaDataFactoryImpl.level=DEBUG # logger.comjaspersoftjasperserverwarvalidationReportDataSourceValidator.name=com.jaspersoft.jasperserver.war.validation.ReportDataSourceValidator # logger.comjaspersoftjasperserverwarvalidationReportDataSourceValidator.level=DEBUG 2) We can check for database connection configuration details in 'context.xml' file located at : "<Tomcat_Path>webappsjasperserver-proMETA-INF" and make sure valid DNS URL/actual DB URL, port are correct. 3) We can test database connectivity with the use of network command like below and make sure it's not the Network level issue. We can do nslookup for both actual endpoint host URL and DNS URL. Compare the result of both nslookup. e.g. nslookup <DNS_URL> nslookup <actual_endpoint_host_URL> -Using db DNS URL you can check below : telnet <RDS_DNS_URL> <DB_port_number> 4) If in debug log and on UI there is no any error message then we can request for HAR file at the time of issue reproduced. We can check for any response error code in developer tool 'console' tab and 'network' tab to see if there is any network timed out message on this screen. To generate the HAR file you can refer to below video : https://community.jaspersoft.com/wiki/video-generating-har-file-chrome-troubleshooting 5) Best way is to test database connectivity using 3rd. party tool outside the Jasperreports server. Download Squirrel jdbc client tool from URL : https://squirrel-sql.sourceforge.io/ and install it on Jasperreports server version x.x.x machine and test it by supplying the same JDBC connection parameters (DNS URL) Note - Make sure that you will test this using this utility form Jasperreports server version x.x.x machine. If connection from this Squirrel jdbc client tool fails, then this need to sort out at the network level. Below are the steps to test using Squirrel jdbc client tool a) Download Squirrel jdbc client tool from URL : https://squirrel-sql.sourceforge.io/ and install it. b) Copy MySQL JDBC connector driver jar file to lib folder: <Squirrel_Installed_Path>lib Driver jar you can download from internet. c) Create a connection in the Alias tab to connect to the database by supplying same parameters (DNS URL) and test it. 6) In this case, the issue was resolved by removing the Mariadb jar file from the "tomcat/lib" folder and replace it with the mysql jdbc connector driver jar file. So kindly make sure that, database supported valid jdbc driver jar file is available at : "tomcat/lib" folder.
  5. Issue : During Jasperserver restart below error will appear into jasperserver.log file and becasue of that Jasperserver UI is not accessible. This error may populate post upgrade. Jasperserver log file shows chains of bean error followed by "internalReportExecutorProducer" caused by error. Error : 31-Oct-2022 14:22:43.797 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/jws-3.0/tomcat9/webapps/mis] 31-Oct-2022 14:23:31.902 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 2022-10-31T14:24:13,332 ERROR ContextLoader,localhost-startStop-1:313 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'themeSource' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'themeCache' while setting bean property 'themeCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'themeCache' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'unsecureRepositoryService' while setting bean property 'repositoryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateRepositoryService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'auditContext' while setting bean property 'auditContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditContext' defined in ServletContext resource [/WEB-INF/applicationContext-audit.xml]: Cannot resolve reference to bean 'mtLoggingContextProvider' while setting bean property 'loggingContextProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtLoggingContextProvider' defined in ServletContext resource [/WEB-INF/applicationContext-multiTenancy.xml]: Cannot resolve reference to bean 'loggingEventsService' while setting bean property 'loggingService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loggingEventsService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'routingMapPro' defined in ServletContext resource [/WEB-INF/applicationContext-audit.xml]: Cannot resolve reference to bean 'accessService' while setting constructor argument with key [TypedStringValue: value [com.jaspersoft.jasperserver.api.logging.access.domain.AccessEvent], target type [class java.lang.Class]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessService' defined in ServletContext resource [/WEB-INF/applicationContext-events-logging.xml]: Cannot resolve reference to bean 'internalUserAuthorityService' while setting bean property 'persistentUserResolver'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtUserAuthorityServiceTarget' defined in ServletContext resource [/WEB-INF/applicationContext-multiTenancy-security.xml]: Cannot resolve reference to bean 'defaultExternalUserProcessor' while setting bean property 'userProcessors' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultExternalUserProcessor' defined in ServletContext resource [/WEB-INF/applicationContext-multiTenancy-security.xml]: Cannot resolve reference to bean 'internalMultiTenancyService' while setting bean property 'multiTenancyService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internalMultiTenancyFacade' defined in ServletContext resource [/WEB-INF/applicationContext-multiTenancy.xml]: Cannot resolve reference to bean 'mtTenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtTenantService' defined in ServletContext resource [/WEB-INF/applicationContext-multiTenancy.xml]: Cannot resolve reference to bean 'pathTransformer' while setting bean property 'folderUriPathTransformer'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pathTransformer': Unsatisfied dependency expressed through field 'messages'; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'internalDashboardExecutorProducer' defined in ServletContext resource [/WEB-INF/applicationContext-pro-remote-services.xml]: Could not resolve parent bean definition 'internalReportExecutorProducer'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'internalReportExecutorProducer' available at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) . . . . Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pathTransformer': Unsatisfied dependency expressed through field 'messages'; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'internalDashboardExecutorProducer' defined in ServletContext resource [/WEB-INF/applicationContext-pro-remote-services.xml]: Could not resolve parent bean definition 'internalReportExecutorProducer'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'internalReportExecutorProducer' available at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330) ... 151 more Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'internalDashboardExecutorProducer' defined in ServletContext resource [/WEB-INF/applicationContext-pro-remote-services.xml]: Could not resolve parent bean definition 'internalReportExecutorProducer'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'internalReportExecutorProducer' available at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1361) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1302) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1075) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1345) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1302) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:518) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:495) at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:265) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1473) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1270) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ... 161 more Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'internalReportExecutorProducer' available at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:816) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1288) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1075) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1345) ... 174 more Resolution : Per above log error, bean "internalDashboardExecutorProducer" which is defined in file '/WEB-INF/applicationContext-pro-remote-services.xml' try to invoke parent bean definition 'internalReportExecutorProducer' but this bean is not present and because of which "No bean named 'internalReportExecutorProducer' available" message we see in log. This parent bean "internalReportExecutorProducer" should present in file "/WEB-INF/applicationContext-report-scheduling.xml". For reference purpose attached 'applicationContext-report-scheduling.xml' file from our local environment which contains below parent bean definition. <bean id="internalReportExecutorProducer" class="com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutorProducer"/> To analyze this further below steps can be carried out : 1) Make sure file "applicationContext-report-scheduling.xml" is present in your environment located at : "/WEB-INF/applicationContext-report-scheduling.xml" 2) As per error it looks like in you environment, parent bean "internalReportExecutorProducer" is missing, so kindly update file "/WEB-INF/applicationContext-report-scheduling.xml" to have below parent bean. For reference we attached this file from our local environment. <bean id="internalReportExecutorProducer" class="com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutorProducer"/> 3) Please restart jasperserver post file "/WEB-INF/applicationContext-report-scheduling.xml" update. applicationcontext-report-scheduling.xml
  6. Issue : In Jaspersoft Studio, customer would like to apply conditions for csv data using data adapter for csv file. e.g. : Below is the sample input CSV data year,month,moneth 2022,1,1000 2022,2,1500 2022,3,2000 2022,4,3000 2022,5,4000 and requirement is to only extract below records from csv files. year,month,money 2022,4,3000 2022,5,4000 Resolution Steps : With the help of writing query with csv connection is not possible to extract the csv data, as it needs table as dataset. However, with the help of filter expression condition it is possible to extract the data as per your need. Below are the steps to create csv connection for above mentioned sample data and extract the data for month '4' and '5'. 1) Create the CSV data adapter connection. Sample csv data file is attached (file_name : "sample_data.csv") Kindly find attached screenshot 'Create_csv_Conn.png' and 'Create_csv_Conn_2.png' which shows csv data connection details/properties created. 2) Post csv data adapter connection created, open the 'Dataset and Query Dailog' window and under 'Filter Expression' tab insert the condition like below e.g. in this case condition is like below : $F{month}.matches( "4" ) || $F{month}.matches( "5" ) Kindly refer to attached "02147655_1.png" where in 'Dataset and Query Dailog' window below condition is mentioned for month = '4' or '5' which will extract data for these 2 months only. 3) Once condition is provided then from 'Data preview' tab this can be tested to make sure it is working as expected. Kindly refer to attached "02147655_2.PNG" it shows data filtered as per extracted requirement. If you would like to include more month then you can use multiple logical OR (||) operand in condition. Sample jrxml file used in this case is attached. (file_name : "02147655_Test.jrxml") sample_data.csv 02147655_test.jrxml
  7. Issue : Scheduler report failing with below error. Error from log : 2022-09-21T15:27:21,017 ERROR SecureExceptionHandlerImpl,JasperServerScheduler_Worker-2:116 - The report could not be completed. An error occurred during its execution. 2022-09-21T15:27:21,018 ERROR ReportExecutionJob,JasperServerScheduler_Worker-2:327 - The report could not be completed. An error occurred during its execution. com.github.kklisura.cdt.launch.exceptions.ChromeProcessTimeoutException: Failed while waiting for chrome to start: Timeout expired! Chrome output: /tibco/install/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory. Cause : Chromium/Chromium dependencies libraries are not installed on JasperReport Server. Resolution Steps : There are couple of things to check for, in order to determine the exact cause of this error. Below are the steps to troubleshoot this issue. 1) With the help of below logger mode enable from UI, collect the jasperserver.log file by reproducing the issue. No need to restart the jasperserver as these are on fly changes from UI. Loggers to put into debug mode : Report execution logs : com.jaspersoft.jasperserver.remote.services.ReportExecution com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob com.github.kklisura.cdt.services.impl Report export logs : net.sf.jasperreports.web.servlets.AsyncJasperPrintAccessor Scheduler logs : org.quartz.JobPersistenceException org.quartz.impl.jdbcjobstore.JobStoreSupport com.jaspersoft.jasperserver.api.engine.scheduling.hibernate.HibernateReportJobsPersistenceService com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportJobsQuartzScheduler Additional Chrome and JDBC query logs : net.sf.jasperreports.chrome com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl net.sf.jasperreports.engine.query.JRJdbcQueryExecuter 2) Try to run the same report (which is failing with scheduler) from GUI using chrome browser having above loggers into debug mode and make sure through GUI report is running fine. In case of any error, need to analyze jasperserver.log file. 3) Verify supported chrome/chromium version is installed on jasperserver. Check platform support document and make sure chromium version is correct. From /usr/bin directory try to run command "chromium --version" to have chromium version output. 4) If in log below error appears then it indicates that, either chromium or its dependent libraries are missing. There might be many other dependencies libraries also missing. In such case, all missing libraries need to be installed for their operating system. Please check path "/tibco/install/chrome-linux/chrome" for libraries: libatk-1.0.so.0 and make sure it exists. Kindly make sure chrome installation is proper. e.g. : In this case for SUSE Linux enterprise 15 SP2 server, with the help of below command installed missing libraries. zypper install libatk-1_0-0 zypper install libatk-bridge-2_0-0 5) In Jasperserver context , verify properties "chrome.path" and "chrome.page.timeout" are configured correctly in 'js.config.properties' file. This file can be found at location : <Tomcat_Installed_Dir>webappsjasperserver-proWEB-INFjs.config.properties For additional property setting from 'js.config.properties' file, please refer below URL. https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v790/configuring-jasperreports-library#Configuring_a_JavaScript_Engine 6) Check if customer environment is having load balanced set up with multiple nodes. There is possibility that chromium is insalled on only one instance and on other instance it may not have installed and scheduler report might be executed from second instance where chromium is not installed in this also it will throw above error in log. In such cases, make sure that, chromium and its dependent libraries are installed on all the instance of load balanced set up.
  8. Issue : How to freeze the column header when preview the report in Jasper studio Resolution : To freeze the column header for table inside report follow below process. If you are using table in report then it is possible to freeze the column header by setting below property as 'true'. 1) Open the report containing table into Jaspersoft Studio. 2) You can click on table --> advance properties -> misc properties and set below 2 properties. <property name="net.sf.jasperreports.components.table.floating.header" value="true"/> <property name="net.sf.jasperreports.components.table.interactive" value="true"/> Kindly refer attached document. (file_name : "JSS_Column_header_freez.png")
  9. Issue : What is the xml syntax for sending multi-select values to a Jasper report parametervia API e.g. Jasper report has parameter "P_FUND" and below is the XML built to pass a single-select value to parameter. <parameters> <parameterValues> <entry> <key>P_FUND</key> <value><item>UMRP</item></value> </entry> </parameterValues> </parameters> In addition to above if more values like 'UWCA', 'AHGA' needs to pass to report parameter. Resolution : Below is the xml syntax for passing multi-select values to report parameter. <parameters> <parameterValues> <entry> <key>P_FUND</key> <value> <item>UMRP</item> <item>UWCA</item> <item>AHGA</item> </value> </entry> </parameterValues> </parameters>
  10. Issue : When tried to create domain in JasperReports server by selecting few tables from schema then getting below error. This error face only for few tables selection not all tables. Error Log : 2022-06-16T15:51:54,132 ERROR GenericExceptionMapper,http-nio-80-exec-9:89 - Unexpected error occurred. Can not find alias for java type: . java.lang.IllegalArgumentException: Can not find alias for java type: at com.jaspersoft.jasperserver.dto.common.JavaAliasConverter.toAlias(JavaAliasConverter.java:63) Cause : This Error "Can not find alias for java type" generally throws when some field/column from table database has different datatype than other table. Data belongs from that columns/fields might be unable convert into java readable object and because of which it might be throwing below error. Resolution : 1) Compare the table definition (which are unable to add) with other table which are added successfully and make sure that - is there any column has some other datatype than text which is different from those table which got successfully added into domain. 2) In "applicationContext-jdbc-metadata.xml" file, there are some datatype mapping is present. Make sure that column datatype mapping is available into this file or not. This is is present at location : <Tomcat_Installed_Directory>webappsjasperserver-proWEB-INF Bean name to check in "applicationContext-jdbc-metadata.xml" file : <bean name="jdbcMetaConfiguration" class="com.jaspersoft.jasperserver.api.engine.common.domain.JdbcMetaConfigurationImpl"> <property name="jdbc2JavaTypeMapping">
  11. Issue : HTML5 stacked bar chart grouped by month and by tenant having tenants value zero are showing up on the report. Zero values from staked bar chart needs to be removed. e.g. attached screenshot (Issue.png) has zero values in stacked bar chart which needs to be removed. Resolution : To remove zero values from stacked bar, below property need to be added. Kindly follow steps : 1) Open Jaspersoft Studio and navigate to below path : Go to Window -> Preferences -> Jaspersoft Studio -> Properties Search for "com.jaspersoft.jasperreports.highcharts.function.properties.allowed" and set this property to true (if this property already not present then kindly add it) 2) Edit Chart Properties -> Chart formatting -> Advanced Formatting -> plotOptions -> bar -> dataLabels -> formatter -> use expression and feed it the following function (make sure add below function in double quotes) : "function(){ if(this.y > 0) return this.y; }" Screenshot for the same attached. ( "Resolution.PNG" ) Result : After following resolution steps, zero values from stacked bar removed as per attached screenshot. ("Result.PNG")
  12. In order to export the reports from jasperserver via a web service we need an API tool to connect to the Jasper server. We can use the ‘Postman’ API or freely available ‘Advanced rest client’ API. Link to download Postman API : https://www.postman.com/downloads/ Link to download Advanced rest client API : https://install.advancedrestclient.com/install Once these API tools are installed, then try to make a connection to JRS with these tools. Make sure that JasperReport server is up and running. With get method from postman API try to send below request to server, if connection is successful then in response to below request server it return 200 OK code response with server information. http://localhost:8080/jasperserver-pro/rest_v2/serverInfo Fetch the report using V2 report service. Make a sample report available in the Jasper server to fetch it from the postman. With the below v2/reports service URL, try to fetch the report from JRS. Method : get URL : http://localhost:8080/jasperserver-pro/rest_v2/reports/public/userrpt_15032022.pdf –In the above URL use your reportname file which you want to access through API. Report will be visible like below. You can export it from the postman API tool. Steps to export Report using V2/export service Here with V2/export we need to use the post method and use the URL below. http://localhost:8080/jasperserver-pro/rest_v2/export/ It will ask for JRS credentials to connect to the server. Select basic authentication and put the JRS credentials. Also under the body tab you need to provide a parameter value, in the below screenshot “everything” is provided. You can refer to the web-service cookbook from community jaspersoft to check for further parameter values. So this will generate export_id, highlighted in blue in screenshot. To check the above export status use the URL below with export_id. Export_ID : deef7459-5f92-49f8-9571-684582e27f42 URL : http://localhost:8080/jasperserver-pro/rest_v2/export/deef7459-5f92-49f8-9571-684582e27f42/state It shows export status as successful in response. To download the report : Use the URL below with export_id to download the report. Method : get URL : http://localhost:8080/jasperserver-pro/rest_v2/export/deef7459-5f92-49f8-9571-684582e27f42/userrpt_15032022.pdf rest_jrs_-_google_docs.pdf
  13. Download and install “apache directory studio” as LDAP server. https://directory.apache.org/studio/downloads.html Post installing need to make connection - add the “ApacheDS 2.0.0” server under the “LDAP server” window of apache DS and start the server. Create the partition : Below are steps to create a partition in ApacheDS. Double click on LDAP server. (highlighted with black)Click on the partition box. (highlighted with blue)Click on Add button to add partition. (highlighted with green arrow)Provide the name to the partition. (highlighted with Yellow) Create Organization Unit : Create groups like users and AdminLDAP. Select class as “organizationalUnit” while creating groups. Assign users to the created group. Select class as “inetOrgPerson” while assigning users. Create a role like admin and assign a few users to this role. Select class as “groupOfUniqueNames” while assigning users. Configuration at Tomcat server : Copy file “sample-applicationContext-externalAuth-LDAP-mt.xml” from below directory <JS_Install_directory>samplesexternalAuth-sample-config and rename this file as “applicationContext-externalAuth-LDAP-mt.xml” and put it in web servers below path. <Tomcat_Install_path>webappsjasperserver-proWEB-INF Edit the “applicationContext-externalAuth-LDAP-mt.xml” to have external LDAP authentication. Connection to LDAP server Update bean “ldapContextSource” like below to have connection with LDAP server. Make sure LDAP is running. Update connection url, user id from LDAP server and password of corresponding user from LDAP server. <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource"> <constructor-arg value="ldap://localhost:10389/o=company"/> <!-- manager user name and password (may not be needed) --> <property name="userDn" value="uid=admin,ou=system"/> <property name="password" value="secret"/> </bean> Mention path for usersearch Update bean “ldapAuthenticationProvider” with role and group filter values from LDAP server. <bean id="ldapAuthenticationProvider" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSLdapAuthenticationProvider"> <constructor-arg> <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSBindAuthenticator"> <constructor-arg><ref bean="ldapContextSource"/></constructor-arg> <property name="userSearch" ref="userSearch"/> </bean> </constructor-arg> <constructor-arg> <bean class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSDefaultLdapAuthoritiesPopulator"> <constructor-arg index="0"><ref bean="ldapContextSource"/></constructor-arg> <constructor-arg index="1"><value></value></constructor-arg> <property name="groupRoleAttribute" value="cn"/> <property name="groupSearchFilter" value="(&(uniqueMember={0})(objectclass=groupofuniquenames))"/> <property name="searchSubtree" value="true"/> <!-- Can setup additional external default roles here <property name="defaultRole" value="LDAP"/> --> </bean> </constructor-arg> </bean User search with exact organization unit If we know organizational unit from which user belongs to then directly we can update it in bean ="userSearch" <bean id="userSearch" class="com.jaspersoft.jasperserver.api.security.externalAuth.wrappers.spring.ldap.JSFilterBasedLdapUserSearch"> <constructor-arg index="0"> <value>ou=users</value> </constructor-arg> <constructor-arg index="1"> <value>(uid={0})</value> </constructor-arg> <constructor-arg index="2"> <ref bean="ldapContextSource" /> </constructor-arg> <property name="searchSubtree"> <value>true</value> </property> </bean> Once this configuration is done then make sure Tomcat server restarted to apply these changes. Verification of external authentication : Login to JRS GUI with the user from the LDAP server which was created earlier. JRS will validate the user provided during login against the LDAP server, and if that user is present in LDAP with the correct password then it will create that same user in JRS with the default role as “Role_User”. This will be an external user. You can validate the same in the jasperserver database with the help of below query. Query : select * from jasperserver.jiuser; –externallyDefined this flag should be set to 1 as it is an external user.) [Attached document : JRS_Apache_DS_LDAP - Google Docs.pdf] jrs_apache_ds_ldap_-_google_docs.pdf
×
×
  • Create New...