<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I found a solution. I just put my customAppenderPackage.jar in the same level (same directory) where my logback.jar files are. thanks<BR><BR>--- On <B>Wed, 11/12/08, Jenny <I>&lt;jenny_uy81@yahoo.com&gt;</I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Jenny &lt;jenny_uy81@yahoo.com&gt;<BR>Subject: [logback-user] DynamicClassLoadingException - How does class loading in logback works?<BR>To: "logback users list" &lt;logback-user@qos.ch&gt;<BR>Date: Wednesday, November 12, 2008, 10:59 AM<BR><BR>
<DIV id=yiv503416349>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm sorry for the earlier posts, my keyboard enter key was malfunctioning.</DIV>
<DIV><BR>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>app.ear</DIV>
<DIV>&nbsp;&nbsp;&nbsp; -&nbsp;web1.war&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - WEB-INF/lib</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;customAppenderPackage.jar</DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV>So I've tried&nbsp;the following but still it can't find it:</DIV>
<DIV>- deploying customAppenderPackage.jar as a shared library</DIV>
<DIV>- putting in APP-INF/lib/customAppenderPackage.jar</DIV>
<DIV>- adding in the MANIFEST Class-Path</DIV>
<DIV>- adding as "library-ref" in weblogic.xml and weblogic-application.xml</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any ideas how to solve this?</DIV>
<DIV>How does class loading in logback works?</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Caused by: ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type com.mycompany.CustomeAppender<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:45)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:23)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at ch.qos.logback.core.joran.action.AppenderAction.begin(AppenderAction.java:50)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... 51 common frames omitted<BR>Caused by: java.lang.ClassNotFoundException: com.mycompany.CustomeAppender<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
 java.net.URLClassLoader$1.run(URLClassLoader.java:200)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.security.AccessController.doPrivileged(Native Method)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.net.URLClassLoader.findClass(URLClassLoader.java:188)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.loadClass(ClassLoader.java:306)</DIV></TD></TR></TBODY></TABLE><BR></DIV><PRE>_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://qos.ch/mailman/listinfo/logback-user
</PRE></BLOCKQUOTE></td></tr></table><br>