-->
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: ClassNotFoundException in client (swing) application
PostPosted: Tue Jul 05, 2005 2:52 pm 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:37 am
Posts: 29
Hi,

I am having with my swing application which calls EJB method on the server side and ejb loads object using hibernate. There are two maps in the object and each of them are mapped with the property lazy="false"
When fetching object from the server I get this error in the client side:
Code:
Caused by: java.lang.ClassNotFoundException: org.hibernate.collection.PersistentMap
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   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.readArray(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.invoke(InvokerInterceptor.java:96)
   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:86)
   ... 36 more


Do I have to ship hibernate and other jars its using with my client swing application?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 11:37 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Perhaps you are trying to serialize a object referencing
a org.hibernate.collection.PersistentMap.
Just a guess.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 06, 2005 3:05 pm 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:37 am
Posts: 29
I know, the object has map that is also persisted to the DB.
But the thing is that my client application is quite heavy and if I start to include hibernate.jar and related jars its gonna be huge. Any ways I can avoid it?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 2:54 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
One way is: you can mark your map as transient.
But then it will not be serialized.

Another way is to store you data in a java.util.HashMap.
But then you will have to copy your data between the persistent
map an the none persistent map.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 5:24 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:37 am
Posts: 29
I know that you can copy and do all that hack. But it is not the only case, I have other objects that are using Hibernate Mapping and that are serialized. It would be quite boring to have to do manual copying of values into a java.util.Map. I cannot make the map transient because it has a localized data that is needed by the client app. So the only solution (that I have been avoiding) I can think of at the moment is to ship the hibernate jars with the client.


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.