-->
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.  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Serializing a HB Object from Weblogic 8.1 SP5 to Tomcat
PostPosted: Fri Jan 27, 2006 2:24 pm 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
Hi,

I try to receive a Hibernate Object from the Bea Weblogic Server 8.1 SP5 from Tomcat 5.0 over RMI/IIOP (t3). The object will be fetched without problems, but if I try to send it to the Tomcat the following exception occurs:

<27.01.2006 18.53 Uhr CET> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: XXXXXExternalSession_spoxje_EOImpl.login(Ljava.lang.String;Ljava.lang.String;Lja
va.lang.String;)
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: XXXXHB.xxxxxs - no session or session was closed.
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: XXXXHB.xxxxxs - no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentColl
ection.java:191)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:183)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48)
at org.hibernate.collection.PersistentSet.equals(PersistentSet.java:319)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
at XXXXXXXXXExternalSession_spoxje_EOImpl_WLSkel.inv
oke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

For me it looks like Weblogic treis to get the Collection that is not initialized...
The Error doesn`t occur with Weblogic 8.1 SP4 (but we have to use SP5).
Also the error doesn`t occur if I deploy the Webproject on the Weblogic instance.
I also have an Testclient, that has the same problem (so Tomcat isn`t the problem).

I use the CMTTransactionFactory and I´m calling session.flush() on leaving the SSB.

My Environment:

Weblogic 8.1 SP5 / Tomcat 5.0 / Hibernate 3.0.5 / Oracle 10g / Jdk 1.4.2_08

I think Bea has something changed with the RMI/IIOP.

Is there a known issue with SP5?


Hibernate version:3.0.5

Full stack trace of any exception that occurs:
<27.01.2006 18.53 Uhr CET> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: XXXXXExternalSession_spoxje_EOImpl.login(Ljava.lang.String;Ljava.lang.String;Lja
va.lang.String;)
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: XXXXHB.xxxxxs - no session or session was closed.
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: XXXXHB.xxxxxs - no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentColl
ection.java:191)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:183)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:48)
at org.hibernate.collection.PersistentSet.equals(PersistentSet.java:319)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
at XXXXXXXXXExternalSession_spoxje_EOImpl_WLSkel.inv
oke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)


Name and version of the database you are using: Oracle 10g


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 5:33 am 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
Can anyone confirm this problem?
Is this a known issue or am I doing something wrong?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 6:25 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
This topic was here some days ago. They found out that it is a bug. I am not sure if this also applies to your exception.

Just search

Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 11:10 am 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
I think you reffered to this bug http://opensource.atlassian.com/project ... e/HHH-1392 . It should be fixed in 3.1.2 so I switched to this version, but that doesn`t help. I thin the problem is this line in the Exception:
weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)

The complete Excpetion now is:

