java.lang.NoSuchMethodError: ResourceOracle.getResourceMap()Ljava/util/Map

I followed the upgrade instructions to go from Vaadin 7 to Vaadin 8 I found on https://vaadin.com/docs/v8/framework/migration/migrating-to-vaadin8.html.

I upgraded my own add ons that I’m using in my application with success
I upgraded the version of third party add ons I’m using in my application in my pom.
I modified the Vaadin dependencies to the Vaadin-compatibility dependencies in my pom.

I modified the applications widgets.gwt.xml file to use com.vaadin.v7.Vaadin7WidgetSet instead of com.vaadin.DefaultWidgetSet.

I ran mvn Vaadin:upgrade8 and resolved all left compilation failures.

Finally I tried to do a mvn clean install of my application but this is failing at the stage where the application is compiling the widgetset.
The error is : java.lang.NoSuchMethodError: com.google.gwt.dev.resource.ResourceOracle.getResourceMap()Ljava/util/Map;
A full stack trace is further below.

I even removed all add ons from my application because I assumed that one of the add ons included in my widgets was causing this error. So my widgetset file is very short right now.

<?xml version="1.0" encoding="UTF-8"?>

But still I’m having this strange java.lang.NoSuchMethodError issue. Does anybody knows what is going on, it looks like a conflict in some library versions in my classpath but I cannot figure out what libraries are causing this conflict.

INFO]
[INFO]
— vaadin-maven-plugin:8.6.2:compile (default) @ efficiency-desktop —
[INFO]
auto discovered modules [be.nspire.efficiency.vaadin.DashboardWidgetSet]

[INFO]
Using com.vaadin:vaadin-client-compiler version 8.6.2
[INFO]
Compiling module be.nspire.efficiency.vaadin.DashboardWidgetSet
[INFO]
[ERROR]
An internal compiler exception occurred
[INFO]
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
[INFO]
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]
at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]
at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptImmutable(JModVisitor.java:305)
[INFO]
at com.google.gwt.dev.jjs.ast.JMethodCall.visitChildren(JMethodCall.java:275)
[INFO]
at com.google.gwt.dev.jjs.ast.JNewInstance.traverse(JNewInstance.java:74)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
[INFO]
at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[INFO]
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
[INFO]
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
[INFO]
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]
at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
[INFO]
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
[INFO]
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
[INFO]
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
[INFO]
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
[INFO]
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO]
at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
[INFO]
at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
[INFO]
at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
[INFO]
at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO]
at com.google.gwt.dev.Compiler.main(Compiler.java:125)
[INFO]
Caused by: java.lang.NoSuchMethodError: com.google.gwt.dev.resource.ResourceOracle.getResourceMap()Ljava/util/Map;
[INFO]
at com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.generateConstantOrMessageClass(AbstractLocalizableImplCreator.java:185)
[INFO]
at com.google.gwt.i18n.rebind.LocalizableGenerator.generate(LocalizableGenerator.java:151)
[INFO]
at com.google.gwt.i18n.rebind.LocaleInfoGenerator.generateOneLocale(LocaleInfoGenerator.java:385)
[INFO]
at com.google.gwt.i18n.rebind.LocaleInfoGenerator.generateConstantsLookup(LocaleInfoGenerator.java:334)
[INFO]
at com.google.gwt.i18n.rebind.LocaleInfoGenerator.generate(LocaleInfoGenerator.java:307)
[INFO]
at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[INFO]
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
[INFO]
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
[INFO]
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
[INFO]
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
[INFO]
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
[INFO]
at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
[INFO]
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
[INFO]
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]
… 49 more
[INFO]
[ERROR]
at LocaleInfo.java(37): GWT.create(LocaleInfoImpl.class)
[INFO]
com.google.gwt.dev.jjs.ast.JMethodCall
[INFO]
[ERROR]
at LocaleInfo.java(37): (LocaleInfoImpl) GWT.create(LocaleInfoImpl.class)
[INFO]
com.google.gwt.dev.jjs.ast.JCastOperation
[INFO]
[ERROR]
at LocaleInfo.java(37): (LocaleInfoImpl) (LocaleInfoImpl) GWT.create(LocaleInfoImpl.class)
[INFO]
com.google.gwt.dev.jjs.ast.JCastOperation
[INFO]
[ERROR]
at LocaleInfo.java(36):
[INFO]
com.google.gwt.dev.jjs.ast.JNewInstance
[INFO]
[ERROR]
at LocaleInfo.java(36):
[INFO]
com.google.gwt.dev.jjs.ast.JDeclarationStatement
[INFO]
[ERROR]
at LocaleInfo.java(29):
[INFO]
com.google.gwt.dev.jjs.ast.JBlock
[INFO]
[ERROR]
at LocaleInfo.java(29):
[INFO]
com.google.gwt.dev.jjs.ast.JMethodBody
[INFO]
[ERROR]
at LocaleInfo.java(29): com.google.gwt.i18n.client.LocaleInfo.$clinit()V
[INFO]
com.google.gwt.dev.jjs.ast.JMethod
[INFO]

[INFO]
BUILD FAILURE
[INFO]

[INFO]
Total time: 35.594 s
[INFO]
Finished at: 2018-12-13T08:30:45+01:00
[INFO]
Final Memory: 52M/664M
[INFO]

[ERROR]
Failed to execute goal com.vaadin:vaadin-maven-plugin:8.6.2:compile (default) on project efficiency-desktop: Command [[
[ERROR]
/bin/sh -c ‘/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java’ ‘-Xmx1G’ ‘-Xss1G’ ‘-Dgwt.persistentunitcache=false’ ‘com.google.gwt.dev.Compiler’ ‘-logLevel’ ‘INFO’ ‘-style’ ‘OBF’ ‘-war’ ‘/Users/koendecock/Workspace/FlexanceGIT/efficiency-desktop/target/classes/VAADIN/widgetsets’ ‘-localWorkers’ ‘8’ ‘-failOnError’ ‘-XfragmentCount’ ‘-1’ ‘-sourceLevel’ ‘auto’ ‘-gen’ ‘/Users/koendecock/Workspace/FlexanceGIT/efficiency-desktop/target/.generated’ ‘be.nspire.efficiency.vaadin.DashboardWidgetSet’
[ERROR]
]] failed with status 1
[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

Process finished with exit code 1

I managed to resolve this problem. It was a classpath issue caused by a third party library I’m using. After upgrading gwt-i18n-server from version 0.21 to version 0.25 the widget compilation problem was resolved.