ClassNotFound Exception - Weblogic

This is a discussion on ClassNotFound Exception - Weblogic ; Hi everyone, I have deployed a jar file on WL 6.1 . I have a JMS Listener which doesn't find an application class called AdmLoggingEvent even though is in the jar file I have deployed . The only way to ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ClassNotFound Exception

  1. ClassNotFound Exception


    Hi everyone,
    I have deployed a jar file on WL 6.1 . I have a JMS Listener which
    doesn't find an application class called AdmLoggingEvent even though is in the
    jar file I have deployed . The only way to quick fix the problem so far is to
    put this class in the classpath variable of the startweblogic script...

    Why isn't WL finding the class in the jar file as it should normally do?Could
    it be a JMS configuration thing?
    Thanks for any help

    The exception generated is the following:

    weblogic.jms.common.JMSException: Error deserializing object
    at weblogic.jms.common.ObjectMessageImpl.getObject(Ob jectMessageImpl.java:113)
    at eu.ohim.common.adm.log.ADMLoggingReceiver.onMessag e(Unknown Source)
    at weblogic.jms.client.JMSSession.onMessage(JMSSessio n.java:1864)
    at weblogic.jms.client.JMSSession.execute(JMSSession. java:1819)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:120)
    ----------- Linked Exception -----------
    java.lang.ClassNotFoundException: eu.ohim.common.adm.log.AdmLoggingEvent
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:183)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 94)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:281)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 50)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:310)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at weblogic.jms.common.ObjectMessageImpl$ObjectInputS tream2.resolveClass(ObjectMessageImpl.java:238)
    at java.io.ObjectInputStream.inputClassDescriptor(Obj ectInputStream.java:913)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:361)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:231)
    at java.io.ObjectInputStream.inputObject(ObjectInputS tream.java:1181)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:381)
    at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:231)
    at weblogic.jms.common.ObjectMessageImpl.getObject(Ob jectMessageImpl.java:109)
    at eu.ohim.common.adm.log.ADMLoggingReceiver.onMessag e(Unknown Source)
    at weblogic.jms.client.JMSSession.onMessage(JMSSessio n.java:1864)
    at weblogic.jms.client.JMSSession.execute(JMSSession. java:1819)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:120)

  2. Re: ClassNotFound Exception

    I'm assuming the stacktrace is from the server?

    You are running your own thread on the server by registering
    an onMessage listener on the server, technically, this
    is not supported. (This thread has no
    knowledge of the EJB it comes from, and consequently
    no knowledge about which class-loader to use.) Instead,
    MDBs are normally used for this purpose.

    Coincidentally, this happened to another newsgroup
    poster this week. Look for the thread
    with the subject "Error deserializing object"
    for an (unsupported) work-around.

    Tom

    P.S. A "google" search of "error deserializing object" in
    this newsgroup would likely have led you to the answer.

    luigi wrote:

    > Hi everyone,
    > I have deployed a jar file on WL 6.1 . I have a JMS Listener which
    > doesn't find an application class called AdmLoggingEvent even though is in the
    > jar file I have deployed . The only way to quick fix the problem so far is to
    > put this class in the classpath variable of the startweblogic script...
    >
    > Why isn't WL finding the class in the jar file as it should normally do?Could
    > it be a JMS configuration thing?
    > Thanks for any help
    >
    > The exception generated is the following:
    >
    > weblogic.jms.common.JMSException: Error deserializing object
    > at weblogic.jms.common.ObjectMessageImpl.getObject(Ob jectMessageImpl.java:113)
    > at eu.ohim.common.adm.log.ADMLoggingReceiver.onMessag e(Unknown Source)
    > at weblogic.jms.client.JMSSession.onMessage(JMSSessio n.java:1864)
    > at weblogic.jms.client.JMSSession.execute(JMSSession. java:1819)
    > at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:139)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:120)
    > ----------- Linked Exception -----------
    > java.lang.ClassNotFoundException: eu.ohim.common.adm.log.AdmLoggingEvent
    > at java.net.URLClassLoader$1.run(URLClassLoader.java: 195)
    > at java.security.AccessController.doPrivileged(Native Method)
    > at java.net.URLClassLoader.findClass(URLClassLoader.j ava:183)
    > at java.lang.ClassLoader.loadClass(ClassLoader.java:2 94)
    > at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:281)
    > at java.lang.ClassLoader.loadClass(ClassLoader.java:2 50)
    > at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:310)
    > at java.lang.Class.forName0(Native Method)
    > at java.lang.Class.forName(Class.java:190)
    > at weblogic.jms.common.ObjectMessageImpl$ObjectInputS tream2.resolveClass(ObjectMessageImpl.java:238)
    > at java.io.ObjectInputStream.inputClassDescriptor(Obj ectInputStream.java:913)
    > at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:361)
    > at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:231)
    > at java.io.ObjectInputStream.inputObject(ObjectInputS tream.java:1181)
    > at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:381)
    > at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:231)
    > at weblogic.jms.common.ObjectMessageImpl.getObject(Ob jectMessageImpl.java:109)
    > at eu.ohim.common.adm.log.ADMLoggingReceiver.onMessag e(Unknown Source)
    > at weblogic.jms.client.JMSSession.onMessage(JMSSessio n.java:1864)
    > at weblogic.jms.client.JMSSession.execute(JMSSession. java:1819)
    > at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:139)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:120)



+ Reply to Thread