Exception in thread "ExecuteThread: '14' for queue: 'weblogic.kernel.Default'" org.hibernate.LazyInitializationException
: failed to lazily initialize a collection of role:XXXXXXHB.xxxxxs, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentColl
ection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(Abstract
PersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentSet.equals(PersistentSet.java:350)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1260)
at weblogic.iiop.UtilDelegateImpl.writeAny(UtilDelegateImpl.java:91)
at javax.rmi.CORBA.Util.writeAny(Util.java:78)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:647)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_abstract_interface(IIOPOutputStream.java:1675)
at weblogic.iiop.UtilDelegateImpl.writeAbstractObject(UtilDelegateImpl.java:124)
at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:129)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectDelegate(IIOPOutputStream.java:97)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:104)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:274)
at java.util.HashMap.writeObject(HashMap.java:979)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObject(Native Method)
at com.sun.corba.se.internal.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:560)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:523)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1260)
at weblogic.iiop.UtilDelegateImpl.writeAny(UtilDelegateImpl.java:91)
at javax.rmi.CORBA.Util.writeAny(Util.java:78)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:647)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1260)
at weblogic.iiop.UtilDelegateImpl.writeAny(UtilDelegateImpl.java:91)
at javax.rmi.CORBA.Util.writeAny(Util.java:78)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:647)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
at XXXXXXXXXXXServiceExternalSession_spoxje_EOImpl_WLSkel.inv
oke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 12:33 pm 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
Is there someone, who would take an existing project, which runs on Weblogic 8.1 SP Level < SP5 and test it on SP5, to confirm if this is a bug?
The important thing is, that the client, which accesses the SSB isn`t deployed on Weblogic, but for example Tomcat...

Thanks in advance.

Or should I commit a new bug?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 10:06 am 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
Meanwhile I tried to deploy the application on Weblogic 9.1. The same problem occurs there. Has someone successfully deployed an Application with Hibernate, EJB and RemoteClient (e.g. Tomcat) on Weblogic 9.1, where Hibernate Objetcs are passed to client and are not fully initialized?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 11:02 am 
Newbie

Joined: Wed Feb 01, 2006 10:22 am
Posts: 6
I'm shaky on my RMI, but a vague guess from the stack trace would be as follows:
You're getting lazyinitializationexception. This is because a related collection property is being referenced, but there is no hibernate session to go tot eh DB to fetch the related collection.
My guess as to why this is happening? when serializing over RMI the RMI code has to get* each property of the object to marshall to encode it to send it over the wire. When it tries to get() that property it can't, and it vomits.

Things to try to see if that is the problem: remove any related collections from the object you are trying to marshall over RMI. If it JUST a bunch of properties with no references to other objects it should marshall just fine.

If that is the case, either set the property that is causing the problem to be eagerly fetched in your mapping document, OR use the session.intialize(yourobject.getTheCollection()). This will, IIRC, perform the fetch quite nicely and then all of the getters on your object will return nice things that can be marshalled over RMI.

This is just my first stab after glancing at the stack trace, YMMV


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 11:17 am 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
You`re right. This only happens if collections are not initialized. But for me it`s not an option to initialize the, because in this case I have to load to much data from the db.


Top
 Profile  
 
 Post subject: options
PostPosted: Wed Feb 01, 2006 12:13 pm 
Newbie

Joined: Wed Feb 01, 2006 10:22 am
Posts: 6
there are several options. ONE- create a parent class that doesn't have the collections as part of it. when you want to get one that is serialized, look up the parent and send it. when you need in your main app the object that has the lazy loaded collections, look up the subclass.

so:
Code:
//the class that is seriallized
public class Parent
{
  String getName(){...}

  int getFoo(){...}
}

//the local class used with collections
public class FatChild extends Parent
{
  List getCollection1(){...}

  List getCollection2(){...}
}



this allows the RMI marshalling process to serialize everything it finds on the parent class, but allows you to utilize the child class locally to get at the collections.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 2:07 pm 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
Ok, I can create a parent class, but I do not know, why it is working with Weblogic 8.1 SP4 and not with SP5 or Weblogic 9?
Is there eventually a bug in Weblogic or Hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 2:26 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Probably you have different hibernate versions on your containers, it was a bug fixes related to this issue in 3.1.1 and 3.1.2, but You must initialize as many objects as you need on server before to return from remote method. It is possible to customize hibernate to initialize serialized objects on demand using callbacks, but it is bit complex to implement. http://www.hibernate.org/377.html I will update this version with working implementation for entity proxies (custom tuplizer for 3.1), but I do not have time to finish it for collection lazy initialization at this time (it needs custom persister and custom collection classes to hack serialization).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 2:59 pm 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
Unfortunately I have the same versions of Hibernate (3.0.5).
I also tried version 3.1.2, but it doesn`t help with the problem.
I don`t make calls on the collections either on the server nor on the client. It happens while Weblogic is marshalling the objects. On JBOSS the problem doesn't exist...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 3:12 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
verify this method in hibernate source code " org.hibernate.collection.AbstractPersistentCollection.read" there is something wrong, it must not call "initialize".


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 3:17 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Sorry, I see it is a side web logig specific effect:
Code:
org.hibernate.collection.PersistentSet.equals(PersistentSet.java:319)
at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)

You need to hack "PersistentSet.equals" to fix this issue.

Code:
public boolean equals(Object other) {
      
      return other == this;
   }

   public int hashCode() {
      
      return System.identityHashCode(this);
   }


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 9:00 pm 
Newbie

Joined: Fri Jan 27, 2006 2:09 pm
Posts: 14
THX!!!
This was exactly the problem. I patched the equals and hashcode method and it works.
But I also had to remove my equals and hashcode methode in my hibernate objects, because they used the id...
Can I check if a object is a proxy, e.g. by calling instanceof, or is there a good solution for equals and hashcode methods in normal hibernate objects?

By the way, was this a bug of Hibernate, so that it would be fixed and I don`t have to patch the jar in further versions?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 23 posts ]  Go to page 1, 2  Next

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.