Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/management/WebLogicMBean
at weblogic.kernel.KernelLogManager$LoggerMaker.
at weblogic.kernel.KernelLogManager.getLogger(KernelLogManager.java:28)
at weblogic.logging.commons.LogImpl.
at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:21)
at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:18)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.axis2.description.AxisDescription.
at org.openuri.www.GetPrepaidAccountBalanceProcessStub.populateAxisService(GetPrepaidAccountBalanceProcessStub.java:41)
at org.openuri.www.GetPrepaidAccountBalanceProcessStub.
at org.openuri.www.GetPrepaidAccountBalanceProcessStub.
at org.openuri.www.GetPrepaidAccountBalanceProcessStub.
at org.openuri.www.GetPrepaidAccountBalanceProcessStub.
at com.pierre.acmetester.AcmePrepaidTester.main(JawwalPrepaidTester.java:14)
the solution is:
import org.apache.commons.logging.LogFactory;
...
System.setProperty(LogFactory.FACTORY_PROPERTY, "org.apache.commons.logging.impl.Log4jFactory");
This will force Apache Commons Logging to use Log4J rather than WebLogic... and don't listen to people saying that Log4J is the default implementation for Apache... IT IS NOT!
I can't believe in 2010 we are still in such a pathetic shape.... Java will die, it's too messy, everything is just a HUGE mess.... even the fact that in order to log a message I need to instantiate a WebLogicMBean is grotesque. And the fact that the WebLogicMBean initialization fails without a proper error message is grotesque.... EVERYTHING IS GROTESQUE. Why people can't do a proper job. Why do we have to suffer so much.
1 comment:
add commons-logging-XXXXX.jar
http://nexus.cestpasdur.com/nexus/content/repositories/sonatype-forge/com/adobe/flex/compiler/commons-logging/4.5.1.21328/
add try it!
Post a Comment