[
https://issues.apache.org/jira/browse/LOG4J2-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087542#comment-14087542
]
Remko Popma commented on LOG4J2-752:
------------------------------------
When you say
bq. run with the "java -jar" incantation
are you starting the process from NetBeans? My first impression is that this is
a NetBeans issue... What happens if you run from the command line?
Also, as of the 2.0.1 release, the "packages" attribute in configuration works
again, so if you specify the package name of your custom plugin in your
configuration file, log4j2 should be able to find your custom plugin. Can you
see if that solves the problem?
> 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: [email protected]
For additional commands, e-mail: [email protected]