[logback-user] DynamicClassLoadingException - How does class loading in logback works?

Jenny jenny_uy81 at yahoo.com
Wed Nov 12 03:59:49 CET 2008


Hi,
 
I'm sorry for the earlier posts, my keyboard enter key was malfunctioning.

I'm using weblogic 10, and deployed my application as EAR. My custom appender is located in the WEB-INF/lib. I am getting this ClassNotFoundException.
 

app.ear
    - web1.war 
         - WEB-INF/lib
                customAppenderPackage.jar
 
So I've tried the following but still it can't find it:
- deploying customAppenderPackage.jar as a shared library
- putting in APP-INF/lib/customAppenderPackage.jar
- adding in the MANIFEST Class-Path
- adding as "library-ref" in weblogic.xml and weblogic-application.xml
 
The only one that worked is when I moved the customAppenderPackage.jar in my weblogic server domain library directory. But I don't want this... I want it to be inside my EAR package.
 
Any ideas how to solve this?
How does class loading in logback works?
 
 
Caused by: ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.mycompany.CustomeAppender
        at      at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:45)
        at      at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:23)
        at      at ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:50)
        at      ... 51 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.mycompany.CustomeAppender
        at      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at      at java.security.AccessController.doPrivileged(Native Method)
        at      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20081111/028f102b/attachment.htm 


More information about the Logback-user mailing list