Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception:org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to

ManishPandeyJul 27 2013 — edited Jul 27 2013

Hi All,

i am using jdev version 11.1.1.5.0

and deployed my Adf application on Apache Tomcat 6.0.

  1. in my use case i have created simple adf application using adf business component. create a vo based on eo and drag-drop on jspx page.
  2. i have created JNDI data source in Apache server using edit context.xml file and add following line-

<Resource name="jdbc/TestDB" auth="Container"

              type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"

              url="jdbc:oracle:thin:@localhost:1521:dst"

              username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"

              maxWait="-1"  accessToUnderlyingConnectionAllowed="true" />

3.using same data source in my adf applicatioin as -

  right click on AM --> Configuration-->edit-->select connection type jdbc datasource  -->java:/comp/env/jdbc/TestDB  

4. after that i have deployed my application on apace server but when i have running application i have got following error-

org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

i have goggling and find  following solution-

oracle.jdbc.driver.OracleConnection delConn = (oracle.jdbc.driver.OracleConnection) ((org.apache.tomcat.dbcp.dbcp.DelegatingConnection)c_stmt.getConnection()).getDelegate();

but my problem is that i'm using Adf Business Component so where i set following type casting.

Is there any method on ADF BC which handle JNDI Data source setting or any other way to do this.

thanks in Advance

Manish

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2013
Added on Jul 27 2013
2 comments
6,646 views