4 Replies Latest reply on Jul 3, 2017 8:57 AM by Ryan Emerson

    java.sql.SQLException: ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden

    Ralf Zimmermann Newbie

      Hello,

       

      I set up an infinispan cache with an JdbcStringBasedStore backed by an Oracle DB. When i try to insert larger BLOB values i get a error caused by the following exception: "java.sql.SQLException: ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden":

       

      ERROR: ISPN008024: Error while storing string key to database; key: '3eb4077d-5756-4c19-a935-7d48a32bbb0f'

      java.sql.SQLException: ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden

       

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)

        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)

        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)

        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)

        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)

        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)

        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)

        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)

        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)

        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)

        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.executeUpsert(JdbcStringBasedStore.java:224)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:209)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:189)

        at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$writeToAllNonTxStores$9(PersistenceManagerImpl.java:518)

        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)

        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)

        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)

        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)

        at org.infinispan.persistence.manager.PersistenceManagerImpl.writeToAllNonTxStores(PersistenceManagerImpl.java:518)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.storeEntry(CacheWriterInterceptor.java:480)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.lambda$visitPutKeyValueCommand$1(CacheWriterInterceptor.java:189)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:108)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.visitPutKeyValueCommand(CacheWriterInterceptor.java:181)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)

        at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:196)

        at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitPutKeyValueCommand(CacheLoaderInterceptor.java:133)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:101)

        at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:676)

        at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:304)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:153)

        at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:116)

        at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:39)

        at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)

        at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:171)

        at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:160)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:126)

        at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:94)

        at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:248)

        at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1489)

        at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1120)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1110)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1559)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:249)

        at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:358)

        at org.infinispan.cache.impl.TypeConverterDelegatingAdvancedCache.put(TypeConverterDelegatingAdvancedCache.java:173)

        at OracleCacheTest.main(OracleCacheTest.java:55)

       

       

      Jun 13, 2017 5:32:26 PM org.infinispan.interceptors.impl.InvocationContextInterceptor rethrowException

      ERROR: ISPN000136: Error executing command PutKeyValueCommand, writing keys [3eb4077d-5756-4c19-a935-7d48a32bbb0f]

      org.infinispan.persistence.spi.PersistenceException: Error while storing string key to database; key: '3eb4077d-5756-4c19-a935-7d48a32bbb0f'

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:192)

        at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$writeToAllNonTxStores$9(PersistenceManagerImpl.java:518)

        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)

        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)

        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)

        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)

        at org.infinispan.persistence.manager.PersistenceManagerImpl.writeToAllNonTxStores(PersistenceManagerImpl.java:518)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.storeEntry(CacheWriterInterceptor.java:480)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.lambda$visitPutKeyValueCommand$1(CacheWriterInterceptor.java:189)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:108)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.visitPutKeyValueCommand(CacheWriterInterceptor.java:181)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)

        at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:196)

        at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitPutKeyValueCommand(CacheLoaderInterceptor.java:133)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:101)

        at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:676)

        at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:304)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:153)

        at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:116)

        at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:39)

        at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)

        at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:171)

        at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:160)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:126)

        at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:94)

        at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:248)

        at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1489)

        at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1120)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1110)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1559)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:249)

        at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:358)

        at org.infinispan.cache.impl.TypeConverterDelegatingAdvancedCache.put(TypeConverterDelegatingAdvancedCache.java:173)

        at OracleCacheTest.main(OracleCacheTest.java:55)

      Caused by: java.sql.SQLException: ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden

       

       

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)

        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)

        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)

        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)

        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)

        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)

        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)

        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)

        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)

        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)

        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.executeUpsert(JdbcStringBasedStore.java:224)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:209)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:189)

        ... 45 more

       

       

      Exception in thread "main" org.infinispan.persistence.spi.PersistenceException: Error while storing string key to database; key: '3eb4077d-5756-4c19-a935-7d48a32bbb0f'

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:192)

        at org.infinispan.persistence.manager.PersistenceManagerImpl.lambda$writeToAllNonTxStores$9(PersistenceManagerImpl.java:518)

        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)

        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)

        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)

        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)

        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)

        at org.infinispan.persistence.manager.PersistenceManagerImpl.writeToAllNonTxStores(PersistenceManagerImpl.java:518)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.storeEntry(CacheWriterInterceptor.java:480)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.lambda$visitPutKeyValueCommand$1(CacheWriterInterceptor.java:189)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:108)

        at org.infinispan.interceptors.impl.CacheWriterInterceptor.visitPutKeyValueCommand(CacheWriterInterceptor.java:181)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)

        at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:196)

        at org.infinispan.interceptors.impl.CacheLoaderInterceptor.visitPutKeyValueCommand(CacheLoaderInterceptor.java:133)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenAccept(BaseAsyncInterceptor.java:101)

        at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForDataCommand(EntryWrappingInterceptor.java:676)

        at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:304)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:153)

        at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:116)

        at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:39)

        at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:77)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:57)

        at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:171)

        at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:160)

        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:74)

        at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:126)

        at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:94)

        at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:248)

        at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1489)

        at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1120)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1110)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1559)

        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:249)

        at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:358)

        at org.infinispan.cache.impl.TypeConverterDelegatingAdvancedCache.put(TypeConverterDelegatingAdvancedCache.java:173)

        at OracleCacheTest.main(OracleCacheTest.java:55)

      Caused by: java.sql.SQLException: ORA-01461: Ein LONG-Wert kann nur zur Einfügung in eine LONG-Spalte gebunden werden

       

       

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)

        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)

        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)

        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)

        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)

        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)

        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)

        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)

        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)

        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)

        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.executeUpsert(JdbcStringBasedStore.java:224)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:209)

        at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.write(JdbcStringBasedStore.java:189)

        ... 45 more

       

      You can reproduce the error using the attached files:

       

      1. Create a Oracle DB "migration" with user "migration" and password "password"
      2. Run OracleCacheTest using infinispan 9.0.1.GA

       

      The same code runs without problems, using infinispan 8.2.4.GA

       

      Can you help please. Thanks a lot,

      Ralf