Oracle Connect

I've created a JDBC connection and have a simple select report.

After creating report unit, when I run the report it gives following error.

org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@3b34ca targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@106bcf8, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is com.jaspersoft.jasperserver.api.JSException: Error creating connection.

From the message it is clear that there was an error while creating connection.

It is a local oracle database and I'm able to connect it.

How do i solve this error OR get more information related to this error.

Thx,
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago

10 Answers:

What were the detailed messages in the error?

Is the Oracle driver JAR on the classpath for JasperIntelligence?


Sherman
JasperSoft
swood's picture
24557
Joined: Jun 21 2006 - 12:48pm
Last seen: 10 years 11 months ago
Yes, oracle drivers are on classpath.

This was previous error, after that above error has appeared.

I've executed same with iReport, which is running.
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
Tried JDBC Thin & OCI8, still getting the same error.

Though, able to connect using Thin & OCI8 from my machine.

Thx,
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
Same error reported previously

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&f...

Initial lines of jasperserver.log

17:47:07,605 WARN LoggerListener,http-8080-Processor25:55 - Authentication event AuthenticationSuccessEvent: root; details: org.acegisecurity.ui.WebAuthenticationDetails@fffe3f86: RemoteIpAddress: 127.0.0.1; SessionId: F124BDAD01AA19A83E28BE344BF57497
17:47:07,605 WARN LoggerListener,http-8080-Processor25:55 - Authentication event InteractiveAuthenticationSuccessEvent: root; details: org.acegisecurity.ui.WebAuthenticationDetails@fffe3f86: RemoteIpAddress: 127.0.0.1; SessionId: F124BDAD01AA19A83E28BE344BF57497
17:47:21,687 ERROR JdbcDataSourceService,http-8080-Processor25:52 - Error creating connection.
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:50)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.BaseJdbcDataSource.setReportParameterValues(BaseJdbcDataSource.java:48)
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
JasperIntelligence creates a connection pool behind the scenes for each defined JDBC connection. By default (defined in the dataSourceObjectPoolFactory bean in /WEB-INF/applicationContext.xml) there are 5 connections pooled.

At what point does the error occur? The first time a report using the connection is run? After several times? It is strange, because we use this pooling a lot and other Oracle users have been fine.


Sherman
JasperSoft
swood's picture
24557
Joined: Jun 21 2006 - 12:48pm
Last seen: 10 years 11 months ago
Error occurred on first attempt itself.

Here are some more line from error. Please guide me to locate error.

Key note from error:
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
Caused by: java.util.NoSuchElementException: Could not create a validated object

java.util.NoSuchElementException: Could not create a validated object

While executing above used OCI8.

at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:50)
... 81 more
Caused by: java.util.NoSuchElementException: Could not create a validated object
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:851)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
... 82 more

Thx,
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
It seems there is a problem with DBCP and your particular version of Oracle.

What exact version of the Oracle driver are you using? Can you show the Oracle connect string?


Sherman
JasperSoft
swood's picture
24557
Joined: Jun 21 2006 - 12:48pm
Last seen: 10 years 11 months ago
Hi there,

Now; i've reinstalled JasperIntelligence. Sample not imported. Even this time bundled tomcat & mssql used.

1) Copied classes12.zip to C:\jasperintelligence-1.1.0\apache-tomcat\webapps\jasperserver\WEB-INF\lib
and renamed to classes12.jar

2)Here are connection test log form my machine

C:\Kartik\PROJECTS\JAVA>set CLASSPATH=c:\oracle\ora81\jdbc\lib\classes12.zip;

C:\Kartik\PROJECTS\JAVA>java JdbcCheckup
Please enter information to test connection to the database
user: username
password: password
TNSNAME Name: GJPREP
database : UDRGNR
ip: 10.0.128.27
port: 1521


Connecting to the database...

Connecting...

jdbc:oracle:oci8:@GJPREP

OCI: connected.

UDRGNR@gjprep Ver:8.1.7.3.0Started : 16-Oct-2006 08:14:09

Your JDBC:OCI installation is correct.


jdbc:oracle:thin:@10.0.128.27:1521:UDRGNR

connected.
UDRGNR@gjprep Ver:8.1.7.3.0Started : 16-Oct-2006 08:14:09

Your JDBC:THIN installation is correct.

3) Datasource created under JI
Driver: oracle.jdbc.driver.OracleDriver
URL: jdbc:oracle:thin:@10.0.128.27:1521:UDRGNR

Oracle Version 8.1.7.3

4) Error at JI
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
Caused by: java.util.NoSuchElementException: Could not create a validated object
Thanks for you time, :)
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
Can some one help me with this ?
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
Hi,

Refer http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&f...

Able to connect to oracle after suggested changes, (moving repository Oracle).
kartikgajjar's picture
Joined: Oct 27 2006 - 4:21am
Last seen: 16 years 11 months ago
Feedback
randomness