Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0039557 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Tools] Others | major | always | 2018-10-29 16:42 | 2018-11-08 09:56 | |||
| Reporter | jarmendariz | View Status | public | |||||
| Assigned To | jarmendariz | |||||||
| Priority | normal | Resolution | fixed | |||||
| Status | closed | Fix in branch | Fixed in SCM revision | |||||
| Projection | none | ETA | none | |||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Merge Request Status | ||||||||
| Review Assigned To | alostale | |||||||
| OBNetwork customer | No | |||||||
| Summary | 0039557: Eclipse warnings task fails when processing log4j annotations | |||||||
| Description | The project compiles without errors in Eclipse IDE. However, using the ecj batch compiler in the eclipse-warnings task it fails in the annotation processing step with the following message: 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) This issue has already been reported in: - Stack Overflow: https://stackoverflow.com/questions/52998733/ecj-fails-with-illegalargumentexception-processing-log4j-annotations [^] - Log4j Jira: https://issues.apache.org/jira/browse/LOG4J2-2487 [^] - Eclipse issue tracker: https://bugs.eclipse.org/bugs/show_bug.cgi?id=540569 [^] | |||||||
| Steps To Reproduce | The following repository contains a minimal scenario to reproduce this issue: https://github.com/katanagari7c1/ecj-error-log4j [^] Just clone this repository and execute run-ecj.sh. | |||||||
| Proposed Solution | Until either Eclipse/Apache comes with a patch to solve this issue, log4j's annotation processor can be skipped in batch build by removing META-INF/services/javax.annotation.processing.Processor in log4j-core-x.y.z.jar. This should be done only in eclipse-warnings task. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
|||||||||
|
|||||||||
Notes |
|
|
(0107658) jarmendariz (viewer) 2018-10-30 14:28 |
Repository: ci/eclipse-warnings Changeset: ada4fd8fd3c2 Author: Javier Armendáriz <javier.armendariz <at> openbravo.com> Date: Mon, 29 Oct 2018 17:24:08 +0100 URL: https://code.openbravo.com/tools/ci/eclipse-warnings/rev/ada4fd8fd3c2 [^] Fixed issue 39557: Ecj fails when processing log4j annotations This replaces the log4j-core library in the classpath with a customized jar with no annotation processing as a workaround until this bug is solved. Also wrapped all js code in CDATA tags to avoid problems with the && operator. --- M build-eclipse.xml A log4j-core-2.11.1.jar --- |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2018-10-29 16:42 | jarmendariz | New Issue | |
| 2018-10-29 16:42 | jarmendariz | OBNetwork customer | => No |
| 2018-10-29 16:44 | jarmendariz | Relationship added | related to 0039504 |
| 2018-10-29 16:45 | jarmendariz | Assigned To | => jarmendariz |
| 2018-10-29 16:45 | jarmendariz | Status | new => scheduled |
| 2018-10-30 14:28 | jarmendariz | Note Added: 0107658 | |
| 2018-10-30 14:28 | jarmendariz | Status | scheduled => resolved |
| 2018-10-30 14:28 | jarmendariz | Resolution | open => fixed |
| 2018-10-30 14:29 | jarmendariz | Review Assigned To | => alostale |
| 2018-11-08 09:56 | alostale | Status | resolved => closed |
| Copyright © 2000 - 2009 MantisBT Group |