JasperReportsIntegration 2.4.0 released

I have just released a new version of the JasperReportsIntegration toolkit. You can download version 2.4.0 here: http://www.opal-consulting.de/downloads/free_tools/JasperReportsIntegration/.

What are the main features?

It contains the following fixes or new features, the most
noteworthy certainly being the upgrade to the latest JasperReports
libraries 6.4.1.

  • FIX: #3939 – Built-in report functions not working due to
    missing library jasperreports-functions-$version.jar
  • FIX: #3940 – printerDiagnostics abort when supported
    attribute values cannot be retrieved for category
  • FEATURE: #3707 – Upgrade to JasperReports 6.4.1
  • FEATURE: #3941 – Support for timeZones (report parameter
    REPORT_TIME_ZONE)
  • FEATURE: #3942 – test.jrxml – list of user objects removed –
    timeZone displayed

    • in order to see a change here you have to copy the new
      version of the following files into your reports folder:

      • test.jasper
      • test.jrxml

In order to use the integration it is always best to look how the APEX test application implements the new features, also you can look at the package specification:

    
    /**  make a callout with utl_http to the j2ee container running the
    *   JasperReportsIntegration web application
    *   => return the results
    *
    * @param p_rep_name      name of the report (needs a name.jasper file deployed on the server)
    * @param p_rep_format    report format, e.g. pdf, rtf, etc, see constants
    * @param p_data_source   data source name, needs to be configured in J2EE application
    * @param p_out_filename  filename if the file should be downloaded
    * @param p_rep_locale    report locale setting, e.g. de_DE or en_US
    * @param p_rep_encoding  encoding, e.g. UTF-8
    * @param p_additional_params additional parameters, e.g.: p1=1&p2=2
    * @param p_print_is_enabled shall the report be sent to the printer directly?
    * @param p_print_printer_name  name or substring of printer name
    * @param p_print_media   media used, either the paper size or the tray
    * @param p_print_copies  number of copies to be printed
    * @param p_print_duplex  duplex printing?
    * @param p_print_collate sorting the print output?
    * @param p_save_is_enabled shall the generated file be saved on the server?
    * @param p_rep_time_zone "time zone" parameter for the execution of the report, 
                            a list of valid entries can be found here:
                            https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
                            E.g.: Europe/Berlin, UCT, US/Central, US/Pacific, 
                            Etc/Greenwich, Europe/London
    * @param p_save_filename filename for the file to be saved on the server 
    * 
    */
    PROCEDURE show_report (
        p_rep_name            IN   VARCHAR2 DEFAULT 'test',
        p_rep_format          IN   VARCHAR2 DEFAULT c_rep_format_pdf,
        p_data_source         IN   VARCHAR2 DEFAULT 'default',
        p_out_filename        IN   VARCHAR2 DEFAULT NULL,
        p_rep_locale          in   varchar2 default 'de_DE',
        p_rep_encoding        in   varchar2 default 'UTF-8',
        p_additional_params   in   varchar2 default null,
        p_print_is_enabled    in   boolean default false,
        p_print_printer_name  in   varchar2 default null,
        p_print_media         in   varchar2 default null,
        p_print_copies        in   number default 1,
        p_print_duplex        in   boolean default false,
        p_print_collate       in   boolean default false,
        p_save_is_enabled     in   boolean default false,
        p_save_filename       in   varchar2 default null,
        p_rep_time_zone       in   varchar2 default null
    );
    

or look at the J2EE application http://host:port/JasperReportsIntegration/ after you deployed it:

Screenshot of J2EE test application

Please comment here if you find any issues or any other features you might need … . If you find things that are broken please let me know quickly so that I can fix them.

Always trying to be better than yesterday,
~Dietmar.

