WAS 5.0 and jakarata commons-logging issue
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Application Server > WAS 5.0 and jakarata commons-logging issue




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    WAS 5.0 and jakarata commons-logging issue  
Joesph Matthew


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-06-06 10: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(Ins
 ta_ntiationExceptionConstructorAccessorI
mpl.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





[ Post a follow-up to this message ]



    Re: WAS 5.0 and jakarata commons-logging issue  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-17-06 07:59 AM

Here's a couple of links that might be useful:

http://wiki.apache.org/jakarta-comm...yAskedQuestions

This one points to a 20 pages pdf describing various scenarios:
http://www-1.ibm.com/support/docvie...uid=swg27004610

For more details about the issues with JCL:

http://www.qos.ch/logging/classloader.jsp
http://www.qos.ch/logging/thinkAgain.jsp

What worked for me is to have:
Application class loading mode = PARENT_LAST
Application classloader policy = Multiple
WAR Classloader Policy = APPLICATION
*** also check this one -> Web module class loading mode = PARENT_FIRST

Hope this helps.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:18 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register