• Post Reply Bookmark Topic Watch Topic
  • New Topic

help:class invalid for deserialization

 
jaspal singh
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys!

im using jboss server.im getting following exception while making call to session bean from my java client application:

the problem is generated only on my machine other guys dont get such problem.
also the transaction works fine the data is properly manupilated in database.but at the end this exception is thrown

in the folloiwing trace.ResulObject seems to be the root cause.this
class is used by bean developers to set the transaction success/failure details.

pls reply






ShrtCdMgmtDAO.insertRec] : Record could not be created for some reasons
[ShrtCdMgmtDAO.insertRec] : Exception generated e-->java.lang.reflect.UndeclaredThrowableException<--
java.lang.reflect.UndeclaredThrowableException
at $Proxy1.addShortCodeData(Unknown Source)
at ShrtCdMgmtDAO.insertRec(ShrtCdMgmtDAO.java:69)
at com.gomobile.cmdadminui.GMAdminUIShrtCdMst.readCommands(GMAdminUIShrtCdMst.java:154)
at GMAdminUIShrtCdMst.main(GMAdminUIShrtCdMst.java:379)
Caused by: java.io.InvalidClassException: ResultObject; class invalid for deserialization
at java.io.ObjectStreamClass.initNonProxy(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.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:227)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
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)
... 4 more

[ March 26, 2006: Message edited by: jaspal singh ]
 
Andreas Schaefer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This exception just means that you cannot return the object in question through a remote interface (does not matter if this is called from a remote Java client or a local EJB). The class in question is just not serializable and therefore you need to extract the data and hand it back to the client by another data object.

-Andy
 
jaspal singh
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but the Class ResultObject is serializable.suddenly this problem has crapped.

can u tell me how to solve this problem.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using the same version of ResultObject class? If not, does ResultObject have a serialVersionUID defined for it?

If your copy of ResultObject is even slightly different than the server-side copy and you don't have a serialVersionUID explicitly defined than you are definitely going to run into problems.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!