On Tue, 2005-10-18 at 11:03 +0200, Sebastian Komander wrote:
> Hi,
>
> I've created a portlet. I use commons-digester 1.7 to read an xml file.
> The portlet is running great in a WebSphere Portal V5.0 Test Environment.
>
> But, if i deploy the portlet, I get a LogConfigurationException and a
> ClassCastException.
> I think, the problem is, that WebSphere Portal has an own log service. And
> Digester tries to fetch this log service. Then Digester tries to cast the
> WebSphere log service and a ClassCastException is throws.
>
> Can you give me a solution ? Need help plz.
>
> Here is a part of the exception, the whole is attached.
>
> --
> 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
Hmm..websphere has its own *LogFactory* implementation? I knew it was
theoretically possible but didn't know anyone actually did that.
Your problem is almost certainly unrelated to commons-digester. It would
be good to verify that, though, so I suggest that you write a trivial
class that simply does
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
...
private static final Log log = LogFactory.getLog("dummy.category");
You should then get the same problem. Assuming you do, you should then
contact your websphere support about this, as:
(a) it's not related to digester, and
(b) as websphere is providing a custom and proprietory LogFactory
implementation there's very little that anyone here can do to diagnose
any problems with it.
You might want to read the commons-logging wiki
(http://wiki.apache.org); problems to do with classloading are not
uncommon. But the advice there is always assuming the standard
LogFactory is used; with a custom (and unknown one) the behaviour can be
very different.
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]