openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: Lazy fields issue with Hibernate/OpenEJB
Date Wed, 06 Aug 2008 17:28:48 GMT
I believe this this the JIRA for the issue:

     https://jira.jboss.org/jira/browse/EJBTHREE-440

It appears that Hibernate requires a custom ObjectInputStream to work  
properly.  They claim the root cause is this VM bug:

     http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4171142

It seems strange that is could be the cause of the bug.

David, what do you think?


-dain



BTW, you can find the code for SerializableProxy here:

     http://www.krugle.org/kse/files?query=SerializableProxy#3


On Aug 6, 2008, at 9:53 AM, Sami Jaber wrote:

> Hi all,
>
> I try to get the couple JPA(Hibernate) and OpenEJB works with an  
> application
> that uses lazy fields in Pojo.
> My application is pretty simple, I have an inheritance and some lazy  
> fields
> are declared FetchMode.LAZY.
>
> When I run a client remotely, i get the same error before any call :
>
>
> javax.ejb.EJBException: Unknown Container Exception:
> java.rmi.RemoteException: Error reading response from server (OEJP/ 
> 3.0) :
> cannot assign instance of
> org.hibernate.proxy.pojo.javassist.SerializableProxy to field
> mypackage.Pojo.controleur of type mypackage.domain.user.User in  
> instance of
> mypackage.OtherPojo; nested exception is:
>    java.lang.ClassCastException: cannot assign instance of
> org.hibernate.proxy.pojo.javassist.SerializableProxy to field
> mypackage.Pojo.controleur of type mypackage.domain.user.User in  
> instance of
> mypackage.OtherPojo
>
> OtherPojo inherits from Pojo. With all kind of combination  
> (remotable=true,
> local-copy/true or false, ....), switching to cglib<->javaassist,  I  
> get
> desperately the same exception. Note that with LocalInitialContext,  
> all
> works perfectly. As soon as I run cross JVM calls thru  
> RemoteInitialContext,
> it hangs.
>
> My problem is very close to this issue :
> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737&postdays=0&postorder=asc&start=0
>
> any clue? this is very frustrating ...
>
> Or, if anybody can provide me with a test case that makes OpenEJB and
> Hibernate work with lazy fields, i would really appreciate
>
>
> Sami
>
> ps : here is my server stacktrace when the error raises
>
> 2008-08-06 18:39:02,975 - FATAL - Couldn't write EjbResponse to output
> stream
> java.net.SocketException: Software caused connection abort: socket  
> write
> error
>        at java.net.SocketOutputStream.socketWrite0(Native Method)
>        at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>        at java.net.SocketOutputStream.write(SocketOutputStream.java: 
> 136)
>        at
> java.io.ObjectOutputStream 
> $BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
>        at
> java.io.ObjectOutputStream 
> $BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
>        at
> java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java: 
> 1249)
>        at
> java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java: 
> 1203)
>        at
> java 
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java: 
> 1387)
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>        at
> java 
> .io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java: 
> 1538)
>        at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
>        at
> org.apache.openejb.client.EJBResponse.writeExternal(EJBResponse.java: 
> 133)
>        at
> org 
> .apache 
> .openejb 
> .server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java: 
> 215)
>        at
> org 
> .apache 
> .openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:164)
>        at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:122)
>        at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:84)
>        at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
>        at org.apache.openejb.server.ServicePool 
> $2.run(ServicePool.java:78)
>        at org.apache.openejb.server.ServicePool 
> $3.run(ServicePool.java:101)
>        at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:885)
>        at
> java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:907)
>        at java.lang.Thread.run(Thread.java:619)


Mime
View raw message