geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <tbo...@yahoo.com>
Subject Re: class loading issue
Date Mon, 23 Jan 2006 12:28:01 GMT
Yeah :(. I tried that, and it isn't working.
Basically, Geronimo says that some appender was loaded
by the TomcatClassLoader and another ConsoleAppender
was loaded by the sun.misc.LancherAppClassLoader.
Here's the full dump:

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
[org.apache.geronimo.tomcat.TomcatClassLoader@1413e5a]
whereas objec
t of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was
loaded by [sun.misc.Launcher$
AppClassLoader@53ba3d].
log4j:ERROR Could not instantiate appender named "A1".
log4j:ERROR Could not create an Appender. Reported
error follows.
java.lang.ClassCastException
        at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.ja
va:165)
        at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurat
or.java:140)
        at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfi
gurator.java:153)
        at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOM
Configurator.java:415)
        at
org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.ja
va:335)
        at
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:788)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:685)
        at
org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:5
43)
        at
org.openlaszlo.servlets.responders.ResponderLOGCONFIG.configure(Respo
nderLOGCONFIG.java:265)
        at
org.openlaszlo.servlets.responders.ResponderLOGCONFIG.configureWithLP
SConfig(ResponderLOGCONFIG.java:164)
        at
org.openlaszlo.servlets.responders.ResponderLOGCONFIG.configure(Respo
nderLOGCONFIG.java:120)
        at
org.openlaszlo.servlets.LZServlet.initLPS(LZServlet.java:122)
        at
org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:345)
        at
org.openlaszlo.servlets.LZServlet.doPost(LZServlet.java:522)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
        at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSu
bjectValve.java:46)
        at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.
invoke(GeronimoStandardContext.java:262)
        at
org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(Trans
actionContextValve.java:53)
        at
org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(Compone
ntContextValve.java:47)
        at
org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(Instance
ContextValve.java:60)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
541)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:868)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:663)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
        at java.lang.Thread.run(Thread.java:534)
log4j:WARN No appenders could be found for logger
(org.openlaszlo.i18n.LaszloMes
sages).
log4j:WARN Please initialize the log4j system
properly.


Thanks,
Tyler



--- Gianny Damour <gianny.damour@optusnet.com.au>
wrote:

> Hello Tyler,
> 
> Could you please try this configuration?
> 1. set context-priority-classloader to true; and
> 2. put your own jdom, axis and commons-httpclient
> jars in WEB-INF/lib.
> 
> I think that it should work with this approach.
> 
> If not (due to Log4J initialization problem?), then
> could you please 
> provide a stack-trace of the error?
> 
> Thanks,
> Gianny
> 
> 
> tbot55@yahoo.com wrote:
> 
> >I must be misunderstanding something. Here's my
> >problem. I'm trying to use an application that
> >requires a different version of jdom.jar and
> axis.jar,
> >and it also uses commons-httpclient.jar, which
> isn't
> >found in the geronimo repository.
> >
> >It does some webservices stuff. So I replace the
> >jdom.jar in the repository directory and I bypass
> one
> >of my problems. Then I have to somewhat merge the
> >axis.jar it comes with and the one in the geronimo
> >repository, and I overcome another problem (though
> now
> >the daytrader example is breaking). After this, I'm
> >getting a commons-httpclient class-not-found error,
> >even though I've manually added it to the
> repository.
> >
> >So, I figure out another workaround: I set the
> >context-priority-classloader variable to true in
> the
> >geronimo-web.xml, and I modify the
> >TomcatClassLoader.java file to this (full modified
> >TomcatClassLoader.java file attached):
>
>------------------------------------------------------
>
>TomcatClassLoader.ResourceClassLoader.getResource:----
>
>------------------------------------------------------
> >           if ((contextPriorityClassLoader &&
> >                name.startsWith("org/apache/axis"))
> ||
> >               (contextPriorityClassLoader &&
> >               
> >name.startsWith("org/apache/commons/httpclient"))){
> >           }
> >           else if (true
> >||//!contextPriorityClassLoader ||
> >...
> >           return super.loadClass(name);
> >       }
>
>------------------------------------------------------
> >TomcatClassLoader.loadClass:
> -------------------------
>
>------------------------------------------------------
> >           if ((contextPriorityClassLoader &&
> >                name.startsWith("org.apache.axis"))
> ||
> >               (contextPriorityClassLoader &&
> >               
> >name.startsWith("org.apache.commons.httpclient"))){
> >           }
> >           else if (true
> >||//!contextPriorityClassLoader ||
> >...
> >               return super.loadClass(name);
> >           }
>
>-----------------------------------------------------------
>
>-----------------------------------------------------------
> >
> >This makes the application work. Now, I did try
> just
> >setting context-priority-classloader to true
> without
> >doing these modifications, and I got errors about
> not
> >initializing log4j properly. Is there a better way
> to
> >make the class loader do what I want to do?
> >
> >Tyler
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message