We have a larger GWT application that used to be built with GWT v2.8.0. I am trying to upgrade it to GWT v2.9.0.
Compilation and packaging etc. all works fine, but when I try to start it (via maven using the goal gwt:run) I get the below error and stacktrace.
Any idea anyone, what is causing this and if and how one can fix this?
I am using an AdopOpenJDK v8.0.292.10 (hotspot) as runtime.
[INFO] --- gwt-maven-plugin:2.9.0:run (default-cli) # myapp-web ---
[INFO] create exploded Jetty webapp in D:\Projects\myapp-web\target\myapp
[INFO] Super Dev Mode starting up
[INFO] workDir: C:\Users\mms\AppData\Local\Temp\gwt-codeserver-3584342502042631589.tmp
[INFO] Loading Java files in com.example.myapp.MyApp.
[ERROR] java.lang.IllegalArgumentException
[ERROR] at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[ERROR] at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[ERROR] at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
[ERROR] at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
[ERROR] at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
[ERROR] at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
[ERROR] at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
[ERROR] at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
[ERROR] at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:349)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)
[ERROR] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[ERROR] at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:213)
[ERROR] at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:89)
[ERROR] at com.google.gwt.dev.codeserver.Outbox.<init>(Outbox.java:61)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.makeOutboxTable(CodeServer.java:192)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:151)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:104)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:55)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at com.google.gwt.dev.shell.SuperDevListener.runCodeServer(SuperDevListener.java:112)
[ERROR] at com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:91)
[ERROR] at com.google.gwt.dev.DevMode.ensureCodeServerListener(DevMode.java:666)
[ERROR] at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:785)
[ERROR] at com.google.gwt.dev.DevMode.doStartup(DevMode.java:551)
[ERROR] at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:888)
[ERROR] at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:705)
[ERROR] at com.google.gwt.dev.DevMode.main(DevMode.java:432)
Firstly I would make sure you have deleted any GWT caching files/directories. Look in C:\Users\mms\AppData\Local\Temp\ for any files/folders starting with gwt.
Another possibility is that you have dependencies in your project that are using an older version of the asm.jar library that is incompatible with the GWT compiler.
In more detail, com.google.gwt:gwt-dev:2.9.0 is built against org.ow2.asm:7.1 . Check that your project does not have a dependency on ASM that is earlier than 7. (Note that this could be a transitive dependency.)
Related
Do anybody has a good link to create outbox patten using debezium ?
Steps mentioned in below URL is not seems to be working .
https://github.com/debezium/debezium-examples/tree/master/outbox
Error Trace :
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Debezium Outbox Demo - Build Aggregator 1.0.0-SNAPSHOT:
[INFO]
[INFO] Debezium Outbox Demo - Build Aggregator ............ SUCCESS [ 1.729 s]
[INFO] Debezium Outbox Demo - Order Service ............... FAILURE [ 43.897 s]
[INFO] Debezium Outbox Demo - Shipment Service ............ FAILURE [ 45.137 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.723 s (Wall Clock)
[INFO] Finished at: 2021-03-06T01:04:50+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.12.0.Final:build (default) on project outbox-order-service: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Cannot find the native-image in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using gu install native-image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImageExecutable(NativeImageBuildStep.java:627)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImage(NativeImageBuildStep.java:343)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:112)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:832)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.12.0.Final:build (default) on project outbox-shipment-service: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Cannot find the native-image in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using gu install native-image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImageExecutable(NativeImageBuildStep.java:627)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImage(NativeImageBuildStep.java:343)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:112)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:832)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :outbox-order-service
All the information is actually in the error message:
Cannot find the native-image in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using gu install native-image
You're trying to build the application as a GraalVM native binary, but don't have the required tooling installed for that. So either install the native-image tool (see the related Quarkus guide for details), or build as a JVM application instead (by setting QUARKUS_BUILD to jvm).
I want to build a project and the following error occurs.
My colleagues can build it without any problem.
The error occurs since I've got a new laptop.
Does somebody has any idea?
>[INFO]
Loading source files for package xxx...
Loading source files for package xxx...
Loading source files for package xxx...
Constructing Javadoc information...
Standard Doclet version 1.8.0_151
Building tree for all the packages and classes...
Generating C:\Eigene Dateien\Documents\workspace\xxx.html...
1 error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.042 s
[INFO] Finished at: 2018-03-09T09:56:09+01:00
[INFO] Final Memory: 43M/326M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project xxx: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - java.lang.IllegalArgumentException: Error decoding percent encoded characters
[ERROR] at sun.net.www.ParseUtil.decode(ParseUtil.java:216)
[ERROR] at sun.misc.URLClassPath$FileLoader.<init>(URLClassPath.java:1241)
[ERROR] at sun.misc.URLClassPath$3.run(URLClassPath.java:560)
[ERROR] at sun.misc.URLClassPath$3.run(URLClassPath.java:555)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at sun.misc.URLClassPath.getLoader(URLClassPath.java:554)
[ERROR] at sun.misc.URLClassPath.getLoader(URLClassPath.java:519)
[ERROR] at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:484)
[ERROR] at sun.misc.URLClassPath.access$100(URLClassPath.java:65)
[ERROR] at sun.misc.URLClassPath$1.next(URLClassPath.java:266)
[ERROR] at sun.misc.URLClassPath$1.hasMoreElements(URLClassPath.java:277)
[ERROR] at java.net.URLClassLoader$3$1.run(URLClassLoader.java:601)
[ERROR] at java.net.URLClassLoader$3$1.run(URLClassLoader.java:599)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader$3.next(URLClassLoader.java:598)
[ERROR] at java.net.URLClassLoader$3.hasMoreElements(URLClassLoader.java:623)
[ERROR] at sun.misc.CompoundEnumeration.next(CompoundEnumeration.java:45)
[ERROR] at sun.misc.CompoundEnumeration.hasMoreElements(CompoundEnumeration.java:54)
[ERROR] at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:354)
[ERROR] at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
[ERROR] at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
[ERROR] at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:293)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289)
[ERROR] at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267)
[ERROR] at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127)
[ERROR] at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML(LayoutParser.java:89)
[ERROR] at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(ClassBuilder.java:120)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:189)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:194)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:139)
[ERROR] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:82)
[ERROR] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:80)
[ERROR] at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
[ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:219)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:205)
[ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:64)
[ERROR] at com.sun.tools.javadoc.Main.main(Main.java:54)
Command line was: C:\java\jdk1.8.0_151\jre\..\bin\javadoc.exe #options #packages
When I skip creating javaDoc with maven.javadoc.skip and edit the build-plugins maven-deploy-plugin and maven-javadoc-plugin it will be build successful.
I have upgraded my project to jdk-9 env. But when I pushed the branch, I met a building problem that travis-ci didn’t find the package “Javax.json” as following:
My configuration:
{
"language": "java",
"install": "mvn install -DskipTests=true -Dmaven.javadoc.skip=true",
"jdk": "oraclejdk9",
"group": "stable",
"dist": "trusty",
"os": "linux"
}
Error information(partly):
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/helloidea/HelloIdea.java:[7,18] package javax.json does not exist
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[14,18] package javax.json does not exist
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[15,18] package javax.json does not exist
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,9] cannot find symbol
symbol: class JsonObjectBuilder
location: class com.arvinsichuan.mongojdbc.MongoJDBC
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,41] cannot find symbol
symbol: variable Json
location: class com.arvinsichuan.mongojdbc.MongoJDBC
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.799 s
[INFO] Finished at: 2017-09-22T05:49:56Z
[INFO] Final Memory: 23M/512M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-
plugin:3.1:compile (default-compile) on project JEETwentySeventeenAutumn:
Compilation failure: Compilation failure:
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/helloidea/HelloIdea.java:[7,18] package javax.json does not exist
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[14,18] package javax.json does not exist
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[15,18] package javax.json does not exist
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,9] cannot find symbol
[ERROR] symbol: class JsonObjectBuilder
[ERROR] location: class com.arvinsichuan.mongojdbc.MongoJDBC
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,41] cannot find symbol
[ERROR] symbol: variable Json
[ERROR] location: class com.arvinsichuan.mongojdbc.MongoJDBC
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command "mvn install -DskipTests=true -Dmaven.javadoc.skip=true" failed
and exited with 1 during .
Your build has been stopped.
Add the dependency:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1</version>
</dependency>
I got this error while trying to compile my GWT app. I tried to Google it but there is no informative description of this error:
[ERROR] java.lang.RuntimeException: a new annotation has been introduced (org.hibernate.validator.constraints.ConstraintComposition); you cannot currently introduce new annotations in devmode. Please restart.
[ERROR] at org.jboss.errai.config.rebind.MetaClassBridgeUtil.populateMetaClassFactoryFromTypeOracle(MetaClassBridgeUtil.java:88)
[ERROR] at org.jboss.errai.config.rebind.AbstractAsyncGenerator$2.run(AbstractAsyncGenerator.java:93)
[ERROR] at org.jboss.errai.config.rebind.AsyncGenerationJob.notifyStarting(AsyncGenerationJob.java:86)
[ERROR] at org.jboss.errai.config.rebind.AsyncGenerators.notifyStarting(AsyncGenerators.java:190)
[ERROR] at org.jboss.errai.config.rebind.AsyncGenerators.startAll(AsyncGenerators.java:144)
[ERROR] at org.jboss.errai.config.rebind.AsyncGenerators.getFutureFor(AsyncGenerators.java:55)
[ERROR] at org.jboss.errai.config.rebind.AsyncGenerationJob.submit(AsyncGenerationJob.java:109)
[ERROR] at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:86)
[ERROR] at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:58)
[ERROR] at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[ERROR] at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657)
[ERROR] at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
[ERROR] at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
[ERROR] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
[ERROR] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
[ERROR] at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
[ERROR] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:355)
[ERROR] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[ERROR] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[ERROR] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[ERROR] at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[ERROR] at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[ERROR] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[ERROR] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[ERROR] at com.google.gwt.dev.jjs.ast.JTryStatement.traverse(JTryStatement.java:60)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[ERROR] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[ERROR] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[ERROR] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR] at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:434)
[ERROR] at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:403)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR] at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:900)
[ERROR] at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:625)
[ERROR] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:640)
[ERROR] at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[ERROR] at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[ERROR] at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[ERROR] at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[ERROR] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[ERROR] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[ERROR] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[ERROR] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[ERROR] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[ERROR] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
This exception gets thrown whenever an annotation type can't be loaded. As the message says (and Thomas explained in his response), one scenario where this can happen is when you add a new annotation type during a Dev Mode session.
Another possible way to get this error is not having org.hibernate.validator.constraints.ConstraintComposition on your GWT compiler's classpath. Try compiling with mvn -X gwt:compile and take a look at the classpath used with the GWT compiler. Verify that your GWT compilation classpath includes a .jar with org/hibernate/validator/constraints/ConstraintComposition.class in it.
DevMode (and the GWT Compiler BTW) resolves annotations from bytecode, not source code (to my knownledge, this is the only use of bytecode as source in GWT); so annotations you introduce in your source code can't be seen by DevMode until you restart it.
This is unless the generator that makes use of the annotations uses some tricks to actually load the recompiled bytecode. FYI, GIN used to suffer from this limitation, and starting with 2.0 it uses ClassLoader tricks to mitigate it.
Errai seems to have some tricks to detect you have changed the source code in ways that won't be seen by DevMode (in this case, I suppose by the Bean Validation generator built into GWT, so it cannot be changed to use similar tricskas GIN) and generates an error.
I am migrating my project from Java 6 to Java 7. We use JibX extensively in our project. Till now we were using JibX 1.2.2 and everything was working fine.
But due to migration to Java 7 we upgraded from JibX 1.2.2 to JibX 1.2.5. Also we are using jibx-maven-plugin version 1.2.5. But with the upgradation of JibX, we are facing some issues now.
When built with target 1.7 and JibX 1.2.5, JibX is building the jar file but during aspectJ weaving, getting the following error :
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (default) on project gdsmodel-aspects: Compiler errors:
[ERROR] abort ABORT -- (ClassFormatException) Index 12895 into constant pool (size:12371) is invalid
[ERROR] Index 12895 into constant pool (size:12371) is invalid
[ERROR] org.aspectj.apache.bcel.classfile.ClassFormatException: Index 12895 into constant pool (size:12371) is invalid
[ERROR] at org.aspectj.apache.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:66)
[ERROR] at org.aspectj.apache.bcel.classfile.ConstantPool.getConstantUtf8(ConstantPool.java:220)
[ERROR] at org.aspectj.apache.bcel.classfile.Attribute.readAttribute(Attribute.java:111)
[ERROR] at org.aspectj.apache.bcel.classfile.AttributeUtils.readAttributes(AttributeUtils.java:19)
[ERROR] at org.aspectj.apache.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:97)
[ERROR] at org.aspectj.apache.bcel.classfile.Field.<init>(Field.java:82)
[ERROR] at org.aspectj.apache.bcel.classfile.ClassParser.readFields(ClassParser.java:206)
[ERROR] at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:141)
[ERROR] at org.aspectj.weaver.bcel.Utility.makeJavaClass(Utility.java:467)
[ERROR] at org.aspectj.weaver.bcel.UnwovenClassFile.getJavaClass(UnwovenClassFile.java:68)
[ERROR] at org.aspectj.weaver.bcel.BcelWeaver.addClassFile(BcelWeaver.java:455)
[ERROR] at org.aspectj.weaver.bcel.BcelWeaver.addJarFile(BcelWeaver.java:402)
[ERROR] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:893)
[ERROR] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:249)
[ERROR] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:185)
[ERROR] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
[ERROR] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
[ERROR] at org.aspectj.tools.ajc.Main.run(Main.java:371)
[ERROR] at org.aspectj.tools.ajc.Main.runMain(Main.java:248)
[ERROR] at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:549)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:606)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR] -> [Help 1]
So I turned on the "verify" flag in jibx-maven-plugin (which specifies "Control flag for verifying generated/modified classes with BCEL.") when jibx fails with the following error :
[exec] [ERROR] Failed to execute goal org.jibx:jibx-maven-plugin:1.2.5:bind (jibx-bind) on project gdsmodel: Invalid this class index 6218 in constant pool in class file com/g2switch/dto/passive/
JiBX_passive_v24_0MungeAdapter -> [Help 1]
Only one thing that I noticed (and is bugging me) is JibX is generating an "JiBX_passive_v24_0MungeAdapter.class" of size almost 14MB and the verification is failing in this class.
[exec] Verification failure on class com.g2switch.dto.passive.JiBX_passive_v24_0MungeAdapter
But keeping every thing same when I just change the target from 1.7 to 1.6 everything works fine [also using JibX 1.2.5].
N.B : We have a project which has many binding files (> 150 and also each file contains huge amount of data). The problem occurs while building this project. But when I include fewer bindings (< 20) then the problem disappears. So is this problem due to the large munge adapter file generated by JibX, when large amount of bindings are involved? If this is the cause then how to solve it?