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

g.den.breejen

Members
  • Posts

    5
  • 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 g.den.breejen

  1. For a customer we need to decrypt stored data to show on the Jaspersoft report using a JAVA function that performs the decryption. The report language is set to "groovy", used version Jaspersoft report server 6.2. It works on older versions like 4.7.1 as well, as done earlier in the project. The utils.java.helpers.jar is put in both the classpath of Jaspersoft Studio (or iReport when JS 5.5 or older is used) and in the lib folder of the deployed WAR file in Tomcat. To call a JAVA function, create a field and add an expression like the exxample below: new GroovyClassLoader().parseClass(''' def static decryptCPR(String cpr, String meteringPoint, String envKey) { String decryptedKey = utils.java.helpers.CryptoLib.decryptCPR(cpr, meteringPoint, envKey); return decryptedKey; }''').decryptCPR($F{FIRST_CONSUMER_CPR}, $F{MPO_METERING_POINT_ID}, $P{P_ENV_KEY} )
  2. Hi,For most databases a compressed report content is possible either by altering the table after the jasperserver database schema is created or by editing de ddl files in the buildomaticinstall_resourcessql..database product..js-pro-create.ddl file. For example consider the following scenario for Oracle and JasperReports 4.7.1 1) Open the file js-pro-create.ddl in the installation folder of JasperReports that is located in: buildomaticinstall_resourcessqloracle 2) Search for the definition for the table JIContentResource. in that table the report output will be stored. It has the following defition: create table JIContentResource ( id number(19,0) not null, data blob, file_type nvarchar2(20), primary key (id) ); 3) Change the definition of the "data blob" column and add a clause to enable compression as given below: create table JIContentResource ( id number(19,0) not null, data blob, file_type nvarchar2(20), primary key (id) ) LOB (data) STORE AS SECUREFILE (TABLESPACE USERS COMPRESS HIGH); It is also possible to migrate an existing table to a compressed one. In that case create a new table with compression and move the data to that new table as in the script given below. Always perform a backup before doing this! create table jasperserver47.JIContentResource2 ( id number(19,0) not null, data blob, file_type nvarchar2(20), primary key (id) ) LOB (data) STORE AS SECUREFILE (TABLESPACE USERS COMPRESS HIGH); insert into jasperserver47.JIContentResource2 select * from jasperserver47.JIContentResource; commit; drop TABLE jasperserver47.JIContentResource; alter TABLE jasperserver47.JIContentResource2 rename to JIContentResource; Also other databases such as mysql have options to save binary large object (blob) data as compressed data. I hope this helps, if you need more suggestions feel free to respond. Best regards, Guus den Breejen
  3. Hi, In Oracle 11g it is possible to call the API directly from Oracle using UTL_HTTP.REQUEST and we are using that way to schedule reports from the database. First we created an Access Control List (ACL) to enable Oracle to access the JasperReports server. Then we created a PL/SQL package that set up the url with the parameters needed for calling the API and then perform a UTL_HTTP.REQUEST. The response is saved using "into" so a API call from PL/SQL will look like this: SELECT UTL_HTTP.REQUEST(v_serveraddress || 'jasperserver-pro/services/ReportScheduler=' || Parameter List) INTO l_response FROM dual; The response is checked for any error. I hope this will help to interact with Jasperreports from Oracle db. Insert directly a scheduled job into the JS tables did not work: the job was never processed. If you need further information, I can post some details and examples. Best regards, Guus den Breejen
  4. Hi In our test environment we upgraded our JasperServer Pro from 4.1.0 to JS 4.7.1 with the same functionality like external authentication arranged by CAS. Before we applied the CAS configuration into the applicationContext-security.xml and applicationContext-security-web.xml, we have access to all screens when log in as superuser. We use only organization_1 (no multi tenancy) in our environment. Then we configured the CAS authentication successfully and I am able to redirect to the home flow at /jasperserver-pro/flow.html?_flowId=homeFlow. But all of the other links throws the null pointer exception given in the logging and first line is given here: java.lang.NullPointerException at com.jaspersoft.jasperserver.multipleTenancy.security.MTAcegiSecurityContextProvider.getContextUser(MTAcegiSecurityContextProvider.java:55) It is the same issue as posted above and we are able to fix this after raising a service request to Jaspersoft for which they give a hotfix. Details of the hotfix are given below (copied from "readme_hotfix_JSPro4.7.0HOTFIX_29226.txt"): This hotfix should be applied to JasperServer Pro version 4.7.1. It addresses bug 29226, support case 28608 (+3).The customers are no longer able to configure CAS per Authentication Cookbook.There is a NullPointerException at server startup and a LazyInitializationExceptionafter the former error is resolved and the user tries to go to repository. To apply the hotfix:* Stop the application server* Find the root web application folder (e.g. webappsjasperserver-pro)* Make a back-up copy of jasperserver-pro to a new, separate location* Extract files (with full paths) from the hotfix to the root web application folder * Start the application server Can you check if this hotfix also helps in your case? Please submit a case to Jaspersoft support and refer to the hotfix above. Best regards,Guus
×
×
  • Create New...