Bug 540569 - IllegalArgumentException: Unknown location: CLASS_OUTPUT when processing annotations with ECJ batch compiler
Summary: IllegalArgumentException: Unknown location: CLASS_OUTPUT when processing anno...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.9   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-29 08:09 EDT by Javier Armendáriz CLA
Modified: 2022-11-10 14:13 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Armendáriz CLA 2018-10-29 08:09:38 EDT
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.
Comment 1 Javier Armendáriz CLA 2018-10-29 08:12:35 EDT
The test scenario to reproduce this bug can be found in the following repository:

https://github.com/katanagari7c1/ecj-error-log4j
Comment 2 Jay Arthanareeswaran CLA 2018-10-30 00:55:56 EDT
Thanks for the test. I will take a look shortly.
Comment 3 Eclipse Genie CLA 2020-10-20 14:33:28 EDT
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.
Comment 4 Eclipse Genie CLA 2022-11-10 14:13:45 EST
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.