File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sekar varadaraj
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the entire exception stacktrace.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sekar varadaraj
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This post might help:

https://community.jboss.org/wiki/SetUpAOracleDatasource
 
Rajkumar Chandran
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic