Java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be undone

Application Version: JBoss 7.0.0, Oracle 11g (ojdbc6.jar) and JDK Version 6

I am having a problem when I try to insert a value for a CLOB data type using a function CLOB.createTemporary, having received the exception below.

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

After searching several forums no solution was found. https://forums.oracle.com/forums/thread.jspa?threadID=279238

The basic steps necessary to deploy the WAR file and configure the Jaboss driver pool configuration have been completed. But, still unable to solve this problem.

Please provide a solution to resolve this issue.

+5
source share
3

.

: Oracle lib/modules - ( WAR). oracle lib (JBoss 7 ver).

JBoss 7:

  • JBoss (jboss-deployment-structure.xml)

    • (ironjacamar-jdbc-1.0.3.Final.jar) jboss.
    • ojdbc6.jar JBoss 7 objbc jboss.
    • :

      <jboss-deployment-structure> 
          <deployment>
              <dependencies>
                  <module name="org.jboss.ironjacamar.jdbcadapters" slot="main"/>
                  <module name="com.oracle.ojdbc6" slot="main"/>
              </dependencies>
          </deployment> 
      </jboss-deployment-structure>
      

-: - ojdbc6.jar - ( WAR)

- , .

+7

, , JBoss oracle (oracle.jdbc.OracleConnection) (org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6). #getUnderlyingConnection(), .

WrappedConnection wrapped = (WrappedConnection) conn;
CLOB clob = CLOB.createTemporary(wrapped.getUnderlyingConnection(), true, CLOB.DURATION_SESSION);

, .

ps.setClob(4, new StringReader(data));
+1

Rails Jruby 1.7.2, JBoss 7.1 Oracle (oracle_enhanced adapter)

Java::JavaLang::ClassCastException: oracle.jdbc.driver.T4CConnection cannot be cast to oracle.jdbc.OracleConnection

.

I placed jboss-deployment-structure.xml in the rails application config / directory and updated the warbler configuration to include the file in the war file:

config.webinf_files += FileList["config/jboss-deployment-structure.xml"]

After deployment, everything worked fine ... thanks a lot.

0
source

All Articles