| Joesph Matthew 2006-03-06, 5:55 pm |
| Hi,
I am trying to create a HttpClient Object (from Jakarata Commons)
inside WAS 5.0. I am getting the following exception
ExceptionInInitializerError
occured=java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
.....
..... (My code's stack trace)
.....
Caused by: org.apache.commons.logging.LogConfigurationException:
java.lang.InstantiationException (Caused by
java.lang.InstantiationException)
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:579)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:517)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:308)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
... 32 more
Caused by: java.lang.InstantiationException
at sun.reflect. InstantiationExceptionConstructorAccesso
rImpl. newInstance(Insta_ntiationExceptionConst
ructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:531)
... 37 more
I am using Commons-logging, along with commons-httpclient-3.0-beta1 and
log4j-1.2.7.
I have added commons-logging.properties to the commons-logging.jar. The
property file has the following two lines
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4j_Factory
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
All the above 3 jars are present in the WAR/WEB-INF/lib directory. The
class loader policy has been set to as described below
Application class loading mode = PARENT_LAST
Application classloader policy = Multiple
Enterprise Application Classloader Mode = PARENT_LAST
WAR Classloader Policy = APPLICATION
Can anybody shed any light on why i am getting this exception? And how
do I resolve it ?
Thanks in Advance
|