Can't run Gatling simulation - error NoSuchElementException [gatling.scala:83] - scala

I recently run my gatling simulation scenario using maven following this tutorial,
It runs okay week ago, until recently I try to re run the scenario again then I got error
[main][ERROR][Gatling.scala:83] i.g.a.Gatling$ - Run crashed java.util.NoSuchElementException: null.
I run the scenatio with this command
mvn gatling:test -Dgatling.simulationClass=myscenario
I thought this caused by some corrupt repository? Because I see it points to gatling dependency.
I tried to reinstall the dependency with:
mvn dependency:purge-local-repository - doesn't solve the issue
mvn clean install -U - doesn't solve the issue
rm -rf ~/.m2/repository - doesn't solve the issue
Here are the logs:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------< collection:collection >-----------
[INFO] Building collection 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gatling-maven-plugin:3.1.0:test (default-cli) # collection ---
16:34:00.585 [main][ERROR][Gatling.scala:83] i.g.a.Gatling$ - Run crashed
java.util.NoSuchElementException: null
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
... 16 common frames omitted
Wrapped by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:65)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:65)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
Caused by: java.util.NoSuchElementException
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.377 s
[INFO] Finished at: 2021-01-28T16:34:00+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:3.1.0:test (default-cli) on project collection: Gatling failed.: Process exited with an error: 255 (Exit value: 255) -> [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

The stacktrace is pretty clear: that's a coding issue on your side and Gatling is not at fault here.
Caused by: java.util.NoSuchElementException
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
Look at whatever you're doing in your PoolCollection class at line 21. You're trying to get an entry that doesn't exist from a HashMap.

Related

In eclipse " testng.xml file is invalid" error found in Cucumber-Maven project

While running the feature files in eclipse I'm facing the below Testng.xml file error in Cucumber-Maven project. Please help me to solve this error.
Created the feature file
Created Step Definition and Test Runner file.
Ran the code through Run Configuration
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
Please refer to \\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
There was an error in the forked process
Suite file \\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\testng.xml is not a valid file
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
Suite file \\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\testng.xml is not a valid file
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # LifeModApiAutomation ---
[INFO] Building jar: \\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\target\LifeModApiAutomation-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # LifeModApiAutomation ---
[INFO] Installing \\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\target\LifeModApiAutomation-0.0.1-SNAPSHOT.jar to C:\Users\rak2\.m2\repository\com\transamerica\LifeModApiAutomation\0.0.1-SNAPSHOT\LifeModApiAutomation-0.0.1-SNAPSHOT.jar
[INFO] Installing \\CRDC3050C2\ta_users\rak2\Ramya Rai\TA Automation Files\LifeModApiAutomation\pom.xml to C:\Users\rak2\.m2\repository\com\transamerica\LifeModApiAutomation\0.0.1-SNAPSHOT\LifeModApiAutomation-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:03 min
[INFO] Finished at: 2022-01-17T18:41:02+05:30
[INFO] Final Memory: 22M/77M
[INFO] ------------------------------------------------------------------------

Unable to build Zeppelin from source - fails with error ""

To install Zeppelin from source (on Mac OS X, node version 6.9.1), I am following the directions on Zeppelin site.
When I execute the following command:
mvn -e -X clean package -DskipTests
while inside the cloned Zeppelin repository, the build fails with the following error:
[INFO] Zeppelin: Scio ..................................... SUCCESS [ 33.429 s]
[INFO] Zeppelin: web Application .......................... FAILURE [05:51 min]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Jupyter Support .......................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:58 min
[INFO] Finished at: 2017-08-17T17:53:12-04:00
[INFO] Final Memory: 355M/1803M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task: 'yarn install --no-lockfile' failed. (error code 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn install --no-lockfile' failed. (error code 1)
at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute(YarnTaskExecutor.java:61)
at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute(YarnMojo.java:65)
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
... 22 more
[ERROR]
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :zeppelin-web
I am aware of this related SO question, but I must confess that I don't understand how they solved that similar issue.
Update (in response to a proposed answer): Node is installed on my system:
(master)$ node --version
v6.9.1
This build failure caused when nodeJS is not installed in your local system.
yarn uses npm. So if you try to install yarn without npm, then it fails.
https://github.com/apache/zeppelin/blob/master/zeppelin-web/pom.xml#L70-L71

Failed to deploy a sample Javascript HTTP adapter on MFP 8 (MobileFoundation Bluemix)

I am beginning my journey into the MobileFirst Platform 8 Beta, and I would like to deploy my very first sample adapter.
I am using an instance of the Mobile Foundation service on Bluemix.
When trying to deploy the sample adapter, I get the error stack below:
○ → mvn adapter:deploy -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SampleAdapter 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- adapter-maven-plugin:8.0.0:deploy (default-cli) # SampleAdapter ---
[Fatal Error] :1:1: Premature end of file.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.845 s
[INFO] Finished at: 2016-05-13T15:50:57+02:00
[INFO] Final Memory: 11M/299M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.0:deploy (default-cli) on project SampleAdapter: Unexpected response from http://mobilefoundation-test-server.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/adapters: -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.0:deploy (default-cli) on project SampleAdapter: Unexpected response from http://mobilefoundation-test-server.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/adapters:
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unexpected response from http://mobilefoundation-test-server.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/adapters:
at com.ibm.mfp.adapter.plugin.MfpMavenAdapterPluginDeploy.handleDeployResponse(MfpMavenAdapterPluginDeploy.java:206)
at com.ibm.mfp.adapter.plugin.MfpMavenAdapterPluginDeploy.deploy(MfpMavenAdapterPluginDeploy.java:119)
at com.ibm.mfp.adapter.plugin.MfpMavenAdapterPluginDeploy.execute(MfpMavenAdapterPluginDeploy.java:108)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[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
Could someone please provide some help?
Thanks
It has not really failed deployment. This is a known issue that is resolved internally.
Visit your console and you will see that the adapter is there, deployed.
Alternatives:
Use the MobileFirst CLI (v8.0 beta) to deploy the adapter file
Deploy the .adapter file manually in the console

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

Adding maven dependencies to GWT project

I start my GWT project, and then somebody told me it's good to use maven, so i decided to try and i added maven dependencies to my project
it generated very simple pom file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven 4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>demo5</groupId>
<artifactId>demo5</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
</project>
i tried to run goals gwt:compile gwt:run, that when i run it first time downloaded lot of jars and stuck, when i run it second time it gaves me this:
[INFO] --- gwt-maven-plugin:2.4.0:compile (default-cli) # demo5 ---
[WARNING] The POM for com.google.gwt:gwt-servlet:jar:2.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Downloading: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar
Downloaded: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar (27647 KB at 61.4 KB/sec)
[WARNING] GWT plugin is configured to detect modules, but none were found.
[INFO]
[INFO] >>> gwt-maven-plugin:2.4.0:run (default-cli) # demo5 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # demo5 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\workspace\springsource\demo5\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # demo5 ---
455388 [main] ERROR org.sonatype.guice.bean.reflect.LoadedClass - Error injecting: org.apache.maven.plugin.CompilerMojo
java.lang.NoClassDefFoundError: org/codehaus/plexus/compiler/CompilerException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getDeclaredConstructors(Class.java:1836)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:609)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:816)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:750)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:235)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:185)
at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:824)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:938)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:971)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:932)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:239)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:451)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:98)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.compiler.CompilerException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 51 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7:36.976s
[INFO] Finished at: Sun Nov 13 22:03:36 GMT 2011
[INFO] Final Memory: 7M/16M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project demo5: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile failed: Unable to load the mojo 'compile' in the plugin 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2'. A required class is missing: org/codehaus/plexus/compiler/CompilerException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:2.3.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/c:/users/mad%20troll/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
[ERROR] urls[1] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
[ERROR] urls[2] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-compiler-api/1.8.1/plexus-compiler-api-1.8.1.jar
[ERROR] urls[3] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-manager-1.8.1.jar
[ERROR] urls[4] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/1.8.1/plexus-compiler-javac-1.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.codehaus.plexus.compiler.CompilerException
[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/PluginContainerException
If this will be helpful, i'm working under eclipse
Can anyone tell me what i made wrong and how i can fix that?
thanks in advance.
You can use the -maven tag with the webAppCreator utility that comes packaged with the GWT SDK, like this:
webAppCreator -maven -out MyGwtProject com.mycompany.myproject.MyGwtProject
It's not enough to create a project and add some dependencies. First of all you need to add the right dependencies, codehaus plugin with proper configuration and of course proper project structure with a web.xml and gwt descriptor module.
The easiest way to start gwt with maven is to generate a complete project from archetype. Look at http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html.
To generate GWT project just type in your console:
mvn archetype:generate \
-DarchetypeRepository=repo1.maven.org \
-DarchetypeGroupId=demo5 \
-DarchetypeArtifactId=demo5 \
-DarchetypeVersion=2.4.0
Next you have to import generated project into your IDE and I recommend you to compile it before you will launch hosted mode with the following command:
mvn gwt:run