commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Lalor <bla...@bravo5.org>
Subject Commons Logging with WebSphere
Date Wed, 05 Nov 2003 20:46:14 GMT
Good afternoon, all.  I'm attempting to use the Commons Logging API  
with WebSphere Portal 5.0.  I'm getting a Log instance as shown in the  
logging user's guide
	   private static Log log = LogFactory.getLog(CLASS.class);

This works fine in my development environment (WSAD on XP), but when I  
try to deploy my portlet to a full-blown instance of Portal, my portlet  
blows up.  The following is a snippet of the stack trace that occurs  
when the portlet's being loaded.   
biz.deltafaucet.contacts_list.ContactsListPortlet is my portlet:

[biz.deltafaucet.contacts_list.ContactsListPortlet]: Failed to load  
servlet: java.lang.ExceptionInInitializerError:  
org.apache.commons.logging.LogConfigurationException:  
java.lang.ClassCastException: com.ibm.ws.commons.logging.TrLogFactory
	at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:609)
	at java.security.AccessController.doPrivileged(Native Method)
	at  
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:561)
	at  
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:352)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
	at  
biz.deltafaucet.contacts_list.ContactsListPortlet.<clinit>(ContactsListP 
ortlet.java:45)
	at java.lang.Class.newInstance0(Native Method)
	at java.lang.Class.newInstance(Class.java(Compiled Code))
	at java.beans.Beans.instantiate(Beans.java:233)

It looks like there may already be some of the commons logging  
infrastructure built into WebSphere...

I'm assuming that I need to write a wrapper around the WebSphere  
logging instance, but I'm hoping someone has already done that work.  
:-)

Thanks,
B

--
    __   ____
   / /  / __/ Brian Lalor
  / _ \/__ \  blalor@bravo5.org
/_.__/____/  http://bravo5.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message