[ 
https://issues.apache.org/jira/browse/LOG4J2-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13475734#comment-13475734
 ] 

Ralph Goers commented on LOG4J2-95:
-----------------------------------

After screwing around for a few hours I have no idea if I am even close to 
getting your test to work or fail properly. At the moment my output looks like

eclipse.buildId=unknown
java.version=1.7.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -application LogDemo.application
Command-line arguments:  -application LogDemo.application -data 
/Users/rgoers/eclipse/workspace/../runtime-LogDemo.application -dev 
file:/Users/rgoers/eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/LogDemo.application/dev.properties
 -os macosx -ws cocoa -arch x86_64 -consoleLog

!ENTRY org.eclipse.equinox.ds 4 0 2012-10-13 17:03:24.478
!MESSAGE [SCR] Exception while activating instance 
org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager@4ca21d88 of 
component org.eclipse.e4.ui.css.swt.theme  
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
        at java.lang.Class.getDeclaredMethods(Class.java:1808)
        at 
org.eclipse.equinox.internal.ds.model.ServiceComponent.getMethod(ServiceComponent.java:126)
        at 
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:213)
        at 
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
        at 
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
        at 
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
        at 
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
        at 
org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
        at 
org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
        at 
org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
        at 
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
        at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 15 more

I've not figured out what I have to do to make Eclipse happy.
                
> Adding a custom appender Appender
> ---------------------------------
>
>                 Key: LOG4J2-95
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-95
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Configurators
>    Affects Versions: 2.0-beta1
>         Environment: Windows 7 x64, Java 7 x86, Eclipse 3.8.1 x86, Eclipse 
> RCP plugin application
>            Reporter: Robert Breunung
>              Labels: appender, extend
>         Attachments: LogDemo.zip
>
>
> Hello,
> since two days I'm working with Log4j 2 . I try to migrate from Log4J. I'm 
> using it in an Eclipse application. I put the necessary jars of the binary 
> distribution into a basic plugin and a log4j2.xml into the root. This worked 
> well so far. Now I tried to add a custom appender to log4j. The class is in 
> the default source package of the Eclipse plugin. Annotations are set like in 
> the homepage documentation.
> In the first try I tried to provide the package of the Appender via the 
> log4j2.xml. I set the attribute package in the configuration element. It 
> seemed to me, the attribute is completely ignored? At least the class from 
> the given package was not loaded.
> In the second try I tried to provide the package via the static method 
> '...log4j.core.config.plugin.PluginManager.addPackage'. I debugged the method 
> to get a hint why it didn't work. It tried to transform my package 
> 'com.application.logging' into a URI 'com/application/logging' and started to 
> search with it somehow. It might have found them treating them as file, as 
> the classes were lying in a subdirectory. But as there was no file scheme in 
> the beginning of the URI, it searched a not existing jar.
> The XML parser of the configuration can't resolve the name of my appender in 
> the end.
> Do you have an idea then I do anything wrong, or then there is an open issue? 
> I can provide more details on request. Is there a programmatical way to 
> register my appender to Log4J 2 before the Logger initialization?
> Sincerely
> Robert Breunung

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to