[logback-dev] [JIRA] Commented: (LBCORE-46) DynamicClassLoadingException trying to use customAppender

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Mon Oct 27 23:52:21 CET 2008


    [ http://jira.qos.ch/browse/LBCORE-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10810#action_10810 ] 

Ceki Gulcu commented on LBCORE-46:
----------------------------------

Hello Mark,

The problem is caused by : java.lang.ClassNotFoundException: com.ziesemer.test.TestAppender

As I understand it, the class loader for your WAR is a child of the EAR class loader. However, logback will attempts to use the same class loader that loaded the LoggingContext, i.e. the EAR class laoder, which cannot see com.ziesemer.test.TestAppender in your war file. Placing com.ziesemer.test.TestAppender in the EAR will solve the problem. You should also place logback.xml in the EAR file.

The above should work as long as you have only one WAR file in the EAR. 



> DynamicClassLoadingException trying to use customAppender
> ---------------------------------------------------------
>
>                 Key: LBCORE-46
>                 URL: http://jira.qos.ch/browse/LBCORE-46
>             Project: logback-core
>          Issue Type: Bug
>          Components: Joran
>    Affects Versions: unspecified
>         Environment: Operating System: All
> Platform: All
>            Reporter: Mark A. Ziesemer
>            Assignee: Logback dev list
>         Attachments: LogBackCNFE.txt
>
>
> I'm trying to use a custom Appender with Logback under a WebSphere 6.1
> application, but am failing upon Logback configuration with a
> ch.qos.logback.core.util.DynamicClassLoadingException, caused by a
> java.lang.ClassNotFoundException .
> A search on this mailing list for "DynamicClassLoadingException" returned 0
> results, and neither the documentation nor Google were of any further help.
> Here's my setup:
> EAR:
> - logback-classic-0.9.9.jar
> - logback-core-0.9.9.jar
> - slf4j-api-1.5.0.jar
> - ...
> WAR (configured to PARENT_LAST):
> - logback.xml
> - com.ziesemer.test.TestAppender
> I will attach the stack trace / STDOUT, as it is a bit lengthy (141 lines).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list