You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying out Error Prone, the compilation failed because one of our other annotation processors required an extra jar on the classpath. JavacCompiler.parseModernStream ignores annotation processor exceptions, making it very hard to figure out what went wrong.
This is the forked Javac's output:
/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/dataconversion/MediaType.java:20: warning: [deprecation] Externalizer in org.infinispan.commons.marshall has been deprecated
import org.infinispan.commons.marshall.Externalizer;
^
/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/dataconversion/MediaType.java:22: warning: [deprecation] SerializeWith in org.infinispan.commons.marshall has been deprecated
import org.infinispan.commons.marshall.SerializeWith;
^
/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/tx/XidImpl.java:13: warning: [deprecation] AdvancedExternalizer in org.infinispan.commons.marshall has been deprecated
import org.infinispan.commons.marshall.AdvancedExternalizer;
^
/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/dataconversion/MarshallerEncoder.java:7: warning: [deprecation] StreamingMarshaller in org.infinispan.commons.marshall has been deprecated
import org.infinispan.commons.marshall.StreamingMarshaller;
^
/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/util/ImmutableListCopy.java:15: warning: [deprecation] AdvancedExternalizer in org.infinispan.commons.marshall has been deprecated
import org.infinispan.commons.marshall.AdvancedExternalizer;
^
Note: Writing META-INF/services/reactor.blockhound.integration.BlockHoundIntegration
5 warnings
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.NoClassDefFoundError: javax/annotation/Generated
at org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor.addGeneratedClassHeader(AutoProtoSchemaBuilderAnnotationProcessor.java:565)
at org.infinispan.protostream.annotations.impl.processor.MarshallerSourceCodeGenerator.generateMessageMarshaller(MarshallerSourceCodeGenerator.java:156)
at org.infinispan.protostream.annotations.impl.processor.MarshallerSourceCodeGenerator.generateMarshaller(MarshallerSourceCodeGenerator.java:56)
at org.infinispan.protostream.annotations.impl.BaseProtoSchemaGenerator.generateMarshallers(BaseProtoSchemaGenerator.java:204)
at org.infinispan.protostream.annotations.impl.BaseProtoSchemaGenerator.generateAndRegister(BaseProtoSchemaGenerator.java:175)
at org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor.processClass(AutoProtoSchemaBuilderAnnotationProcessor.java:321)
at org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor.processElement(AutoProtoSchemaBuilderAnnotationProcessor.java:252)
at org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor.process(AutoProtoSchemaBuilderAnnotationProcessor.java:179)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1026)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:941)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1270)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1384)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1263)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:935)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:316)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
Caused by: java.lang.ClassNotFoundException: javax.annotation.Generated
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:435)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 18 more
And this is the parsed list of messages:
messages = {java.util.ArrayList} size = 5
0 = {org.codehaus.plexus.compiler.CompilerMessage} "/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/dataconversion/MediaType.java:[20,38] [deprecation] Externalizer in org.infinispan.commons.marshall has been deprecated"
1 = {org.codehaus.plexus.compiler.CompilerMessage} "/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/dataconversion/MediaType.java:[22,38] [deprecation] SerializeWith in org.infinispan.commons.marshall has been deprecated"
2 = {org.codehaus.plexus.compiler.CompilerMessage} "/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/tx/XidImpl.java:[13,38] [deprecation] AdvancedExternalizer in org.infinispan.commons.marshall has been deprecated"
3 = {org.codehaus.plexus.compiler.CompilerMessage} "/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/dataconversion/MarshallerEncoder.java:[7,38] [deprecation] StreamingMarshaller in org.infinispan.commons.marshall has been deprecated"
4 = {org.codehaus.plexus.compiler.CompilerMessage} "/home/dan/Work/infinispan/commons/all/src/main/java/org/infinispan/commons/util/ImmutableListCopy.java:[15,38] [deprecation] AdvancedExternalizer in org.infinispan.commons.marshall has been deprecated"
The text was updated successfully, but these errors were encountered:
I think I've just hit the same problem: hibernate-jpamodelgen 5.5.5 fails with StackOverflowError, but nothing to see (except "cannot find symbol" etc.) with <forceJavacCompilerUse>true</forceJavacCompilerUse> for maven-compiler-plugin.
Very dodgy...
mthmulders
added a commit
to infosupport/plexus-compiler
that referenced
this issue
Nov 29, 2021
While trying out Error Prone, the compilation failed because one of our other annotation processors required an extra jar on the classpath.
JavacCompiler.parseModernStream
ignores annotation processor exceptions, making it very hard to figure out what went wrong.This is the forked Javac's output:
And this is the parsed list of messages:
The text was updated successfully, but these errors were encountered: