logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1803) JMH generated benchmark classes not included in jar
Date Thu, 02 Feb 2017 15:44:51 GMT

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

ASF subversion and git services commented on LOG4J2-1803:
---------------------------------------------------------

Commit 8ce7dbcdf1d8a92bba3f0c8c9429cd4c8c491306 in logging-log4j2's branch refs/heads/master
from rpopma
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=8ce7dbc ]

LOG4J2-1803 changelog


> JMH generated benchmark classes not included in jar
> ---------------------------------------------------
>
>                 Key: LOG4J2-1803
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1803
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core, Performance Benchmarks
>    Affects Versions: 2.8
>            Reporter: Remko Popma
>            Assignee: Ralph Goers
>             Fix For: 2.8.1
>
>
> Some time after the 2.7 release, the JMH benchmarks stopped working. When trying to execute
them, this error occurs:
> {code}
> java.lang.IllegalArgumentException: Benchmark does not match a class
> 	at org.openjdk.jmh.util.ClassUtils.loadClass(ClassUtils.java:90)
> 	at org.openjdk.jmh.runner.BaseRunner.runBenchmark(BaseRunner.java:198)
> 	at org.openjdk.jmh.runner.BaseRunner.runBenchmarks(BaseRunner.java:95)
> 	at org.openjdk.jmh.runner.ForkedRunner.run(ForkedRunner.java:51)
> 	at org.openjdk.jmh.runner.ForkedMain.main(ForkedMain.java:68)
> Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.perf.jmh.generated.FileAppenderBenchmark_julFile
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:195)
> 	at org.openjdk.jmh.util.ClassUtils.loadClass(ClassUtils.java:72)
> 	... 4 more
> {code}
> When I build the project, the classes generated by JMH under log4j-perf/target/generated-sources/annotations
are not included in the shaded benchmarks.jar or in log4j-perf-2.8.1-SNAPSHOT.jar...
> The cause seems to be a change in the master pom:
> the {{maven-compiler-plugin}} plugin now has the below section which was not there in
2.7. 
> If I take it out and build only log4j-perf, the benchmarks run without error. (But building
all modules fails: some problem in log4j-core...)
> {code}
>   <executions>
>     <execution>
>       <!-- disable annotation processing for first pass -->
>       <id>default-compile</id>
>       <goals>
>         <goal>compile</goal>
>       </goals>
>       <phase>compile</phase>
>       <configuration>
>         <proc>none</proc>
>       </configuration>
>     </execution>
>     <execution>
>       <!-- then do a processing-only pass to generate plugins .dat file -->
>       <id>process-plugins</id>
>       <goals>
>         <goal>compile</goal>
>       </goals>
>       <phase>process-classes</phase>
>       <configuration>
>         <proc>only</proc>
>       </configuration>
>     </execution>
>   </executions>
> {code}
> From the log4j-dev mailing list:
> {quote}
> That maven-compiler-plugin config was originally only included in log4j-core in order
to allow the PluginProcessor annotation processor to re-run against log4j-core without needing
to split it into its own jar. I'm not sure why it's configured for everything now.
> {quote}
> Potentially related: somebody reported on StackOverflow that [their custom plugin no
longer loads with 2.8|http://stackoverflow.com/questions/41938128/log4j-2-8-cannot-load-custom-converters-in-osgi-environment].



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message