Pregunta

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**

I have also tried including classpath: .\lib\log4j....jar in the MANIFEST.MF but still no positive response..

Kindly guide me how to resolve this???

¿Fue útil?

Solución 2

Whether it's EJB Module or you are working on some other application with WebLogic Server; it requires a configuration Process; you can go through the links given below:

[http://techworldrocks.wordpress.com/2012/08/16/configure-log4j-logging-for-weblogic-server-log/][1]

[http://docs.oracle.com/cd/E24329_01/web.1211/e24428/config_logs.htm#i1014785][1]

Otros consejos

Use Java Util Logging, which is included in the JEE spec. No additional jars have to be added.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top