Community
Participate
Working Groups
This error appears in a project that uses log4j 2 as a dependency and has classes with annotations when compiling using the batch compiler. However, compiling from the IDE returns no error/warnings. This is the stacktrace ecj returned: Processing annotations java.lang.IllegalArgumentException: Unknown location : CLASS_OUTPUT at org.eclipse.jdt.internal.compiler.apt.util.EclipseFileManager.getFileForOutput(EclipseFileManager.java:436) at org.eclipse.jdt.internal.compiler.apt.dispatch.BatchFilerImpl.createResource(BatchFilerImpl.java:89) at org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.writeCacheFile(PluginProcessor.java:117) at org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.process(PluginProcessor.java:78) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:142) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:124) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:162) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:940) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:450) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426) at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4693) at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1781) at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1485) Processing annotations No elements to process 1. ERROR: Unknown location : CLASS_OUTPUT 1 problem (1 error) I attached to this issue a minimal test scenario. This was tested using ecj 4.7 and 4.9, with Oracle's and OpenJDK Java8 and in Ubuntu 18.04 and MacOSX High Sierra, and the error can be reproduced in all scenarios.
The test scenario to reproduce this bug can be found in the following repository: https://github.com/katanagari7c1/ecj-error-log4j
Thanks for the test. I will take a look shortly.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.