org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor

Spring JIRA | Yujin Kim | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When accessing clob data using 10g driver, OracleLobHandler fails because the new driver is returning oracle.jdbc.driver.T4CConnection instead of oracle.jdbc.OracleConnection. according to atlassian folks, this is supposed to be reverted back in the newer version of 10g driver, but i still getting the exception with the version suggested by atlassian. http://confluence.atlassian.com/display/DOC/Deploy+against+an+Oracle+database Stacktrace below: INFO: Could not create Oracle LOB; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOracleConnection(OracleLobHandler.java:360) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:328) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:259) at org.springframework.orm.hibernate.support.ClobStringType.nullSafeSetInternal(ClobStringType.java:80) at org.springframework.orm.hibernate.support.AbstractLobType.nullSafeSet(AbstractLobType.java:159) at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118) at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:387) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) at com.vivakos.kx.persistence.hibernate.AbstractDAO.persist(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:288) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:164) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy26.persist(Unknown Source) at com.vivakos.kx.persistence.service.TxContentServiceImpl.persistFolder(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324)

    Spring JIRA | 1 decade ago | Yujin Kim
    org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor
  2. 0

    When accessing clob data using 10g driver, OracleLobHandler fails because the new driver is returning oracle.jdbc.driver.T4CConnection instead of oracle.jdbc.OracleConnection. according to atlassian folks, this is supposed to be reverted back in the newer version of 10g driver, but i still getting the exception with the version suggested by atlassian. http://confluence.atlassian.com/display/DOC/Deploy+against+an+Oracle+database Stacktrace below: INFO: Could not create Oracle LOB; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOracleConnection(OracleLobHandler.java:360) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:328) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:259) at org.springframework.orm.hibernate.support.ClobStringType.nullSafeSetInternal(ClobStringType.java:80) at org.springframework.orm.hibernate.support.AbstractLobType.nullSafeSet(AbstractLobType.java:159) at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118) at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:387) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) at com.vivakos.kx.persistence.hibernate.AbstractDAO.persist(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:288) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:164) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174) at $Proxy26.persist(Unknown Source) at com.vivakos.kx.persistence.service.TxContentServiceImpl.persistFolder(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324)

    Spring JIRA | 1 decade ago | Yujin Kim
    org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor
  3. 0

    [SPR-1112] OracleLobHandler and 10g driver - Spring JIRA

    spring.io | 1 year ago
    org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on , not on - specify a corresponding NativeJdbcExtractor
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Tomcat - User - tomcat and DB oracle problem - only in higher versions

    nabble.com | 1 year ago
    org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [org.apache.tomcat.dbcp.dbcp.PoolableConnection]: specify a corresponding NativeJdbcExtractor; nested exception is java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.PoolableConnection cannot be cast to oracle.jdbc.OracleConnection
  6. 0

    [Tomcat-users] tomcat and DB oracle problem - only in higher versions - Grokbase

    grokbase.com | 1 year ago
    org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [org.apache.tomcat.dbcp.dbcp.PoolableConnection]: specify a corresponding NativeJdbcExtractor; nested exception is java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.PoolableConnection cannot be cast to oracle.jdbc.OracleConnection

    1 unregistered visitors

    Root Cause Analysis

    1. org.springframework.dao.InvalidDataAccessApiUsageException

      OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [class oracle.jdbc.driver.T4CConnection] - specify a corresponding NativeJdbcExtractor

      at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOracleConnection()
    2. Spring Framework
      OracleLobHandler$OracleLobCreator.setClobAsString
      1. org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOracleConnection(OracleLobHandler.java:360)
      2. org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:328)
      3. org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:259)
      3 frames
    3. Hibernate
      AbstractLobType.nullSafeSet
      1. org.springframework.orm.hibernate.support.ClobStringType.nullSafeSetInternal(ClobStringType.java:80)
      2. org.springframework.orm.hibernate.support.AbstractLobType.nullSafeSet(AbstractLobType.java:159)
      2 frames
    4. net.sf.hibernate
      SessionImpl.flush
      1. net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118)
      2. net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:387)
      3. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
      4. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
      5. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
      6. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
      7. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
      8. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
      9. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
      9 frames
    5. com.vivakos.kx
      AbstractDAO.persist
      1. com.vivakos.kx.persistence.hibernate.AbstractDAO.persist(Unknown Source)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:288)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
      3 frames
    8. Hibernate
      HibernateInterceptor.invoke
      1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:164)
      1 frame
    9. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
      2 frames
    10. Unknown
      $Proxy26.persist
      1. $Proxy26.persist(Unknown Source)
      1 frame
    11. com.vivakos.kx
      TxContentServiceImpl.persistFolder
      1. com.vivakos.kx.persistence.service.TxContentServiceImpl.persistFolder(Unknown Source)
      1 frame
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames