-->
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.  [ 6 posts ] 
Author Message
 Post subject: Cross platform RMI issue with JBoss and Hibernate
PostPosted: Tue Sep 27, 2005 3:38 am 
Newbie

Joined: Tue Jan 04, 2005 2:46 pm
Posts: 5
Hibernate version:
2.17c
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
Caused by: java.lang.ClassNotFoundException: net.sf.hibernate.collection.Set (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.ArrayList.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
... 35 more

When connecting to a JBoss Server running on Linux platform and the client running on Windows - I get the above exception stating that RMI security Manager issue (even though I tried security manager initialization command line and through programatically).

The code work perfectly on Windows platform (JBoss server and RMI client). Any suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 3:45 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
make sure hibernate2.jar is in the classpath


Top
 Profile  
 
 Post subject: RMI Client doesn't need to know about Hibernate
PostPosted: Tue Sep 27, 2005 11:04 pm 
Newbie

Joined: Tue Jan 04, 2005 2:46 pm
Posts: 5
RMI Client doesn't need to know about Hibernate

RMI Client communicates with a Session Bean - GetUsers

GetUsers gets back with list of Users (POJO)

Users have list of Roles (lazy loaded with a java.util.Set)

Don't know why RMI call with JBoss complains about Hibernate's Set class.

This works fine with Weblogic and JBoss on Windows. Its only an issue with JBoss running on Linux and RMI Client running on Windows.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 1:36 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
I'm not sure what all of that means but the system w/ the ClassNotFoundException needs hibernate2.jar in the classpath .


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 29, 2005 2:24 am 
Newbie

Joined: Tue Jan 04, 2005 2:46 pm
Posts: 5
It worked ! Copying all the hibernate jars as part of RMI client does the magic.

However, why do we need to make the hibernate libraries part of the RMI client? Is there a way to avoid shipping hibernate libraries since my EJB methods refer only to java.util.Set ?

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 29, 2005 3:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if the hibernate collections is not on the client side we cannot track changes effectively (among other things)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.