51 replies
  1. Peter Chiu
    Peter Chiu says:

    Enhancement request
    @param p_rep_format report format, e.g. pdf, rtf, etc, see constants

    In iReport Designer, it allow Single Sheet XLS or Multiple Sheets XLS.
    If you can fix p_rep_format to support both format, that would be great.

    Reply
  2. Dennis Verdaasdonk
    Dennis Verdaasdonk says:

    We are using this now for 4 years in a multi tenant production server.
    it works very well never had any issues with the integration.
    Now upgraded development to this version, that will go live in December

    Reply
  3. Ben
    Ben says:

    Awesome work Dietmar – I have used the older version at several client sites along with APEX and it works brilliantly – great to be able to make use of the current version of Jasper.

    Thanks 🙂

    Reply
    • dietmaraust
      dietmaraust says:

      Hi Ben,

      totally love your feedback! Keep building cool stuff with it.

      Cheers,
      ~Dietmar.

      P.S.: Anything you were struggling with in particular … that I could change to make it easier for people to use?

      Reply
  4. Armen
    Armen says:

    Hello Dietmar,

    many, many thanks for your great work!!
    It is a super solution, which is used by many users every day very gladly.

    Thanks for your time :-).

    Reply
      • Armen
        Armen says:

        Hello Dietmar,

        not yet, I would gladly try to install the new version first in the TEST system. If I did not get it, I’ll get in touch with you.

        Reply
  5. Armen
    Armen says:

    Hello Dietmar,

    not yet, I would gladly try to install the new version first in the TEST system. If I did not get it, I’ll get in touch with you.

    Reply
  6. Simon Černuta
    Simon Černuta says:

    Hello Dietmar,

    Thank you for this great integration utility.

    The only feature we are missing is a plain text file export. It is usefull for simple data exchange between different systems and communication with low level hardware (uploading store scales with item name,price … information). Although CSV exporter can be used, some tweaking has to be done otherwise delimiters are added to resulting report.

    In short, we would need a JasperReport text exporter.

    Reply
      • Simon Černuta
        Simon Černuta says:

        Thank you Dietmar,

        Upon upgrade to new version (2.4.0) on server where my application is hosted (at Maxapex) I noticed that _repEncoding (for IBM852 charset) that worked on your previous version is not working any more.

        Simon

        Reply
        • dietmaraust
          dietmaraust says:

          Hi Simon,

          really strange. I haven’t changed anything there. Could you please send me the debug / logging output, especially the URL that gets generated for the Tomcat?

          Also, could you try to run the report using the encoding directly when accessing the J2EE application (don’t know whether you have access to it or not) .

          Please send me also a simplified test case to my email address. (dietmar.aust at opal-consulting.de). And a screenshot of what the result should look like.

          Thanks,
          ~Dietmar.

          Reply
  7. paul
    paul says:

    Hi
    We have been using your older version of product for many of our clients for more than 4 years.
    And never we had issues .Will test your product new version and shall get back.
    Currently based in Mumbai and Soon moving to germany
    Thanks again.
    Paul j

    Reply
  8. David Hubbard
    David Hubbard says:

    Hi Dietmar

    We have been using v2.1.0 very successfully for a while now running in Glassfish, and I’m in the process of checking out 2.4.0 for an upgrade.

    We are using jndi type datasource and came across a problem – which I have worked round – but I think it may trip others up.

    First off (for Glassfish) the jndiPrefix is different to out-of-the-box prefix setting i.e. Glassfish required “jdbc/”

    [application]
    configFileVersion=2.3.0
    #jndiPrefix=java:comp/env/jdbc/
    jndiPrefix=jdbc/

    For JNDI based resource the usual setting (working in previous version of JRI) is:
    [datasource:myapp]
    type=jndi
    name=myapp

    However this on it’s own gives an Exception on app restart

    Caused by: java.lang.NullPointerException
    at de.oc.integration.jasper.webapp.AppConfig.decryptPWD(Unknown Source)
    at de.oc.integration.jasper.webapp.AppConfig.processConfigFile(Unknown Source)
    at de.oc.integration.jasper.webapp.AppConfig.initialize(Unknown Source)
    at de.oc.integration.jasper.webapp.AppServletContextListener.contextInitialized(Unknown Source)
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5396)
    at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:743)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5965)
    … 26 more

    It looks to me like the optional encryption/decryption expects a password field specified in the datasource, which isn’t normally required for JNDI – my work-around is to include a “password” value in the jndi config e.g.

    [datasource:myapp]
    type=jndi
    name=myapp
    password=this-is-required-for-work-around

    This allows the app server to restart and I can now get test connection and test report working.

    Regards and thanks for the great software
    David

    Reply
  9. Bright
    Bright says:

    Hi Dietmar,

    I have installed JasperReportsIntegration2.4 , that works fine.
    I will encrypt the passwd in application.properties file with encryptPasswords.sh.

    I’m facing below errors:
    bin]$ ./encryptPasswords.sh /opt/oracle/JasperReportsIntegration2.4/conf/application.properties
    Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableException
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)

    How to resolve this issue?
    Best regards, Bright

    Reply
  10. Gaurav C
    Gaurav C says:

    Hi Dietmar…Good day to you.
    Am facing a strange issue off late…of getting no data in my Jasper Report even though it shows it correctly, both in iReport and JasperStudio. There are no errors either in the log files to indicate any issue.
    My configuration is as follows:
    Jasper Reports Integration v1.3 (we are having recurrent issues with version 2.4 of multiple classnofound exceptions)
    Open JDK 1.8
    APEX 5.1.2 (installed via OXAR).

    Your test report works correctly and shows me the list of tables in my schema.
    Any pointers would be greatly appreciated.

    Regds and Kudos once again on producing such a brilliant utility,
    Gaurav

    Reply
  11. Josep Coves
    Josep Coves says:

    Hi Dietmar,

    Great job!

    We’re facing a problem when trying to connect to an Oracle PDB with connection secured by SSL. Our connection string need to be through TNSNAMES (which has all security specified inside) and url should be oci like:

    url=jdbc:oracle:oci:@tnsmanes_entry

    But when we try to connect it raises “java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path” how can we force JasperIngration to use ocijdbc12 instead of 11? Do you have any other experiences using SSL connections?

    Any help will be appreciated!
    Thanks for your time!

    Reply
  12. Ata
    Ata says:

    Hi Dietmaraust

    I installed Apex5.1 with ords 3 and jasperreportsintegraion 1.3.0.2 in windows environment. I am facing a strange problem. I am able to run the reports from browser (directly) but unable to run through apex application. I have run acl and looks like there is no acl issue. please advise.

    Ata

    Reply
  13. Socrates
    Socrates says:

    Hi Dietmar,
    Great work, can the JasperRI do a loop (print multiple pages) until it meets a certain critiria ?
    Or can custom java logic be added?

    Reply
    • dietmaraust
      dietmaraust says:

      Hi Socrates,

      yes, you should be able to add custom java code. I made this work many years ago but don’t recall exactly.

      possibly you could create a dynamic end condition in JasperReports. Best would be to ask the question in the JasperReports forums.

      Cheers,
      ~Dietmar.

      Reply
  14. Imaan
    Imaan says:

    hi Dietmar

    i have followed all the steps and installed but when i click on test report from tomcat it give me following error
    Could not connect via JDBC: ORA-01017: invalid username/password; logon denied

    Description The server encountered an unexpected condition that prevented it from fulfilling the request.

    Exception

    java.lang.RuntimeException: Could not connect via JDBC: ORA-01017: invalid username/password; logon denied

    de.oc.utils.Utils.throwRuntimeException(Unknown Source)
    de.oc.db.ConnectionUtility.getConnection(Unknown Source)
    de.oc.integration.jasper.webapp.AppConfig.getConnection(Unknown Source)
    de.oc.integration.jasper.webapp.ReportWrapper.service(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Note The full stack trace of the root cause is available in the server logs.

    and on sample app apex verify steps at check 6 and 7 showing follwoing error
    Check 6: Is the data source “default” configured properly?
    Error occured: ORA-29273: HTTP request failed ORA-06512: at “SYS.UTL_HTTP”, line 1819 ORA-29269: HTTP server error 500 ORA-06512: at “SYS.HTTPURITYPE”, line 34

    We couldn’t make a successful connection to http://localhost:8888/JasperReportsIntegration/test?_dataSource=default.

    This can be ignored when the the parameter infoPageIsEnabled=false is set in the application.properties file. Then the J2EE server will respond with an 403 error code for security reasons.

    It seems like the data source default is not configured properly.
    Check 7: Does the test report return a result for the data source “default”?
    Error occured: ORA-29273: HTTP request failed ORA-06512: at “SYS.UTL_HTTP”, line 1819 ORA-29269: HTTP server error 500 ORA-06512: at “SYS.HTTPURITYPE”, line 34

    We couldn’t make a successful connection to http://localhost:8888/JasperReportsIntegration/report?_dataSource=default.

    It seems like the data source default is not configured properly.

    waiting please do reply thanx

    Reply
  15. marco
    marco says:

    parse error in line 2572/19: got “begin wwv_flow_api.set_region_column_width (
    p_id=>26311502713976717 + wwv_flow_api.g_id_offset,
    p_flow_id=>wwv_flow.g_flow_id,
    p_page_id=>4,
    p_plug_column_width=>’valign=top’); end;”, expected WHITELISTED_EXECUTE_IMMEDIATE_EXPRESSION

    import error

    Reply
    • dietmaraust
      dietmaraust says:

      Well, here we are actually hitting a bug (I guess due to the older compatibility mode setting in the app) https://community.oracle.com/thread/4173070.

      The workaround is simple, just install on the command line using sqlplus . You will probably want to change your environment in the session prior to installing the script:
      SQL> DECLARE
      2 l_workspace_id NUMBER;
      3 BEGIN
      4 l_workspace_id := APEX_UTIL.FIND_SECURITY_GROUP_ID (‘JRI_TEST’);
      5 apex_application_install.set_workspace_id (l_workspace_id);
      6 apex_application_install.generate_application_id;
      7 apex_application_install.set_schema(‘JRI_TEST’);
      8 END;
      9 /

      PL/SQL procedure successfully completed.

      SQL> @f121_JasperReportsIntegration-Test_2.5.0.0.sql
      For the next fix 2.5.0.1 I will make a version available which installs into 18.1 without problems.

      Also, I have created an updated version for 2.4.0.0 which you can find here: https://github.com/daust/JasperReportsIntegration/blob/master/src/apex/APEX%2018.1/f121_JasperReportsIntegration-Test_2.4.0.0.sql

      Reply
  16. marco
    marco says:

    arse error in line 2572/19: got “begin wwv_flow_api.set_region_column_width (
    p_id=>26311502713976717 + wwv_flow_api.g_id_offset,
    p_flow_id=>wwv_flow.g_flow_id,
    p_page_id=>4,
    p_plug_column_width=>’valign=top’); end;”, expected WHITELISTED_EXECUTE_IMMEDIATE_EXPRESSION

    Reply
  17. Josep Coves
    Josep Coves says:

    Hi Dietmar!

    Thanks for your great job!
    We’re facing a session issue, it seems sessions are no properly closed after generating PDF reports. Have you faced this problem earlier?

    Thanks

    Reply
  18. Milan
    Milan says:

    Hi Dietmar…Good day to you.

    My configuration is as follows:
    Jasper Reports Integration v2.4
    APEX 18.2
    From time to time,
    I’m facing below errors:

    HTTP Status 500 – Internal Server Error

    Type Exception Report

    Message Could not connect via JDBC: IO Error: Got minus one from a read call, connect lapse 24 ms., Authentication lapse 0 ms.

    Description The server encountered an unexpected condition that prevented it from fulfilling the request.

    Exception

    java.lang.RuntimeException: Could not connect via JDBC: IO Error: Got minus one from a read call, connect lapse 24 ms., Authentication lapse 0 ms.
    de.oc.utils.Utils.throwRuntimeException(Unknown Source)
    de.oc.db.ConnectionUtility.getConnection(Unknown Source)
    de.oc.integration.jasper.webapp.AppConfig.getConnection(Unknown Source)
    de.oc.integration.jasper.webapp.ReportWrapper.service(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

    Note The full stack trace of the root cause is available in the server logs.
    Apache Tomcat/9.0.8

    Any help will be appreciated!
    Thanks for your time!

    Reply
  19. Satyajit Sinha
    Satyajit Sinha says:

    Hi Dietmaraust,
    Great work !! You have helped a lot of people using Jasper Reports as an interface from Oracle Apex.
    I am having an issue when adding values to p_save_is_enabled and p_save_filename parameters. The contenty type is changing from ‘text/html’ even though I am entering pdf. If I don’t enter the above 2 parameters then the content type is ‘application/pdf’ hence generating the pdf’s correctly.
    Can you please help?

    Reply
  20. Dennis
    Dennis says:

    I’m having an issue where the font size is not being honored when you run it.
    Also is it possible to store the reports files as apex static files?
    Thanks!!!

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *