2 Replies Latest reply on Apr 29, 2014 3:40 AM by 281a7d69-b994-44b4-8c27-ec3811ad826f

    How to use log4j in an EJB Module??

    281a7d69-b994-44b4-8c27-ec3811ad826f

      I have included the log4j.jar in libraries;

      added log4j.xml in the sources folder;

      but I m getting an error:

       

       

      <Apr 22, 2014 11:07:50 AM PKT> <Warning> <EJB> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception is:

      java.lang.NoClassDefFoundError: org/apache/log4j/Logger.

      java.lang.NoClassDefFoundError: org/apache/log4j/Logger

          at test.MyMessageBean.onMessage(MyMessageBean.java:39)

          at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:575)

          at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)

          at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:375)

          at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)

          Truncated. see log file for complete stacktrace

       

      Kindly guide  me how to resolve this???
      Thank you!