|
Home > Archive > WebSphere Portal Server > June 2005 > Class loader problems
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Class loader problems
|
|
|
| Hi,
I have a problem deploying my application because of a class loader issue. It has to do with Log4J. I have to deploy the Log4J jar and other Jars that use it within the WEB-INF/lib of my WAR (Portlet APP) or else there is a conflict with another Logger or
LogAppender. It seems that the conflict is between a ConsoleAppender and a RollingFileAppender. I have experimented allot but all is by trial and error and I'm getting tired. Where can I find more information about class loaders in WebSphere App Server a
nd WebSphere Portal Server?, and what are SINGLE and MULTIPLE class loader policies?
The stack trace goes as follows:
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [sun.misc.Launcher$AppClassLoader@300abbdf] whereas object of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [com.ibm.ws.classloader.ExtJarClassLoader@1382300637 Local ClassPath: ...
log4j:ERROR Could not instantiate appender named "A1".
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: org.apache.log4j.RollingFileAppender
...
log4j:ERROR Could not parse input source [org.xml.sax.InputSource@2c67fb94].
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java(Compiled Code))
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:141)
...
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: org.apache.log4j.RollingFileAppender
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
...
| |
| Brian J. Sayatovic 2005-06-30, 7:50 am |
| Try these...
http://publib.boulder.ibm.com/infoc..._classload.html
http://www.webagesolutions.com/know...b012/index.html
Regards,
Brian.
<juan.acosta@gmail.com> wrote in message
news:15248654.1119978147333.JavaMail.wassrvr@ltsgwas007.sby.ibm.com...
> Hi,
>
> I have a problem deploying my application because of a class loader issue.
It has to do with Log4J. I have to deploy the Log4J jar and other Jars that
use it within the WEB-INF/lib of my WAR (Portlet APP) or else there is a
conflict with another Logger or LogAppender. It seems that the conflict is
between a ConsoleAppender and a RollingFileAppender. I have experimented
allot but all is by trial and error and I'm getting tired. Where can I find
more information about class loaders in WebSphere App Server and WebSphere
Portal Server?, and what are SINGLE and MULTIPLE class loader policies?
>
> The stack trace goes as follows:
>
> log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable
to a "org.apache.log4j.Appender" variable.
> log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
> log4j:ERROR [sun.misc.Launcher$AppClassLoader@300abbdf] whereas object of
type
> log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
[com.ibm.ws.classloader.ExtJarClassLoader@1382300637 Local ClassPath: ...
> log4j:ERROR Could not instantiate appender named "A1".
> log4j:ERROR Could not create an Appender. Reported error follows.
> java.lang.ClassCastException: org.apache.log4j.RollingFileAppender
> ..
>
> log4j:ERROR Could not parse input source
[org.xml.sax.InputSource@2c67fb94].
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java(Compiled Code))
> at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java
:141)
> ..
>
> log4j:ERROR Could not create an Appender. Reported error follows.
> java.lang.ClassCastException: org.apache.log4j.RollingFileAppender
> at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
> ..
|
|
|
|
|