views:

126

answers:

1

I have a simple EJB application that I can deploy and test on a local WebLogic instance (v10.3.0.0) without problems. I need to deploy this on a remote WL server (v10.3.3.0), and test it from a local machine. Deployment is successful, but when I try to run any of the clients from JDeveloper, I get this error:

<2010.06.02. 16:08:36 CEST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
 java.io.InvalidClassException: org.eclipse.persistence.exceptions.ValidationException; local class incompatible: stream classdesc serialVersionUID = 3793659634176227230, local class serialVersionUID = -7605463488982202416
java.io.InvalidClassException: org.eclipse.persistence.exceptions.ValidationException; local class incompatible: stream classdesc serialVersionUID = 3793659634176227230, local class serialVersionUID = -7605463488982202416
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:36)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
    at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
    at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:227)
    at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:173)
    at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:439)
    at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:322)
    at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:394)
    at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:917)
    at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:849)
    at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:283)
    at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

Can anyone explain why I'm getting this error, and what I can do to resolve it?

A: 

You have two versions of the class, probably in two different JAR:s. Since JEE often uses classloader hierarchies, it can happen that one piece of code loads a class from one classloader, while another piece of code loads it from another classloader. Instances of these two classes (with the same name) are not considered equal, even if they would have the same serialVersionId.

What you are seeing is two different instances of ValidationException, instantiated from different classes, loaded from different classloaders (probably from different JARs). JDeveloper probably includes its own version, which clashes with the WebLogic ones. Are you including the eclipse validation jars in your app?

disown
Not that I'm aware of, though this is my first time working with java EE. The app consists of only a couple entities/DTO classes, 3 stateless session beans and a test client for each bean, all packed in a single .jar file. The only imports are those generated by JDev and java.util.List.
suszterpatt
When you run your clients from JDeveloper, you probably have another definition of 'validationexception', which your app then sends to WebLogic. Try to find the jar which contains this class. You have to make sure that client and server jars are of the same version.
disown