Author
java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast
sekar varadaraj
Greenhorn
Joined: Jan 13, 2012
Posts: 2
I am Using Spring MVC, Oracle 10g with Jboss As 7.0.2
My problem is when I am trying to insert the value for CLOB Data type using CLOB.createTemporary function, the exception i am getting is
java.lang.ClassCastException : org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast to oracle.jdbc.OracleConnection
I had also used ojdbc6.jar but no solution came.
Also, I tried to search in various forum, in which i got the following link
https://forums.oracle.com/forums/thread.jspa?threadID=279238
As per discussion, they are saying that we have to wrap the connection, so i used also but problem not resolved.
So, i request you to please give some idea for solving this problem or some detail explanation about the above give exception
Jaikiran Pai
Saloon Keeper
Joined: Jul 20, 2005
Posts: 6720
Please post the entire exception stacktrace.
[My Blog ] [JavaRanch Journal ]
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 4875
posted Jan 13, 2012 09:28:42
0
In earlier versions of JBoss AS I would suspect that you packaged some JBoss AS JARs in your app. Not sure if that is still the case with AS 7. But it might be helpful to know what type of app you have (WAR, EAR?) and if you listed the contents of the app (for example, if it is a WAR file, run 'jar -tf xxx.war').
Also, please tell us exactly where you placed the Oracle JDBC Driver JAR file.
JBoss In Action
sekar varadaraj
Greenhorn
Joined: Jan 13, 2012
Posts: 2
I am using war file for deployment purpose which is placed in <JBOSS_HOME>/standalone/deployments folder
and Oracle Driver jar file is placed <JBOSS_HOME>modules/com/databasedriver/main
and i have configured standalone.xml file in <JBOSS_HOME>/standalone/configuration folder as below
So kindly tell me what exactly problem is? and how to resolve
Rajkumar Chandran
Greenhorn
Joined: Jul 09, 2007
Posts: 3
I'm having the same problem that Sekar has described.
Does anyone found a solution to fix the problem?
java.lang.ClassCastException : org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast to oracle.jdbc.OracleConnection
- JBoss 7.0.0
- Oracle 11g
- JDK 6
If you anyone knows the solution, please share it.
Thanks in advance.
-Rajkumar
James Boswell
Ranch Hand
Joined: Nov 09, 2011
Posts: 344
This post might help:
https://community.jboss.org/wiki/SetUpAOracleDatasource
Rajkumar Chandran
Greenhorn
Joined: Jul 09, 2007
Posts: 3
Hi James,
While I'm trying to get the connection, I'm getting same typecast exception.
java.lang.ClassCastException : org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast
Any solution to address the problem is appreciated.
Thanks,
Rajkumar
subject: java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast