  | |  | Problems with log4j and WebLogic | Problems with log4j and WebLogic 2003-06-14 - By Jerry Cattell
Back I am trying to get log4j working with a very simple session bean in weblogic 7.0. The bean works fine if I comment out all of the logging code. If I leave the logging code in I get this exception:
java.lang.NoClassDefFoundError : org/apache/log4j/Category at java.lang.Class (Native Method) at java.lang.Class (Class.java:737) at weblogic.ejb20.ejbc.EJBCompiler.computeCRC(EJBCompiler.java:626) at weblogic.ejb20.ejbc.EJBCompiler.makeFileHash(EJBCompiler.java:539) at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:160) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:332) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:489) at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:819) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1268) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:232) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer .java:1570) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java :737) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java :555) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer .java:1062) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java :730) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java :24) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189) -- ---- ---- -- nested within: -- ---- ---- ----- weblogic.management.ManagementException: 149233 - with nested exception: [java.lang.NoClassDefFoundError: org/apache/log4j/Category] at weblogic.management.deploy.slave.SlaveDeployer.convertThrowable(SlaveDeployer .java:834) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer .java:1180) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java :730) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java :24) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
Here is all of the pertinent information I can think of:
The manifest for the EJB JAR: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3 Created-By: 1.3.1_07-b02 (Sun Microsystems Inc.) Built-By: Jerry Cattell Built-On: 2003-06-14T06:13:20 Class-Path: log4j-1.2.8.jar
The files in the EAR: META-INF/MANIFEST.MF test-ejb.jar log4j-1.2.8.jar log4j.properties META-INF/application.xml
The files in the JAR: META-INF/MANIFEST.MF test/ejb/NetworkServerBean.class test/ejb/NetworkServerSession.class test/interfaces/NetworkServerLocal.class test/interfaces/NetworkServerLocalHome.class test/interfaces/NetworkServerRemote.class test/interfaces/NetworkServerRemoteHome.class test/util/NetworkServerUtil.class META-INF/ejb-jar.xml META-INF/weblogic-ejb-jar.xml
If someone can see what I'm doing wrong, I would greatly appreciate it.
Thanks, Jerry
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: log4j-user-unsubscribe@(protected) For additional commands, e-mail: log4j-user-help@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |