daust / JasperReportsIntegration

JasperReportsIntegration provides an interface to use the JasperReports reporting engine in an Oracle database application, specifically with Oracle Application Express (Oracle APEX).
BSD 3-Clause "New" or "Revised" License
55 stars 25 forks source link

java.lang.RuntimeException: Error compiling #72

Closed zulqarnainhabib closed 3 years ago

zulqarnainhabib commented 3 years ago

Hello

We have setup a new server with Jasper Integration Kit 2.7. Previously we were using 2.3-beta where Jasper Reports version was 6.1.1. All our reports were created using Jasper Studio 6.1.1.

After copying all the reports to the new server a few reports throw following error:

java.lang.RuntimeException: Error compiling /opt/JasperReportsIntegration/reports/myreport.jrxml: Error saving file: /opt/JasperReportsIntegration/reports/myreport.jasper. de.oc.jasper.ReportUtilities.compileJRXMLIfNecessary(ReportUtilities.java:117) de.oc.integration.jasper.webapp.ReportWrapper.service(ReportWrapper.java:182) javax.servlet.http.HttpServlet.service(HttpServlet.java:733) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

I wonder why it happens to only a very few reports? If we compile those reports with Jasper Studio 6.16 it starts working fine.

Since the number of reports is in thousands, it is difficult to find which reports have this issue and recompile .

Any help would be much appreciated.

Regards,

Zulqarnain

daust commented 3 years ago

Well, this seems to be a privilege error I assume.

JRI comes with a new feature #2 , to compile the .jasper version based on the .jrxml file on the fly. It checks the timestamps and whether a .jrxml file exists.

So, in some cases the .jrxml file is newer than the .jasper file with the same name. Then it tries to recompile on the fly. I assume the Tomcat process does not have the privileges to save the file in that directory. Can you check that please?

When you turn on debugging, you might be able to see something more in the catalina.log file.

zulqarnainhabib commented 3 years ago

Thanks @daust

I wasn't aware of the feature. Yes it was an issue with the privileges on the directory were the reports are stored.

When you turn on debugging, you might be able to see something more in the catalina.log file.

Sorry if it is a very stupid question. Can you please let me know how debugging is enabled?

daust commented 3 years ago

Sure, you can find it here: https://github.com/daust/JasperReportsIntegration#faq

Glad, you have it working now.

zulqarnainhabib commented 3 years ago

Thanks a lot.