Can't run GwtTestCase when updating GWT to 2.6.0 - gwt

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.

Related

GWT - Error constructing Java AST

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.

(gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment

I try these tutorial https://cloud.google.com/tools/cloud-repositories/docs/push-to-deploy, and I do mvn gcloud:deploy,but got the error messages bellow:
[dev-jenkins-test-1] $ /bin/sh -xe /tmp/hudson4310631253025446569.sh
+ mvn gcloud:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jenkins-test-java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) > package # jenkins-test-java >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/jenkins/workspace/dev-jenkins-test-1/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) < package # jenkins-test-java <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) # jenkins-test-java ---
[INFO] Running gcloud app deploy...
[INFO] Running python -S /google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=straw-hat-pirates-dev preview app deploy /var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml
[INFO] WARNING: Soon, deployments will set the deployed version to receive all traffic by
[INFO] default.
[INFO]
[INFO] To keep the current behavior (where new deployments do not receive any traffic),
[INFO] use the `--no-promote` flag or run the following command:
[INFO]
[INFO] $ gcloud config set app/promote_by_default false
[INFO]
[INFO] To adopt the new behavior early, use the `--promote` flag or run the following
[INFO] command:
[INFO]
[INFO] $ gcloud config set app/promote_by_default true
[INFO]
[INFO] Either passing one of the new flags or setting one of these properties will
[INFO] silence this message.
[INFO]
[INFO] You are about to deploy the following modules:
[INFO] - straw-hat-pirates-dev/default (from [/var/jenkins/workspace/dev-jenkins-test-1/target/appengine-staging/app.yaml])
[INFO] Deployed URL: [https://20151223t054356-dot-straw-hat-pirates-dev.appspot.com]
[INFO] (add --promote if you also want to make this module available from
[INFO] [https://straw-hat-pirates-dev.appspot.com])
[INFO]
[INFO] Beginning deployment...
[INFO] Verifying that Managed VMs are enabled and ready.
[INFO]
[INFO] Provisioning remote build service.
[INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
[INFO] Building and pushing image for module [default]
[INFO] ----------------------------- DOCKER BUILD OUTPUT ------------------------------
[INFO] Step 0 : FROM gcr.io/google_appengine/openjdk8
[INFO] ---> 3c058a018ce1
[INFO] Step 1 : ADD jenkins-test-java-1.0-SNAPSHOT.jar /app/
[INFO] ---> 938437aaa1a1
[INFO] Removing intermediate container 4106bc3645ca
[INFO] Step 2 : ENTRYPOINT java -jar /app/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO] ---> Running in f187a76322dd
[INFO] ---> 4600e0f4d83a
[INFO] Removing intermediate container f187a76322dd
[INFO] Successfully built 4600e0f4d83a
[INFO] --------------------------------------------------------------------------------
[INFO]
[INFO] Updating module [default]...
[INFO] Updating module [default].../
[INFO] Updating module [default]...failed.
[INFO] ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
[INFO] Deleted [https://www.googleapis.com/compute/v1/projects/straw-hat-pirates-dev/zones/us-central1-f/instances/gae-builder-vm-20151223t054356].
[ERROR] Error: gcloud app command with exit code : 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:03 min
[INFO] Finished at: 2015-12-23T05:45:57+00:00
[INFO] Final Memory: 11M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.88.v20151125:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 1 -> [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
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I guess :
It seems like something wrong with my environment configuration.
I still cannot fix this problem.
Thank for your help. :)
I figured it out.
I'll bet your maven module is not setup with <packaging>war</packaging>
If your module is set to jar (default), then it tried to deploy as a standard java application where you are going to launch your own server. Since you want a managed vm with appengine running, you need to package as war, and then the plugin will take care of the rest.
Cheers.

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)

In PlayN, how can I build the HTML version of my project from the command line?

Currently I'm building it in Eclipse using the GWT plugin. I'd like to automate deployment to my development webserver using a script that does the GWT compilation from the command line.
I've followed the directions in the Running Via Maven section of the Getting Started page:
mvn -Phtml integration-test
But it tries to build all the versions, erring out on the Android build (which I'd prefer to skip at the moment) and throws a warning stating the html profile doesn't exist:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] MyPlaynGame Metaproject .......................... SUCCESS [0.375s]
[INFO] MyPlaynGame Core ................................. SUCCESS [1.638s]
[INFO] MyPlaynGame Java ................................. SUCCESS [0.319s]
[INFO] MyPlaynGame HTML ................................. SUCCESS [4.019s]
[INFO] MyPlaynGame Android .............................. FAILURE [0.308s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.903s
[INFO] Finished at: Mon Jun 04 22:17:33 PDT 2012
[INFO] Final Memory: 15M/255M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "html" could not be activated because it does not exist.
How can I get it just to build the html version?
mvn clean package -pl core,html
This will only compile the core and html packages. If you only want html, you still need the core package.
The output will be by default in the target folder.