Hi,
We have just upgraded to from Oracle 9 to Orable 10 and are have a really weird error when inserting in only one table:
[BEA][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified.
We are using a Datasource connection from Weblogic 10.
Any ideas, I'm all out. Thanks.
Here is the hirbernate.cfg.xml excerp:
<property name="jndi.url">t3://localhost:7001</property>
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="jndi.java.naming.security.credentials">weblogic</property>
<property name="jndi.java.naming.security.principal">weblogic</property>
<property name="connection.datasource">myDataSource</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.cglib.use_reflection_optimizer">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.jdbc.use_scrollable_resultsets">false</property>
<property name="hibernate.jdbc.use_get_generated_keys">false</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.db.showSql">true</property>
Hibernate version: 3.1.3
Full stack trace of any exception that occurs:
org.hibernate.exception.JDBCConnectionException: could not insert: [mycie.MyValue]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2078)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2427)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at mycie.Processor.processFile(ContentUploader.java:196)
at mycie.Uploader.run(ContentUploader.java:85)
at mycie.Cron.main(Cron.java:34)
Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified. For batches, please ensure that streams are reset before subsequent addBatch calls. This is a non-recoverable error and the connection has been terminated.
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbcx_base_BasePreparedStatementWrapper_1001_WLStub.executeUpdate(Unknown Source)
at weblogic.jdbc.rmi.internal.PreparedStatementStub_weblogic_jdbc_rmi_internal_PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbcx_base_BasePreparedStatementWrapper_1001_WLStub.executeUpdate(Unknown Source)
at weblogic.jdbc.rmi.SerialPreparedStatement_weblogic_jdbc_rmi_internal_PreparedStatementStub_weblogic_jdbc_rmi_internal_PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbcx_base_BasePreparedStatementWrapper_1001_WLStub.executeUpdate(Unknown Source)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2062)
... 11 more
Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver]Communication error: The stream provided does not contain the number of bytes specified. For batches, please ensure that streams are reset before subsequent addBatch calls. This is a non-recoverable error and the connection has been terminated.
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.base.BaseStatement.postProcessExceptionFromCommonExecute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at weblogic.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
at weblogic.jdbcx.base.BasePreparedStatementWrapper.executeUpdate(Unknown Source)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:125)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbcx_base_BasePreparedStatementWrapper.executeUpdate(Unknown Source)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_weblogic_jdbcx_base_BasePreparedStatementWrapper_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Name and version of the database you are using: Oracle 10g
The generated SQL (show_sql=true):
insert into MY_VALUE (ENTITY_ID, PROPERTY_TYPE, CREATION_DATE, MODIFIED_DATE, BOOLEAN_VALUE, DATETIME_VALUE, DOUBLE_VALUE, LONG_VALUE, TEXT_VALUE, BLOB_VALUE, PROPERTY_VALUE_ID, PROPERTY_KEY_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|