Menu

java.lang.NullPointerException

2016-06-12
2016-06-28
  • ENTWICKLERWERK

    ENTWICKLERWERK - 2016-06-12

    Good day All

    I'm trying to get the JR-PrintServer up and running, but run into some problems:

    When I try to open the app directly via "http://192.168.2.20:8080/jrpserver/" or call via APEX ... Tomcat throws always the following error:

    java.lang.NullPointerException
        at java.io.File.<init>(Unknown Source)
        ...
    

    The message gives no indication if this is a default error because thats the app wants some required parameters or if its a in-depth JAVA/Tomcat problem. (tried also with Tomcat 7 and JAVA 7)

    Servers running (all on the same host):

    • Windows 2012 R2
    • Oracle 11g
    • APEX 5.0.3
    • Tomcat 8
    • JAVA 8

    Current configuration:

    • Tomcat: deployed "jrpserver.war"
    • Tomcat: configured report path under "jrpserver/WEB-INF/classes/net/sf/jasperreports/printserver" (complete restart)
    • APEX: configured reporting server under ADMIN
    • APEX: created Report Query ... generated print URL: f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=test-invoice (static Jasper Report sample exists under the report path)
    • APEX: created Report Layout with Generic Columns and referenced test-invoice.jasper

    I would appreciate to get some ideas.

    BR
    Sebastian

     
  • ENTWICKLERWERK

    ENTWICKLERWERK - 2016-06-14

    Hi Michael

    Yes of course, I've worked through your german document. There where some good hints.

    I'm using the 2.5.1 of JR Printserver.

    Here is my actual stack dump:

    Error
    The following error occured during Report creation:
    java.lang.NullPointerException
        at java.io.File.<init>(Unknown Source)
        at net.sf.jasperreports.engine.util.JRResourcesUtil.resolveFile(JRResourcesUtil.java:292)
        at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:102)
        at net.sf.jasperreports.repo.InputStreamPersistenceService.load(InputStreamPersistenceService.java:45)
        at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:149)
        at net.sf.jasperreports.repo.SerializedObjectPersistenceService.load(SerializedObjectPersistenceService.java:48)
        at net.sf.jasperreports.repo.SerializedReportPersistenceService.load(SerializedReportPersistenceService.java:40)
        at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:149)
        at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation(RepositoryUtil.java:144)
        at net.sf.jasperreports.printserver.JRWorker.loadReport(JRWorker.java:109)
        at net.sf.jasperreports.printserver.JRWorker.work(JRWorker.java:212)
        at net.sf.jasperreports.printserver.PrintServlet.processRequest(PrintServlet.java:93)
        at net.sf.jasperreports.printserver.PrintServlet.doGet(PrintServlet.java:113)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1102)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:788)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1485)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
    

    BR
    Sebastian

     
    • Michael

      Michael - 2016-06-14

      Hi Sebastian,

      OK, now with the complete stacktrace it's clear:
      The exception is thrown when JR PrintServer tries to load the jasper file from the reports path.
      But the content of the Report Layout which should contain the (relative) file name of the jasper file is (or evaluates to) null.
      This happens for example for the following Report Layout:

      <template>
        <report><value></value></report>
        <!-- Other stuff may follow -->
      </template>
      

      So, the value of /template/report/value is null. And this null causes then the NullPointerException.

      To analyse futher: Can you provide the Report Layout that you are using?

      Regards,
      Michael

       
  • ENTWICKLERWERK

    ENTWICKLERWERK - 2016-06-16

    Hi Michael

    Here is some of my current config:

    Report Layout:

    <template>
      <xmlLocale>
        <value>de_DE</value>
      </xmlLocale>
      <xmlTimeZone>
        <value>+09:00</value>
      </xmlTimeZone>
      <report>
        <value>ew-test.jasper</value>    
      </report>
      <dateFormat>
        <value><![CDATA[yyyy MM dd HH mm ss SSS]]></value>    
      </dateFormat>
    </template>
    

    Report Query:

    Report Path (jrpserver\web-inf\classes\configuration.xml):

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <reportsPath><path><![CDATA[c:\app\MYREPORTS]]></path></reportsPath>
    </configuration>
    

    BR
    Sebastian

     
    • Michael

      Michael - 2016-06-16

      Hi Sebastian,

      thanks for the additional infos.

      Looking at your Report Layout and your configuration.xml JR PrintServer should look for your report file as "c:\app\MYREPORTS\ew-test.jasper".
      It's strange that we get a NullPointerException because in your Report Layout /tempate/report/value is "ew-test.jasper".
      If JR PrintServer would NOT find the file it would throw a ResourceNotFoundException (or similiar) exception.
      So, I still think that - for what ever reason - the Report Layout that JR PrintServer gets is somehow wrong.
      We will definitly find out what's wrong, but we'll have to do some further tests.

      First, access the following URL to see the status of your JR PrintServer:

      http://192.168.2.20:8080/jrpserver/info

      This will generate an HTML page with lots of information - take a look at the upper part were the configured Reports Path are reported and tested, if they can be accessed.

      Then, let's start a JR PrintServer run without APEX.
      Access: http://192.168.2.20:8080/jrpserver/test.html

      Here paste some sample XML data into the first text area. (You may use the content of the sample XML from APEX.)
      Then paste your XML of the Report Layout (i.e. template) into the second text area.
      (Delete the existing content of this text area - it contains initially a very complex empty dummy template.
      You can take a look at this - it gives you an idea what you can do with the Report Layout/template...)

      Then click on the Submit button to call JR PrintServer.
      Now, we have initiated an HTTP-POST call just as APEX would do it - but here we know exactly what gets submitted to JR PrintServer.

      Let's see if this works.

      Additionally you may activate the logging. In .../jrpserver/WEB-INF/classes you will find a file called "logging.properties".
      Here you can change the log level of some classes, for example you can uncomment (remove the hash) the following lines:

      net.sf.jasperreports.printserver.Request.level=FINEST
      net.sf.jasperreports.printserver.util.HttpRequest.level=FINEST
      

      Then shutdown/start Tomcat, execute a report run and take a look into the jrpserver.log file(s) in Tomcats logs directory.
      Here you can see exactly what JR PrintServer gets from its client (APEX or test.html).

      Regards,
      Michael

       

      Last edit: Michael 2016-06-16
  • ENTWICKLERWERK

    ENTWICKLERWERK - 2016-06-17

    Good morning Michael

    The report path is configured correctly and system services has full access rights.
    UAC temp. deactivated.
    Tomcat started with "as admin".

    Here is my log output for the manual test through "test.html":

    2016-06-17 09:28:52.159 [38] net.sf.jasperreports.printserver.PrintServlet processRequest - INFORMATION: Report run started
    2016-06-17 09:28:52.159 [38] net.sf.jasperreports.printserver.Request extractEnvironment - AM FEINSTEN: Extracting Environment from: /print
    2016-06-17 09:28:52.159 [38] net.sf.jasperreports.printserver.util.HttpRequest <init> - FEIN: Character encoding is not set, setting it to UTF-8
    2016-06-17 09:28:52.159 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Protocol: HTTP/1.1
    2016-06-17 09:28:52.159 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Request URL: http://192.168.2.2:8080/jrpserver/
    2016-06-17 09:28:52.159 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Request URI: /jrpserver/
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Context Path: /jrpserver
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Servlet Path: /print
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Path Info: null
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - FEIN: Query String: null
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - AM FEINSTEN: Request parameter template, index 0:
    <template>
      <xmlLocale>
        <value>de_DE</value>
      </xmlLocale>
      <xmlTimeZone>
        <value>+09:00</value>
      </xmlTimeZone>
      <report>
        <value>ew-test.jasper</value>    
      </report>
      <dateFormat>
        <value><![CDATA[yyyy MM dd HH mm ss SSS]]></value>    
      </dateFormat>
    </template>
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - AM FEINSTEN: Request parameter environment, index 0:
    
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - AM FEINSTEN: Request parameter xml, index 0:
    <?xml version="1.0" encoding="UTF-8"?>
    <DOCUMENT>
      <DATE>06/17/2016</DATE>
      <USER_NAME>SEBASTIAN</USER_NAME>
      <APP_ID>103</APP_ID>
      <APP_NAME>Oracle APEX AppBuilder</APP_NAME>
      <TITLE>ew-test</TITLE>
      <REGION ID="0">
        <ROWSET>
          <ROW>
            <SYSDATE>06/17/2016</SYSDATE>
          </ROW>
        </ROWSET>
      </REGION>
    </DOCUMENT>
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.Request logRequest - AM FEINSTEN: Request parameter _xf, index 0:
    pdf
    2016-06-17 09:28:52.175 [38] net.sf.jasperreports.printserver.util.HttpRequest getDocument - AM FEINSTEN: Creating XML Document for Parameter "xml"
    2016-06-17 09:28:52.253 [38] net.sf.jasperreports.printserver.util.HttpRequest getDocument - AM FEINSTEN: Creating XML Document for Parameter "template"
    2016-06-17 09:28:52.300 [38] net.sf.jasperreports.printserver.Request logCall - INFORMATION: Environment: n/a
    2016-06-17 09:28:52.300 [38] net.sf.jasperreports.printserver.Request logCall - INFORMATION: Application Id: 103, Application Name: Oracle APEX AppBuilder, User: SEBASTIAN
    2016-06-17 09:28:52.315 [38] net.sf.jasperreports.printserver.Configuration getConfigurationSchema - INFORMATION: Loading Configuration Schema "configuration.xsd"
    2016-06-17 09:28:52.417 [38] net.sf.jasperreports.printserver.Configuration getExternalConfiguration - INFORMATION: Loading external configuration file "C:\Windows\system32\config\systemprofile\configuration_jrpserver.xml"
    **2016-06-17 09:28:52.417 [38] net.sf.jasperreports.printserver.Configuration getExternalConfiguration - WARNUNG: Cannot access configuration file "C:\Windows\system32\config\systemprofile\configuration_jrpserver.xml"
    java.io.FileNotFoundException: C:\Windows\system32\config\systemprofile\configuration_jrpserver.xml (Das System kann die angegebene Datei nicht finden)**
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at net.sf.jasperreports.printserver.util.xml.Xerces.parse(Xerces.java:168)
        at net.sf.jasperreports.printserver.Configuration.getExternalConfiguration(Configuration.java:86)
        at net.sf.jasperreports.printserver.Configuration.getConfigurationDocument(Configuration.java:107)
        at net.sf.jasperreports.printserver.Configuration.<init>(Configuration.java:59)
        at net.sf.jasperreports.printserver.Worker.<init>(Worker.java:37)
        at net.sf.jasperreports.printserver.JRWorker.<init>(JRWorker.java:65)
        at net.sf.jasperreports.printserver.PrintServlet.processRequest(PrintServlet.java:91)
        at net.sf.jasperreports.printserver.PrintServlet.doPost(PrintServlet.java:117)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1102)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:788)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1485)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
    2016-06-17 09:28:52.417 [38] net.sf.jasperreports.printserver.Configuration loadInternalConfiguration - INFORMATION: Loading internal configuration file "configuration.xml"
    2016-06-17 09:28:52.433 [38] net.sf.jasperreports.printserver.JRTemplate getTemplateSchema - INFORMATION: Loading Template Schema "template.xsd"
    2016-06-17 09:28:52.464 [38] net.sf.jasperreports.printserver.JRWorker loadReport - INFORMATION: Loading report "ew-test.jasper"
    2016-06-17 09:28:52.848 [38] net.sf.jasperreports.printserver.JRWorker work - INFORMATION: Filling report "ew-test.jasper"
    2016-06-17 09:28:53.297 [38] net.sf.jasperreports.engine.query.JRJdbcQueryExecuter <init> - WARNUNG: The supplied java.sql.Connection object is null.
    2016-06-17 09:28:53.313 [38] net.sf.jasperreports.printserver.JRWorker work - INFORMATION: Exporting report "ew-test.jasper"
    2016-06-17 09:28:53.417 [38] net.sf.jasperreports.printserver.PrintServlet processRequest - INFORMATION: Sending PDF report to client (916 bytes)
    2016-06-17 09:28:53.433 [38] net.sf.jasperreports.printserver.PrintServlet processRequest - INFORMATION: Report run finished
    

    Just got an empty PDF (not my Jasper Report which includes some static dummy text).

    BR
    Sebastian

     
    • Michael

      Michael - 2016-06-17

      Hi Sebastian,

      now with test.html we see that the template parameter in fact contains "ew-test.jasper" in /template/report/value.
      The next question is: Is it also there when you execute the report from APEX? (The same stuff should be logged.)

      So, in your test with test.html the report file could be loaded and executed.
      Then you only get an empty PDF - this is the case because your report uses a SQL query as its Data Source and hence needs a SQL Connection to query.
      But JR PrintServer does not provide a SQL Connection to the report - it provides a Data XML Document, so your report should NOT use SQL as its query language but xPath to "query" the XML.
      You can change this on JSS when you right click on the report node and select "Dataset and Query...".
      For your test report you may enter here as Query the xPath expression "/" (just a slash to "produce" one row).

      Regards,
      Michael

       
  • ENTWICKLERWERK

    ENTWICKLERWERK - 2016-06-28

    Hello Michael

    Sorry for the delay - holidays! ;-)

    Okay that was a good no-data idea for the report. Fixed.

    Now I can successfully print a report through the Shared-Components/Report Queries/ew-test/Test Report. Got a valid PDF. Happy it works!

    Further I tried to get this reproducable with PL/SQL code. But got a error message from my browser:

    Error: parsererror - SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    

    This procedure would be called with a button click:

    declare
      l_blob blob;  
    begin
      l_blob := apex_util.get_print_document(p_application_id    => '103',
                                             p_report_query_name => 'ew-test');
    
      jrpserver.download(l_blob, 'ew-test', 'pdf');
      apex_application.stop_apex_engine;
    end;
    

    APEX debug log:

    Elapsed,"Execution","Message","Level"   
    0.01600,"0.00000","R E Q U E S T ajax plugin","4"   
    0.01600,"0.00000","Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: de","4"  
    0.01600,"0.00000","alter session set nls_language='GERMAN' nls_territory='GERMANY'","4" 
    0.01600,"0.00000","NLS: CSV charset=WE8MSWIN1252","4"   
    0.01600,"0.00000","...NLS: Set Decimal separator="",""","4" 
    0.01600,"0.00000","...NLS: Set NLS Group separator="".""","4"   
    0.01600,"0.00000","...NLS: Set g_nls_date_format=""DD.MM.RR""","4"  
    0.01600,"0.00000","...NLS: Set g_nls_timestamp_format=""DD.MM.RR HH24:MI:SSXFF""","4"   
    0.01600,"0.00000","...NLS: Set g_nls_timestamp_tz_format=""DD.MM.RR HH24:MI:SSXFF TZR""","4"    
    0.01600,"0.00000","NLS: Language=de","4"    
    0.01600,"0.00000","Application 103, Page Template: 12070764821148203","4"   
    0.01600,"0.00000","Authentication check: Application Express Authentication (NATIVE_APEX_ACCOUNTS)","4" 
    0.01600,"0.00000","...fetch session state from database","4"    
    0.01600,"0.00000","fetch items (exact)","4" 
    0.01600,"0.00000","... sentry+verification success","4" 
    0.01600,"0.00000","...Session ID 16210979895266 can be used","4"    
    0.01600,"0.00000","...Setting session time_zone to +02:00","4"  
    0.01600,"0.00000","...Check for session expiration:","4"    
    0.01600,"0.00000","Run NATIVE/PLUGIN= request","4"  
    0.01600,"0.21800","...Execute Statement: begin declare  
      l_blob blob     
    begin   
      l_blob := apex_util.get_print_document(p_application_id    => '103',  
                                             p_report_query_name => 'ew-test')  
    
      jrpserver.download(l_blob, 'ew-test', 'pdf')  
      apex_application.stop_apex_engine 
    end 
    end ,4"
    0.23400,"0.00000","Stop APEX Engine detected","4"   
    0.23400,"0.00000","...Error data:","2"  
    0.23400,"0.00000","......message: AJAX call returned server error ORA-20876: Stop APEX Engine for Execute PL/SQL Code.","2" 
    0.23400,"0.00000","......is_internal_error: true","2"   
    0.23400,"0.00000","......apex_error_code: APEX.AJAX_SERVER_ERROR","2"   
    0.23400,"0.00000","......ora_sqlcode: -20876","2"   
    0.23400,"0.00000","......ora_sqlerrm: ORA-20876: Stop APEX Engine","2"  
    0.23400,"0.00000","......error_backtrace: ORA-06512: in ""APEX_050000.WWV_FLOW"", Zeile 2945    
    ORA-06512: in Zeile 8   
    ORA-06512: in ""SYS.DBMS_SYS_SQL"", Zeile 1815  
    ORA-06512: in ""SYS.WWV_DBMS_SQL"", Zeile 1033  
    ORA-06512: in ""SYS.WWV_DBMS_SQL"", Zeile 1047  
    ORA-06512: in ""APEX_050000.WWV_FLOW_DYNAMIC_EXEC"", Zeile 895  
    ORA-06512: in ""APEX_050000.WWV_FLOW_PLUGIN_UTIL"", Zeile 2542  
    ORA-06512: in ""APEX_050000.WWV_FLOW_DYNAMIC_ACTION_NATIVE"", Zeile 456 
    ,2" 
    0.23400,"0.00000","......error_statement: begin declare 
      l_blob blob     
    begin   
      l_blob := apex_util.get_print_document(p_application_id    => '103',  
                                             p_report_query_name => 'ew-test')  
    
      jrpserver.download(l_blob, 'ew-test', 'pdf')  
      apex_application.stop_apex_engine 
    end 
    end ,2"
    0.23400,"0.00000","......component.type: APEX_APPLICATION_PAGE_DA_ACTS","2" 
    0.23400,"0.00000","......component.id: 5785403189263942","2"    
    0.23400,"0.00000","......component.name: NATIVE_EXECUTE_PLSQL_CODE","2" 
    0.23400,"0.00000","Stop APEX Engine detected","4"   
    0.23400,"-","Final commit","4"  
    

    BR
    Sebastian

     
    • Michael

      Michael - 2016-06-28

      Hi Sebastian,

      nice to hear that we are moving forward.

      Now to your button: make sure that the button submits the page so that you get into the Page Processing of your page.
      There you should define a PL/SQL process. I would code it this way:

      declare
        l_blob blob;
      begin
        l_blob := apex_util.get_print_document(
                    p_application_id    => :APP_ID, /* Never hard code an application id */
                    p_report_query_name => 'ew-test');
        --
        jrpserver.download(l_blob, 'ew-test', jrpserver.pdf /* Better to use the defined constant */);
        apex_application.stop_apex_engine;
      end;
      

      Now when you click the button the page should get submitted and as a reply you should get a File Save dialog or your browser may be able to display the produced PDF directly.

      I suppose that you get the JSON error because for whatever reason your button did not submit. Moreover, don't use a Dynamic Action that executes PL/SQL code on button click here to download the document - unfortunately, this does not work (your APEX log looks like that).

      Regards,
      Michael

       

      Last edit: Michael 2016-06-28
  • ENTWICKLERWERK

    ENTWICKLERWERK - 2016-06-28

    Ups have forgotten the Tomcat log - still looks good? But the file save dialog not comes up ...

    2016-06-28 12:22:43.341 [44] net.sf.jasperreports.printserver.Configuration loadInternalConfiguration - INFORMATION: Loading internal configuration file "configuration.xml"
    2016-06-28 12:22:43.341 [44] net.sf.jasperreports.printserver.JRWorker loadReport - INFORMATION: Loading report "ew-test.jasper"
    2016-06-28 12:22:43.357 [44] net.sf.jasperreports.printserver.JRWorker work - INFORMATION: Filling report "ew-test.jasper"
    2016-06-28 12:22:43.372 [44] net.sf.jasperreports.printserver.JRWorker work - INFORMATION: Exporting report "ew-test.jasper"
    2016-06-28 12:22:43.388 [44] net.sf.jasperreports.printserver.PrintServlet processRequest - INFORMATION: Sending PDF report to client (6224 bytes)
    2016-06-28 12:22:43.388 [44] net.sf.jasperreports.printserver.PrintServlet processRequest - INFORMATION: Report run finished
    

    BR
    Sebastian

     
    • Michael

      Michael - 2016-06-28

      Yes, this Tomcat log looks just fine.
      Please see also my further comments above.

       

      Last edit: Michael 2016-06-28

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.