-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Weird Error after upgrading to Oracle10... Please HELP
PostPosted: Fri May 02, 2008 10:33 am 
Newbie

Joined: Fri May 02, 2008 10:22 am
Posts: 5
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 10:35 am 
Newbie

Joined: Fri May 02, 2008 10:22 am
Posts: 5
Also, if I run the Insert statement directly through Toad, I dpon't get the error.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 10:38 am 
Newbie

Joined: Fri May 02, 2008 10:22 am
Posts: 5
More Info, I just changed my hibernate.cfg.xml to use a direct jdbc connection URL and I don't get the error. Probably something wrong with the BEA driver :(

<property name="connection.url">jdbc:oracle:thin:@myhost:1528:DB01</property>
<property name="connection.username">MY_user</property>
<property name="connection.password">MY_pwd</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.default_schema">MY_ENV01</property>


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 10:48 am 
Newbie

Joined: Fri May 02, 2008 10:22 am
Posts: 5
another piece of information, this is the Driver class used in our Datasource:

Driver Class Name: weblogic.jdbcx.oracle.OracleDataSource

I still can't figure our what to do about this. Our security poeple wont let us connect to the DB directly in PROD...


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 12:59 pm 
Newbie

Joined: Fri May 02, 2008 10:22 am
Posts: 5
Well, this seems to be a problem with the BEA Weblogic 10's driver for Oracle.

When I change my DataSource to use the standard Oracle Thin Drivers it works.

I've opened a thread on the BEA forums:

http://forums.bea.com/thread.jspa?threadID=570001070&#msg570002776


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.