ClassCastException for WrappedConnection in Jboss Hi I am using STRUCT IN my program While using the connection from JNDI lookup, i m getting java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrappedConnection PLEASE HELP OUT
A:
Adding an update for the a resolution to this problem...
I add a cast to the connection class, changing it from java.sql.Connection to org.jboss.resource.adapter.jdbc.WrappedConnection, this being the actual class that is returned from the pool. This allowed me to gain acces to the Oracle connection that contains the implementation that I need for Oracle specific operations. Once I did that, the cast exception went away. I only did this in specific instances where my java class was using an Oracle JDBC component. Now, the code looks this:
Connection jbossConn = ((WrappedConnection) this.connection).getUnderlyingConnection(); ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( Oracle Dictionary Type, jbossConn );
anu
2010-09-23 16:23:12