You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Zachary Boe (JIRA)" <ji...@apache.org> on 2014/07/29 02:11:40 UTC

[jira] [Created] (LOG4J2-752) Log4J2 not finding core Log4J2Plugins.dat when a custom appender is present

Zachary Boe created LOG4J2-752:
----------------------------------

             Summary: Log4J2 not finding core Log4J2Plugins.dat when a custom appender is present
                 Key: LOG4J2-752
                 URL: https://issues.apache.org/jira/browse/LOG4J2-752
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0
         Environment: RHEL 6
Netbeans 7.4
Java 1.7.0u45
            Reporter: Zachary Boe


I'm working on a GUI that needs to be webstart capable.  I have a custom appender that I use to capture logging entries in memory so they can be displayed on a Swing panel for the user.  Everything runs fine when I run it straight from the IDE, but things get wonky when I try to build the jars and run with the "java -jar" incantation.

In short, with the webstart option *on* and when the custom appender is present (in a package in the src/ folder, not even referenced anywhere else in code or in log4j2.xml), Log4J2 will fail to find the Log4J2Plugins.dat file in the log4j2-core jar, and will subsequently fail to find any other appenders/loggers besides my custom one. Upon removing the package with the custom appender, Log4J2 will find it's own .dat file and everything is fine.

With the webstart option *off* in the netbeans menu (which all it seems to do, by looking a diff, is remove the "Codebase: *" line from META-INF/MANIFEST.MF), the custom appender and log4j2 work in harmony.

I have the log4j2-core and log4j2-api jars added as compile-time libraries. I can unzip the log4j2-core jar and my application jar after everything is built and find the respective Log4J2Plugins.dat files in each jar.

I have example netbeans projects which I can hopefully attach at request to demonstrate this problem. I feel I've done a great bit of troubleshooting to narrow down this problem. Hopefully this can be resolved, or I may have to downgrade to log4j, since it's known working on other projects in house.

Thanks for your help!



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org