File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast " Watch "java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast " New topic
Author

java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast

sekar varadaraj
Greenhorn

Joined: Jan 13, 2012
Posts: 4

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
Marshal

Joined: Jul 20, 2005
Posts: 9313
    
109

Please post the entire exception stacktrace.

[My Blog] [JavaRanch Journal]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

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: 4
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
Bartender

Joined: Nov 09, 2011
Posts: 973
    
    5

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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast
 
Similar Threads
why do i get TreeSet RuntimeException with my code?
Jsp failed to execute in Netbeans
classcastException
distributed banking code , getting error : _stub class cannot be casted!!!
Apache Commons DBCP connection object problem