1

I'm using log4j 2.11.1 in my project and created some custom appenders and configuration factories using the @Plugin annotation.

This compiles just fine without errors both in Eclipse 4.9 and with IntelliJ. However, running the Eclipse batch compiler the same code fails with a IllegalArgumentException:

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)

In this repo I made a minimal project to reproduce this issue. I tried using versions 4.7 and 4.9 of ECJ and tried with Java 8 OpenJDK and Oracle, all of it in a Ubuntu 18.04 machine.

Any clue of what could be happening here?

Edit: Tried using Java10 on a OSX machine and the same error appears.

  • 2
    There are a couple of bug reports for this in [Eclipse Bugzilla](https://bugs.eclipse.org/bugs/buglist.cgi?list_id=17984721&query_format=advanced&short_desc=Unknown%20Location%20%3A%20CLASS_OUTPUT&short_desc_type=substring) but unfortunately no resolution. – greg-449 Oct 26 '18 at 07:19

0 Answers0