function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
crocodilecrocodile 

Exception in thread main java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory

Hi,

     Can anyone please solve my error. 

Am facing same error when:

 

1. Trying to generate java API from the WSDL file.

2. At the line: binding = (SoapBindingStub) new SforceServiceLocator().getSoap(); in my program.

 

The common error is: 

 

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
        at org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:45)
        at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
        at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
        at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)

 

The jar files included in the class path are:

 

C:\axis-1_3\lib\activation.jar;
C:\axis-1_3\lib\axis.jar;
C:\axis-1_3\lib\axis-ant.jar;
C:\axis-1_3\lib\axis-schema.jar;
C:\axis-1_3\lib\commons-discovery-0.2.jar;
C:\axis-1_3\lib\commons-logging-1.0.4.jar;
C:\axis-1_3\lib\jaxrpc.jar;
C:\axis-1_3\lib\log4j-1.2.8.jar;
C:\axis-1_3\lib\mail.jar;
C:\axis-1_3\lib\saaj.jar;
C:\axis-1_3\lib\wsdl4j-1.5.2.jar;
C:\axis-1_3\lib\wsdl4j.jar;
C:\axis-1_3\lib\commons-logging-1.1.1.jar;

 

 

Can anyone please help me to solve the error.

 

Thanks in adv,

-Vissu

lamayclamayc
I know it might not be a useful reply but org.apache.commons.logging.LogFactory is located in commons-logging-1.0.4.jar. You can even open it up to verify. If you are getting this problem then it can only mean that commons logging is NOT on the classpath. I am assuming you are talking about a compile time error. In that case, are you sure you are looking at the compile time classpath vs. runtime classpath?