GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes local class incompatible error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "local class incompatible error " Watch "local class incompatible error " New topic
Author

local class incompatible error

Tirthankar Dutta Chaudhuri
Ranch Hand

Joined: Feb 26, 2005
Posts: 48
Hi,

i CALLING A EJB WITH A DET form a client program and getting the following exception
Starting Client . . .

Looking up the sign on component via JNDI.

Creating a MainSession object.

Testing a successful login/password

<May 4, 2005 7:14:01 PM IST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
java.io.InvalidClassException: AccountDetails; local class incompatible: stream classdesc serialVersionUID = 6971623729938978329, local class serialVersionUID = 96832768308214470
java.io.InvalidClassException: AccountDetails; local class incompatible: stream classdesc serialVersionUID = 6971623729938978329, local class serialVersionUID = 96832768308214470
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:33)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:209)
at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:226)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:733)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:570)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:681)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:617)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:282)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
weblogic.rjvm.PeerGoneException: ; nested exception is:
java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.InvalidClassException: AccountDetails; local class incompatible: stream classdesc serialVersionUID = 6971623729938978329, local class serialVersionUID = 96832768308214470
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at MainSessionEJB_cfy5ds_EOImpl_811_WLStub.getAccountDetails(Unknown Source)
at Client.main(Client.java:28)
Caused by: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
java.io.InvalidClassException: AccountDetails; local class incompatible: stream classdesc serialVersionUID = 6971623729938978329, local class serialVersionUID = 96832768308214470
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:754)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:570)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:681)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:617)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:282)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Caused by: java.io.InvalidClassException: AccountDetails; local class incompatible: stream classdesc serialVersionUID = 6971623729938978329, local class serialVersionUID = 96832768308214470
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:33)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:209)
at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:226)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:733)
... 7 more
Press any key to continue . . .



I have copied the same class in the two locations but they also i am getting the same error.
CAn any one help ??
Thanks
Tirthankar
Arun
Ranch Hand

Joined: Oct 03, 2003
Posts: 40
Is your architecture such that the client and server cannot share the class files? If not then you can probably try adding the server class files to the client's path. This usually makes it easier.

Which classes did u copy over? What is the getAccountDetails() returning ? Is that the class u copied over??

Whenever I encounter this error, I clean up all the class files and do a fresh build and that has helped me usually.
 
GeeCON Prague 2014
 
subject: local class incompatible error