Tag Archives: Annotation error

GWT compiler error: Annotation error: cannot resolve. Why?

GWT compiler error: Annotation error: cannot resolve. Why?

See beloew for solution if you get the following exceptions and errors during a GWT compile.

Compiling module com.google.musicstore.Siloverse1

Resolving com.google.musicstore.client.gin.MyGinjector

Found type ‘com.google.musicstore.client.gin.MyGinjector’

[ERROR] Annotation error: cannot resolve com.google.musicstore.client.gin.MyModule

java.lang.ClassNotFoundException: com.google.musicstore.client.gin.MyModule

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:670)

at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:609)

at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotation(TypeOracleMediator.java:400)

at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:568)

at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:583)

at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass(TypeOracleMediator.java:728)

at com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits(TypeOracleMediator.java:353)

at com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:135)

at com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:79)

at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:286)

at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:182)

at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:280)

at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)

at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)

at com.google.gwt.dev.Compiler.run(Compiler.java:201)

at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)

at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)

at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)

at com.google.gwt.dev.Compiler.main(Compiler.java:159)

[ERROR] Annotation error: expected class java.lang.Class, got null

Scanning for additional dependencies: file:/C:/Documents%20and%20Settings/Administrator/workspace/SiloverseFlexMVP2MSSQL/src/com/google/musicstore/client/Siloverse.java

Computing all possible rebind results for ‘com.google.musicstore.client.gin.MyGinjector’

Rebinding com.google.musicstore.client.gin.MyGinjector

Invoking com.google.gwt.dev.javac.StandardGeneratorContext@197fe9

[ERROR] Generator ‘com.google.gwt.inject.rebind.GinjectorGenerator’ threw threw an exception while rebinding ‘com.google.musicstore.client.gin.MyGinjector’

com.google.inject.ProvisionException: Guice provision errors:

1) Error creating key for interface com.google.gwt.inject.client.AsyncProvider<com.google.musicstore.client.presenter.ContributeWizard2Presenter>

1 error

at com.google.gwt.inject.rebind.util.KeyUtil.getKey(KeyUtil.java:151)

at com.google.gwt.inject.rebind.util.KeyUtil.getKey(KeyUtil.java:75)

at com.google.gwt.inject.rebind.BindingsProcessor.addUnresolvedEntriesForInjectorInterface(BindingsProcessor.java:335)

at com.google.gwt.inject.rebind.BindingsProcessor.process(BindingsProcessor.java:217)

at com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:76)

at com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:48)

at com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:418)

at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:38)

at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:108)

at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:54)

at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:154)

at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:143)

at com.google.gwt.dev.Precompile$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(Precompile.java:317)

at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:95)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:200)

at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:123)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:234)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$200(AbstractCompiler.java:109)

at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:522)

at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:112)

at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:47)

at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:430)

at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:32)

at com.google.gwt.dev.Precompile.precompile(Precompile.java:522)

at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)

at com.google.gwt.dev.Compiler.run(Compiler.java:201)

at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)

at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)

at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)

at com.google.gwt.dev.Compiler.main(Compiler.java:159)

Caused by: java.lang.ClassNotFoundException: com.google.musicstore.client.presenter.ContributeWizard2Presenter

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.google.gwt.inject.rebind.util.KeyUtil.loadClass(KeyUtil.java:395)

at com.google.gwt.inject.rebind.util.KeyUtil.gwtTypeToJavaType(KeyUtil.java:369)

at com.google.gwt.inject.rebind.util.KeyUtil.gwtTypeToJavaType(KeyUtil.java:351)

at com.google.gwt.inject.rebind.util.KeyUtil.getKey(KeyUtil.java:148)

… 30 more

[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)

[WARN] com.google.musicstore.client.gin.MyGinjectorImpl

[ERROR] Errors in ‘file:/C:/Documents%20and%20Settings/Administrator/workspace/SiloverseFlexMVP2MSSQL/src/com/google/musicstore/client/Siloverse.java’

[ERROR] Line 851:  Failed to resolve ‘com.google.musicstore.client.gin.MyGinjector’ via deferred binding

Scanning for additional dependencies: file:/C:/Documents%20and%20Settings/Administrator/workspace/SiloverseFlexMVP2MSSQL/src/com/google/musicstore/client/ContributeComposite.java

Computing all possible rebind results for ‘com.google.musicstore.client.gin.MyGinjector’

Rebinding com.google.musicstore.client.gin.MyGinjector

Invoking com.google.gwt.dev.javac.StandardGeneratorContext@197fe9

[ERROR] Generator ‘com.google.gwt.inject.rebind.GinjectorGenerator’ threw threw an exception while rebinding ‘com.google.musicstore.client.gin.MyGinjector’

com.google.inject.ProvisionException: Guice provision errors:

1) Error creating key for interface com.google.gwt.inject.client.AsyncProvider<com.google.musicstore.client.presenter.ContributeWizard2Presenter>

1 error

at com.google.gwt.inject.rebind.util.KeyUtil.getKey(KeyUtil.java:151)

at com.google.gwt.inject.rebind.util.KeyUtil.getKey(KeyUtil.java:75)

at com.google.gwt.inject.rebind.BindingsProcessor.addUnresolvedEntriesForInjectorInterface(BindingsProcessor.java:335)

at com.google.gwt.inject.rebind.BindingsProcessor.process(BindingsProcessor.java:217)

at com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:76)

at com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:48)

at com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:418)

at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:38)

at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:108)

at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:54)

at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:154)

at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:143)

at com.google.gwt.dev.Precompile$DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(Precompile.java:317)

at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:95)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:200)

at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:123)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:234)

at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$200(AbstractCompiler.java:109)

at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:522)

at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:112)

at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:47)

at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:430)

at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:32)

at com.google.gwt.dev.Precompile.precompile(Precompile.java:522)

at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)

at com.google.gwt.dev.Compiler.run(Compiler.java:201)

at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)

at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)

at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)

at com.google.gwt.dev.Compiler.main(Compiler.java:159)

Caused by: java.lang.ClassNotFoundException: com.google.musicstore.client.presenter.ContributeWizard2Presenter

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.google.gwt.inject.rebind.util.KeyUtil.loadClass(KeyUtil.java:395)

at com.google.gwt.inject.rebind.util.KeyUtil.gwtTypeToJavaType(KeyUtil.java:369)

at com.google.gwt.inject.rebind.util.KeyUtil.gwtTypeToJavaType(KeyUtil.java:351)

at com.google.gwt.inject.rebind.util.KeyUtil.getKey(KeyUtil.java:148)

… 30 more

[ERROR] Errors in ‘file:/C:/Documents%20and%20Settings/Administrator/workspace/SiloverseFlexMVP2MSSQL/src/com/google/musicstore/client/ContributeComposite.java’

[ERROR] Line 23:  Failed to resolve ‘com.google.musicstore.client.gin.MyGinjector’ via deferred binding

Scanning for additional dependencies: jar:file:/C:/gwt/gwt-2.0.4/gwt-user.jar!/com/google/gwt/emul/java/lang/StringBuffer.java

[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)

[WARN] com.google.musicstore.client.gin.MyGinjectorImpl

[ERROR] Cannot proceed due to previous errors

This may due to not having the adequate of classes in the project’s war/WEB-INF/classes. Also, ensure the web.xml is here to.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!