Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Frequent Could not connect via JDBC while running JasperReports #3

ajitabhpandey · · author


I am getting the following JDBC error while running JasperReportsIntegration report. A restart of tomcat fixes it. I am suspecting that I may be running out of JDBC connections, but I am not sure how to fix that or increase the JDBC connections. There are only two tomcat webapps running on the server - ORDS and JasperReportsIntegration.

java.lang.RuntimeException: Could not connect via JDBC: IO Error: Got minus one from a read call, connect lapse 38 ms., Authentication lapse 0 ms.

JasperReportsIntegration version is 2.4 and am running Tomcat 7.x. The entire system is installed using OXAR so all components - Oracle, APEX, ORDS, Apache, Tomcat are on the same system.

Worth noting is that I have not faced this issue with ORDS which is more heavily used than JasperReportsIntegration.

  • replies 4
  • views 1.6K
  • likes 0
Dietmar Aust daust · · moderators

Hi @ajitabhpandey,

did you ever solve this issue?
I have just (pre-)released a new version which includes the latest ojdbc drivers. This might solve your issues.


daust added the waiting for reply from reporter label
ajitabhpandey · · author

No, this was never solved. We have now moved to 18x XE Stack. The need for restart is still there....

We do need to restart Tomcat once/twice in a day and JasperReportsIntegration seems to be causing this. All we see in the logs is 500 when the reports are run. A tomcat restart, followed by a browser reload of report URL fixes it.

I am suspecting we are running out of connections which JasperReportsIntegration uses. One thing which wonders me is how to do connection pooling with JasperReports. ORDS has a conf file to specify min / max connections to the database. How does JasperReportsIntegration manages connection pool to database? Does it open a new connection when someone runs a report and if so how long that connection is held.

Dietmar Aust daust · · moderators

Hi @ajitabhpandey,

there was an issue with the Oracle Driver. I have moved now to the universal connection pool from Oracle (ucp.jar).
Currently, this is still hardcoded in the initialization:

// remove additional connections from pool after 10min idle time

Please give (pre-release) version 2.6.0 a try. This fixes the issue with the connections not being closed.
Later I will open up these parameters through the configuration file.