when i am running my application i get the Exception in thread "main" java.lang.ExceptionInInitializerError

1.6k Views Asked by At

The program extracts data from salesforce and writes it to a text file.

Please help me in understanding the reason for error.

Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.apache.axis.client.Service.getAxisClient(Service.java:104)
    at org.apache.axis.client.Service.<init>(Service.java:113)
    at com.sforce.soap.partner.SforceServiceLocator.<init>(SforceServiceLocator.java:16)
    at com.ncr.common.dataaccess.UserAuthentication.nscLogin(UserAuthentication.java:171)
    at com.ncr.common.dataaccess.UserAuthentication.getNscLogin(UserAuthentication.java:122)
    at com.ncr.extract.lms.NSCPartnerContactExtractLMS.startExtract(NSCPartnerContactExtractLMS.java:403)
    at com.ncr.extract.lms.NSCPartnerContactExtractLMS.main(NSCPartnerContactExtractLMS.java:85)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
    at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:37)
    at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
    ... 7 more
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
    at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
    ... 11 more
Caused by: java.lang.NullPointerException
    at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
    ... 12 more
1

There are 1 best solutions below

5
On

You don't really provided so much information about your code, and it is so hard to say something from this stacktrace. It seems that there is an issue with the log4j. Have you seen this related post. Also make sure that the log4j lib is included on your buildpath.