tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Using jdk1.4 logger problem
Date Fri, 05 Sep 2003 03:16:34 GMT

"Chan, Kam Yuen" <KChan@rgare.com> wrote in message
news:EB1A6A7DCB06804195592EF1716F15B50405AADB@rgaexmail.rgare.com...
> Hello,
>
> I am trying to load our App in Tomcat.
> One of the initialization is being done by a Servlet, which is set to
autoload. During this initialization, we also initializes the logger, which
are subclasses of the JDK1.4 logger classes.
>
> But, some how the logger manager can't find the handler classes. (Class
loader problem?)

Yup, it's a CL problem.  Unfortunately, it looks like the problem is in
Sun's implementation of 1.4 Logging.  Instead of using the
ContextClassLoader, it's looking for your class in the AppClassLoader
(which, of course, knows nothing about your class :).

At the moment, the only work-around I can see is to place your jar in
$CATALINA_HOME/common/endorsed.  Of course, if it will make you feel better,
you can also b*tch at Sun for not designing their Logging implementation in
a way that is friendly to app-servers ;-).

>
> Please see below the stack trace.  You will see that the
resoft.framework.logging.DBHandler is the class that can't be found. But it
is in the same package and jar as the resoft.framework.logging.ResoftLogger,
which was invoked in the middle of the stack.
>
> The jar is placed in the WEB-INF/lib directory.
>
> Thanks in advance for your Help.
>
> Kam Chan
>
> Can't load log handler "resoft.framework.logging.DBHandler"
> java.lang.ClassNotFoundException: resoft.framework.logging.DBHandler
> java.lang.ClassNotFoundException: resoft.framework.logging.DBHandler
>  at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>  at java.util.logging.LogManager$3.run(LogManager.java:717)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at
java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:710)
>  at java.util.logging.LogManager.access$800(LogManager.java:114)
>  at
java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:817)
>  at java.util.logging.Logger.log(Logger.java:420)
>  at java.util.logging.Logger.doLog(Logger.java:446)
>  at java.util.logging.Logger.logp(Logger.java:589)
>  at resoft.framework.logging.ResoftLogger.log(ResoftLogger.java:780)
>  at resoft.framework.logging.ResoftLogger.info(ResoftLogger.java:439)
>  at resoft.framework.sessionmgmt.AppCtx.outputStartupInfo(AppCtx.java:456)
>  at
resoft.framework.appsvr.sessionmgmt.AppServerCtx.init(AppServerCtx.java:539)
>  at
resoft.framework.appsvr.initialization.AppServerStartUp.startup(AppServerSta
rtUp.java:97)
>  at
resoft.webserver.servlets.WebServerStartup.init(WebServerStartup.java:156)
>  at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
8)
>  at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
>  at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3279)
>  at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
>  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
>  at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
>  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
>  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
>  at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
>  at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
>  at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
>  at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
>  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:324)
>  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)




Mime
View raw message