Mastering EJB LogBean Example

Discussions

EJB programming & troubleshooting: Mastering EJB LogBean Example

  1. Mastering EJB LogBean Example (1 messages)

    Have encountered an error trying to run the Client to the LogBean example (Chapter 8). I've serached the WebLogic docs, the Java API, even the web, but am at a loss as to what this stack trace is telling me is wrong. I'm new to J2EE and still groping abit; any clues would be appreciated!

    It appears the error is occurring on the following line in Client.java:

            // 4: Lookup Desintation (topic) via JNDI
            Topic topic = (Topic) ctx.lookup("testtopic");

    The resulting stack trace follows:

    run-client:
         [java] Got initial context.
         [java] Got ConnectionFactory.
         [java] Got Connection.
         [java] Got Session.
         [java] java.io.InvalidClassException: weblogic.jms.common.DestinationImpl; Local class not compatible: stream classdesc serialVersionUID=6099783323740404732 local class serialVersionUID=-7124492888158518181
         [java] at java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:518)
         [java] at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:562)
         [java] at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:931)
         [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:361)
         [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         [java] at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:29)
         [java] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1207)
         [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
         [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
         [java] at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
         [java] at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
         [java] at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:202)
         [java] at weblogic.rjvm.MsgAbbrevInputStream.readMessageContext(MsgAbbrevInputStream.java:193)
         [java] at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:641)
         [java] at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:488)
         [java] at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:368)
         [java] at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
         [java] at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
         [java] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)...
  2. Mastering EJB LogBean Example[ Go to top ]

    OK, found the problem myself.

    I had the classpath set to include /weblogic700/server/lib/*.jar. Change this to only include /weblogic700/server/lib/weblogic.jar.

    I can only guess that there's some class duplication amongst the jar files in that directory. That might explain the serialization conflict.