Javascript build fails

26 views
Skip to first unread message

Arco van der Velden

unread,
Feb 9, 2016, 7:38:58 AM2/9/16
to CodenameOne Discussions

I tried to do a javascript build with an existing working project but it gives me a build error like below, any idea ?

Executing: /home/ec2-user/jdk1.8.0_45/bin/java -Dretrolambda.inputDir=/tmp/build4395325875721494407xxx/tmpClasses -Dretrolambda.classpath=/tmp/build4395325875721494407xxx/tmpClasses:/tmp/temp6791530583283105825.jar -Dretrolambda.outputDir=/tmp/build4395325875721494407xxx/tmpClasses_retrolamda -Dretrolambda.bytecodeVersion=49 -jar /tmp/temp3309944789126593083.jar Retrolambda 2.0.3

Bytecode version: 49 (Java 5)

Default methods: false

Input directory: /tmp/build4395325875721494407xxx/tmpClasses

Output directory: /tmp/build4395325875721494407xxx/tmpClasses_retrolamda

Classpath: /tmp/build4395325875721494407xxx/tmpClasses:/tmp/temp6791530583283105825.jar

Executing: /home/ec2-user/javascript/apache-maven-3.2.5/bin/mvn -e clean package [INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...

[WARNING]

[WARNING] Some problems were encountered while building the effective model for nl.aalease.apps:Main:war:1.0

[WARNING] 'dependencies.dependency.systemPath' for ca.weblite:codename1-core:jar should not point at files within the project directory, ${basedir}/lib/CodenameOne.jar will be unresolvable by dependent projects @ line 24, column 25

[WARNING] 'dependencies.dependency.systemPath' for ca.weblite:codename1-factory:jar should not point at files within the project directory, ${basedir}/lib/Factory.jar will be unresolvable by dependent projects @ line 32, column 25

[WARNING] 'dependencies.dependency.systemPath' for ca.weblite:codename1-core-hello:jar should not point at files within the project directory, ${basedir}/lib/app.jar will be unresolvable by dependent projects @ line 40, column 25

[WARNING]

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING]

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING]

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building Main 1.0

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Main ---

[INFO]

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Main ---

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] Copying 0 resource

[INFO]

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Main ---

[INFO] Changes detected - recompiling the module!

[INFO] Compiling 50 source files to /tmp/build4395325875721494407xxx/target/classes

[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/impl/html5/Stub.java: /tmp/build4395325875721494407xxx/src/main/java/com/codename1/impl/html5/Stub.java uses or overrides a deprecated API.

[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/impl/html5/Stub.java: Recompile with -Xlint:deprecation for details.

[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/teavm/ext/localforage/LocalForage.java: Some input files use unchecked or unsafe operations.

[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/teavm/ext/localforage/LocalForage.java: Recompile with -Xlint:unchecked for details.

[INFO]

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Main ---

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory /tmp/build4395325875721494407xxx/src/test/resources

[INFO]

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Main ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Main ---

[INFO] No tests to run.

[INFO]

[INFO] --- teavm-maven-plugin:0.3.0-cn1-039:build-javascript (web-client) @ Main ---

[INFO] Preparing classpath for JavaScript generation

[INFO] Using the following classpath for JavaScript generation: /tmp/build4395325875721494407xxx/lib/CodenameOne.jar:/tmp/build4395325875721494407xxx/lib/Factory.jar:/tmp/build4395325875721494407xxx/lib/app.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-classlib/0.3.0-cn1-039/teavm-classlib-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-platform/0.3.0-cn1-039/teavm-platform-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-core/0.3.0-cn1-039/teavm-core-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/ec2-user/.m2/repository/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.jar:/home/ec2-user/.m2/repository/com/carrotsearch/hppc/0.6.1/hppc-0.6.1.jar:/home/ec2-user/.m2/repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/home/ec2-user/.m2/repository/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar:/home/ec2-user/.m2/repository/joda-time/joda-time/2.7/joda-time-2.7.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-jso/0.3.0-cn1-039/teavm-jso-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-dom/0.3.0-cn1-039/teavm-dom-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/home/ec2-user/.m2/repository/org/mitre/dsmiley/httpproxy/smiley-http-proxy-servlet/1.6/smiley-http-proxy-servlet-1.6.jar:/home/ec2-user/.m2/repository/org/apache/httpcomponents/httpclient/4.3.4/httpclient-4.3.4.jar:/home/ec2-user/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/ec2-user/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/ec2-user/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar:/tmp/build4395325875721494407xxx/target/classes

[INFO] Building JavaScript file

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 01:16 min

[INFO] Finished at: 2016-02-09T05:28:02-05:00

[INFO] Final Memory: 17M/839M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-039:build-javascript (web-client) on project Main: Unexpected error occured: -1 -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-039:build-javascript (web-client) on project Main: Unexpected error occured

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)

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:120)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

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 error occured

at org.teavm.maven.BuildJavascriptMojo.execute(BuildJavascriptMojo.java:261)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

... 19 more

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1

at java.util.ArrayList.elementData(ArrayList.java:400)

at java.util.ArrayList.get(ArrayList.java:413)

at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2035)

at org.teavm.javascript.Renderer.visit(Renderer.java:931)

at org.teavm.javascript.ast.ConditionalStatement.acceptVisitor(ConditionalStatement.java:48)

at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2035)

at org.teavm.javascript.Renderer.visit(Renderer.java:1059)

at org.teavm.javascript.ast.BlockStatement.acceptVisitor(BlockStatement.java:34)

at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2032)

at org.teavm.javascript.Renderer.visit(Renderer.java:1059)

at org.teavm.javascript.ast.BlockStatement.acceptVisitor(BlockStatement.java:34)

at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2032)

at org.teavm.javascript.Renderer.visit(Renderer.java:910)

at org.teavm.javascript.ast.SequentialStatement.acceptVisitor(SequentialStatement.java:34)

at org.teavm.javascript.Renderer$MethodBodyRenderer.visit(Renderer.java:752)

at org.teavm.javascript.ast.AsyncMethodNode.acceptVisitor(AsyncMethodNode.java:51)

at org.teavm.javascript.Renderer.renderBody(Renderer.java:604)

at org.teavm.javascript.Renderer.renderMethodBodies(Renderer.java:404)

at org.teavm.javascript.Renderer.render(Renderer.java:302)

at org.teavm.vm.TeaVM.build(TeaVM.java:441)

at org.teavm.tooling.TeaVMTool.generate(TeaVMTool.java:299)

at org.teavm.maven.BuildJavascriptMojo.execute(BuildJavascriptMojo.java:256)

... 21 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

Steve CN1 Hannah

unread,
Feb 9, 2016, 11:21:06 AM2/9/16
to codenameone...@googlegroups.com
Could be another TeaVM bug.  Can you send me the project (through the support email), and I'll take a look?

Best regards

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/be45c9aa-8755-406b-8ba1-707bd5e04882%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages