GWT - Error constructing Java AST - gwt

What could possibly be causing this error during compilation?
I have generated project from this archetype https://github.com/ArcBees/Arcbees-Archetypes and I have changed only thing - update GWT to 2.8.0 and GWTP to 1.5.3.
[INFO] [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:3099)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:352)
[INFO] at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.traverse(AllocationExpression.java:670)
[INFO] at org.eclipse.jdt.internal.compiler.ast.Assignment.traverse(Assignment.java:260)
[INFO] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:347)
[INFO] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1379)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3058)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:141)
[INFO] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384)
[INFO] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
[INFO] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:985)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:339)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
[INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:206)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:158)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:120)
[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:127)
[INFO] Caused by: java.lang.NullPointerException
[INFO] at com.google.gwt.dev.jjs.impl.ReferenceMapper.get(ReferenceMapper.java:99)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.pushNewExpression(GwtAstBuilder.java:2642)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:350)
[INFO] ... 23 more
[INFO] [ERROR] at AbstractStringBuilder.java(137): new String(buffer)
[INFO] org.eclipse.jdt.internal.compiler.ast.AllocationExpression
[INFO] Shutting down PersistentUnitCache thread

The pom.xml generated GWTP archetype has an implicit dependency to gwt-dev-2.7.0, resulting in a version mismatch. Try adding an explicit dependency to 2.8.0:
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.8.0</version>
<scope>provided</scope>
</dependency>

A few years late, but I just ran into the same issue.
Got the same exception when trying to run GWT in Super Dev mode after adding Tomcat runtime to another project in my Eclipse workspace.
Adding a Tomcat Server to one of the projects will likely add it to other projects (Eclipse Bug) and this may cause dependency issues.
To resolve it:
Remove Tomcat dependency from all related projects build path, clean and rebuild.

Related

GWT: How to migrate to gwt 2.8.2 from gwt 2.7.0

i have this problem with gwt 2.7.0: Datepicker is not anchored to the DateBox in Chrome.
I have tried an upgrade to gwt 2.8.2 but when i try to compile the code appears this exception:
[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.JMethodCall.traverse(JMethodCall.java:266)
[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.JExpressionStatement.traverse(JExpressionStatement.java:42)
[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.JIfStatement.traverse(JIfStatement.java:53)
[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.core.ext.typeinfo.JClassType.getMetaDataTags()[Ljava/lang/String;
[INFO] at org.googlecode.gwt.rebind.menu.ClassMenuGenerator.elabClass(ClassMenuGenerator.java:237)
[INFO] at org.googlecode.gwt.rebind.menu.ClassMenuGenerator.create(ClassMenuGenerator.java:204)
[INFO] at org.googlecode.gwt.rebind.menu.MenuGenerator.generate(MenuGenerator.java:14)
[INFO] at
com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[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.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] ... 56 more
[INFO] [ERROR] at Cdn.java(343): GWT.create(CdnMenu.class)
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at Cdn.java(343): (SMenu) GWT.create(CdnMenu.class)
[INFO] com.google.gwt.dev.jjs.ast.JCastOperation
[INFO] [ERROR] at Cdn.java(343): (SMenu) (SMenu) GWT.create(CdnMenu.class)
[INFO] com.google.gwt.dev.jjs.ast.JCastOperation
[INFO] [ERROR] at Cdn.java(343): TemplateManager.setMenu((SMenu) (SMenu)
GWT.create(CdnMenu.class))
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at Cdn.java(343): TemplateManager.setMenu((SMenu) (SMenu)
GWT.create(CdnMenu.class))
[INFO] com.google.gwt.dev.jjs.ast.JExpressionStatement
[INFO] [ERROR] at Cdn.java(165):
Here is one of the lines that goes into error:
TemplateManager.setMenu((SMenu) GWT.create(CdnMenu.class));
Any ideas?
Thanks in advance
Stefano
[INFO] Caused by: java.lang.NoSuchMethodError:
com.google.gwt.core.ext.typeinfo.JClassType.getMetaDataTags()[Ljava/lang/String;
[INFO] at org.googlecode.gwt.rebind.menu.ClassMenuGenerator.elabClass(ClassMenuGenerator.java:237)
[INFO] at org.googlecode.gwt.rebind.menu.ClassMenuGenerator.create(ClassMenuGenerator.java:204)
[INFO] at org.googlecode.gwt.rebind.menu.MenuGenerator.generate(MenuGenerator.java:14)
It looks like your project has some MenuGenerator that it is using which is calling JClassType.getMetaDataTags, a method which seems to no longer exist. This method existed on an interface HasMetadata, which was deleted in 2014, but was deprecated back in 2009, 12 years ago - as of that time it no longer functioned (according to the commit message).
Searching the web for the full classname of ClassMenuGenerator (and the package structure) shows that it was part of this project formerly hosted on Google Code, archived when that service shut down: Productive GWT. Those projects can be migrated to github, but I only found one such migration had happened, and even in that copy, this issue has not been fixed - the fork is probably not maintained.
The good news is that fixing it should be easy, since as noted above, the metadata feature hasn't actually done anything since 2009, so you can probably just fork and remove the code that calls those metadata methods. Compiling the project against a recent version of GWT will also make it easier to figure out if there are any other issues lurking that might also cause problems.

Building Spark using Maven fails

I have a spark program written in Scala and I'm trying to build it using Maven. However maven built fails without any obvious error. Here is the error message:
[INFO] Compiling 1 source files to D:\Scala-IDE\Workspace\ClassifierMaven\classifier\target\classes at 1438214677096
[ERROR] error: class file needed by package is missing.
[INFO] reference type ClassTag of package reflect refers to nonexisting symbol.
[ERROR] one error found
[INFO] Picked up _JAVA_OPTIONS: -Xmx2G
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.022 s
[INFO] Finished at: 2015-07-29T17:04:41-07:00
[INFO] Final Memory: 30M/879M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.0:compile (default) on project classifier: wrap: org.apache.commons.exec.ExecuteException: Process
exited with an error: 1(Exit value: 1) -> [Help 1]
what is the problem?
SOLUTION: the problem was missing a dependency in my POM. I added the dependency and now I'm getting a new error message. HEre is the error I'm getting now
[INFO] excludes = []
[INFO] D:\Scala-IDE\Workspace\ClassifierMaven\classifier\src\main\scala:-1: info: compiling
[INFO] Compiling 1 source files to D:\Scala-IDE\Workspace\ClassifierMaven\classifier\target\classes at 1438274292378
[INFO] java.lang.reflect.InvocationTargetException
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:606)
[INFO] at org_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:161)
[INFO] at org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
[ERROR] Caused by: java.lang.AssertionError: assertion failed: List(object Byte, object Byte)
[INFO] at scala.tools.nsc.symtab.Symbols$Symbol.suchThat(Symbols.scala:1063)
[INFO] at scala.tools.nsc.symtab.Symbols$Symbol.companionModule0(Symbols.scala:1269)
[INFO] at scala.tools.nsc.symtab.Symbols$Symbol.companionModule(Symbols.scala:1277)
[INFO] at scala.tools.nsc.symtab.Symbols$Symbol.linkedClassOfClass(Symbols.scala:1296)
[INFO] at scala.tools.nsc.symtab.Definitions$definitions$.addModuleMethod$1(Definitions.scala:707)
[INFO] at scala.tools.nsc.symtab.Definitions$definitions$.initValueClasses(Definitions.scala:710)
[INFO] at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:787)
[INFO] at scala.tools.nsc.Global$Run.<init>(Global.scala:597)
[INFO] at scala.tools.nsc.Main$.process(Main.scala:107)
[INFO] at scala.tools.nsc.Main$.main(Main.scala:122)
[INFO] at scala.tools.nsc.Main.main(Main.scala)
[INFO] ... 6 more
[INFO] Picked up _JAVA_OPTIONS: -Xmx2G
It seems that you are missing the scala-reflect package from your class path. I'd suggest looking at some of the sample pom's (like learning spark, or some of the other databricks ones) and using one of those as a starting point for your build.
I got same issue, check your java version in your pom. it must be 1.8

Test GWT composite component with ui binder using GwtTestCase?

I'm writing a simple test class extending GwtTestCase for a component created with UiBinder, and running with mvn gwt:test fails as below.
The problem seems similar to: How to test a gwt composite component with ui binder using GwtTestCase?; other tests for components that are not created with UiBinder run fine with the current project configuration.
The user.agent contains gecko1_8. I tried running from IntelliJ with -Dgwt.args="-war www-test -runStyle HtmlUnit:IE8" but I encountered another issue (net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot read property "__gwtDevModeHook:com.mypackage.MyEntryPoint.Junit").
[INFO] Caused by: java.lang.Exception: com.google.gwt.core.client.JavaScriptException: (null) #com.google.gwt.dom.client.DOMImplStandard::isOrHasChild(Lcom/google/gwt/dom/client/Node;Lcom/google/gwt/dom/client/Node;)([JavaScript object(29), JavaScript object(30)]): null
[INFO] at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
[INFO] at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
[INFO] at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
[INFO] at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:194)
[INFO] at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35)
[INFO] at com.google.gwt.dom.client.DOMImplStandard.isOrHasChild(DOMImplStandard.java)
[INFO] at com.google.gwt.dom.client.Node$.isOrHasChild$(Node.java:280)
[INFO] at com.google.gwt.user.client.ui.HTMLPanel.addAndReplaceElement(HTMLPanel.java:220)
[INFO] at com.google.gwt.user.client.ui.HTMLPanel.addAndReplaceElement(HTMLPanel.java:190)
[INFO] at com.mypackage.client.widgets.ScreenHeader_ScreenHeaderUiBinderImpl$Widgets.build_f_HTMLPanel1(ScreenHeader_ScreenHeaderUiBinderImpl.java:128)
[INFO] at com.mypackage.client.widgets.ScreenHeader_ScreenHeaderUiBinderImpl$Widgets.get_f_HTMLPanel1(ScreenHeader_ScreenHeaderUiBinderImpl.java:112)
[INFO] at com.mypackage.client.widgets.ScreenHeader_ScreenHeaderUiBinderImpl$Widgets.access$0(ScreenHeader_ScreenHeaderUiBinderImpl.java:111)
[INFO] at com.mypackage.client.widgets.ScreenHeader_ScreenHeaderUiBinderImpl.createAndBindUi(ScreenHeader_ScreenHeaderUiBinderImpl.java:33)
[INFO] at com.mypackage.client.widgets.ScreenHeader_ScreenHeaderUiBinderImpl.createAndBindUi(ScreenHeader_ScreenHeaderUiBinderImpl.java:1)
[INFO] at com.mypackage.client.widgets.ScreenHeader.<init>(ScreenHeader.java:38)
[INFO] at com.mypackage.client.widgets.ScreenHeaderGwtTest.testConstructor(ScreenHeaderGwtTest.java:12)
[INFO] at com.mypackage.client.widgets.__ScreenHeaderGwtTest_unitTestImpl.doRunTest(__ScreenHeaderGwtTest_unitTestImpl.java:7)
[INFO] at junit.framework.TestCase.runTest(TestCase.java:62)
[INFO] at com.google.gwt.junit.client.GWTTestCase.runBare(GWTTestCase.java:188)

Eclipse maven jboss project - what do I need to add to the pom.xml so maven can compile?

I managed to set up my Jboss WTP project in maven. Right click on the project > Run as > Run on server (Jboss 7) works fine. But if I go ahead and delete the target directory and then try to execute compile goal it fails with missing dependencies:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.\
singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PROJECT 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # PROJECT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\path\\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # PROJECT ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to C:\path\\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/path/to/file/Controller.java:[14,21] package javax.servlet does not exist
#..... NOTICE THIS COMES FROM A CUSTOM JAR
[ERROR] /C:/path/to/file/DataServlet.java:[3,30] package gr.uoa.di.java.helpers does not exist
#.....
[ERROR] /C:/path/to/file/DataServlet.java:[26,32] package javax.servlet.annotation does not exist
[ERROR] /C:/path/to/file/DataServlet.java:[28,26] package javax.servlet.http does not exist
#.....
[INFO] 49 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
If I clean the project so the target directory is populated with classes then try to compile the project all fine:
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # DataCollectionServlet ---
[INFO] Nothing to compile - all classes are up to date
I have 1 question:
What exactly should I add to the pom.xml to reproduce the compilation environment of the Run on Server eclipse command ? EDIT: For instance adding:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
to the pom solved the "servlet API not found" issue - but is it the way to go ? Or should I add something like:
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-spec-api</artifactId>
<version>7.1.1.Final</version>
</dependency>
(see here). NB: adding the dependencies suggested by m2e plugin would result in a huge pom - moreover I am not sure all of it would be needed (it's a plain servlet/jsp project):
I am on Eclipse Luna Java EE pack, maven 3.1 (the one that comes with eclipse) and using Jboss 7.1.1.Final
I ended up just adding:
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
This transitively added the servlet-api:
Still don't know if adding this is the right way to add jstl 1.2.1 - notice it adds the jstl 1.2 api (EDIT: it isn't: Standard way of adding JSLT 1.2.1 in a Maven Project?)
I also still have problems with my homebrew jar (Can maven treat WEB-INF\lib the way eclipse (and m2e) does?) but closing this for now.

Can't run GwtTestCase when updating GWT to 2.6.0

After updating my GWT version to 2.6.0, i got this error when running my old GwtTestCase :
[ERROR] The -out option is deprecated. This option will be removed in future GWT release and will throw an error if it is still used. Please use -war option instead.
[INFO] <b>[ERROR] RunStyleHtmlUnit: Unknown browser name FF3, expected browser name: one of [IE8, IE9, Chrome, FF17]</b>
[INFO] [ERROR] shell failed in doStartup method
[INFO] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.682 sec <<< FAILURE!
[INFO] testSerializeDeserialize(m6.sherpa.portal.widget.base.client.components.frame.GwtTestSerializer) Time elapsed: 1.641 sec <<< ERROR!
[INFO] com.google.gwt.junit.JUnitFatalLaunchException: Shell failed to start
[INFO] at com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java:732)
[INFO] at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:705)
[INFO] at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:421)
[INFO] at junit.framework.TestCase.runBare(TestCase.java:141)
[INFO] at junit.framework.TestResult$1.protect(TestResult.java:122)
[INFO] at junit.framework.TestResult.runProtected(TestResult.java:142)
[INFO] at junit.framework.TestResult.run(TestResult.java:125)
[INFO] at junit.framework.TestCase.run(TestCase.java:129)
[INFO] at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:247)
[INFO] at junit.framework.TestSuite.runTest(TestSuite.java:255)
[INFO] at junit.framework.TestSuite.run(TestSuite.java:250)
[INFO] at junit.framework.TestSuite.runTest(TestSuite.java:255)
[INFO] at junit.framework.TestSuite.run(TestSuite.java:250)
[INFO] at junit.framework.TestSuite.runTest(TestSuite.java:255)
[INFO] at junit.framework.TestSuite.run(TestSuite.java:250)
[INFO] at org.codehaus.mojo.gwt.test.MavenTestRunner.doRun(MavenTestRunner.java:105)
[INFO] at junit.textui.TestRunner.start(TestRunner.java:183)
[INFO] at org.codehaus.mojo.gwt.test.MavenTestRunner.main(MavenTestRunner.java:63)
Any Idea ?
Best way to fix it is to just update your gwt-maven-plugin to 2.6.0 too.
In previous versions (up to and including 2.5.1), the <htmlunit> configuration property defaulted to FF3, but that value is no longer valid in GWT 2.6.0. gwt-maven-plugin 2.6.0 now defaults the property to FF17.
It looks like GWT 2.6.0 no more supports FireFox v3. FF3 has been replaced with FF17.