Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOG4J2-3472 (master) make disruptor WaitStrategy configurable in Log4j configuration #830

Merged
merged 13 commits into from Apr 25, 2022

Conversation

remkop
Copy link
Contributor

@remkop remkop commented Apr 24, 2022

Raising this as a separate PR because I can't get the master branch to build in my local environment...

Does anyone have cycles to look at this?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project log4j-core: Compilation failure
[ERROR] An exception has occurred in the compiler (11). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://b
ugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
[ERROR] java.lang.NullPointerException
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1235)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitVarDef(Flow.java:989)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:956)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:997)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1020)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitMethodDef(Flow.java:964)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:866)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitClassDef(Flow.java:927)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:774)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1327)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1317)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:218)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1401)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1365)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:960)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
[ERROR]         at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:75)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR]         at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess0(JavacCompiler.java:626)
...

@jvz
Copy link
Member

jvz commented Apr 24, 2022

Ah, that would be because in master, tests for log4j-api, log4j-plugins, and log4j-core all have dedicated -test modules which contain both source and test code. JPMS combined with Maven annotation processing has resulted in splitting things up like that as the only workable build pattern so far (test fixtures that need to run the plugin annotation processor need to be separate from the test code when trying to open an existing module; it's a mess). If you move these new test classes to log4j-core-test, then they should compile properly.

@remkop
Copy link
Contributor Author

remkop commented Apr 24, 2022

@jvz Ah yes of course. Thank you Matt!

@remkop remkop merged commit 3d15928 into apache:master Apr 25, 2022
@remkop
Copy link
Contributor Author

remkop commented Apr 25, 2022

It took a while, but in the end all tests passed.
(I had to suppress XmlSchemaTest, which is failing for some unrelated reason.
I re-enabled XmlSchemaTest after confirming that all other tests pass.)

@jvz
Copy link
Member

jvz commented May 1, 2022

I figured out why that test was failing; you introduced a new element in the configuration file without anything in the XML schema for Log4j. The fix here would be to either add the XML config files to the ignore list in XmlSchemaTest or to add it to the XSD.

@remkop
Copy link
Contributor Author

remkop commented May 2, 2022

Wow, thank you for figuring that out Matt!
I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants