Javascript build error debugging

60 views
Skip to first unread message

jaanus...@gmail.com

unread,
May 7, 2015, 9:04:03 AM5/7/15
to codenameone...@googlegroups.com
Hi!

JavaScript port seams quite interesting, so I wanted to test it with my real project, but unfortunately I got a build error.

Sadly the error do not give me any hints for the cause (Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-034:build-javascript (web-client) on project MyApplication: Unexpected error occured: NullPointerException -> [Help 1])

I wonder, if there is possibility to add some extra debugging options to work with the error?

I probably won't help, but full error log looks like this:


Executing: /home/ec2-user/javascript/apache-maven-3.2.5/bin/mvn clean package [INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mycompany:MyApplication: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 MyApplication 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MyApplication ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ MyApplication ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ MyApplication ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 39 source files to /tmp/build445659554422347216xxx/target/classes
[WARNING] /tmp/build445659554422347216xxx/src/main/java/com/codename1/impl/html5/Stub.java: /tmp/build445659554422347216xxx/src/main/java/com/codename1/impl/html5/Stub.java uses or overrides a deprecated API.
[WARNING] /tmp/build445659554422347216xxx/src/main/java/com/codename1/impl/html5/Stub.java: Recompile with -Xlint:deprecation for details.
[WARNING] /tmp/build445659554422347216xxx/src/main/java/com/codename1/teavm/ext/localforage/LocalForage.java: Some input files use unchecked or unsafe operations.
[WARNING] /tmp/build445659554422347216xxx/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) @ MyApplication ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/build445659554422347216xxx/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ MyApplication ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ MyApplication ---
[INFO] No tests to run.
[INFO] 
[INFO] --- teavm-maven-plugin:0.3.0-cn1-034:build-javascript (web-client) @ MyApplication ---
[INFO] Preparing classpath for JavaScript generation
[INFO] Using the following classpath for JavaScript generation: /tmp/build445659554422347216xxx/lib/CodenameOne.jar:/tmp/build445659554422347216xxx/lib/Factory.jar:/tmp/build445659554422347216xxx/lib/app.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-classlib/0.3.0-cn1-034/teavm-classlib-0.3.0-cn1-034.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-platform/0.3.0-cn1-034/teavm-platform-0.3.0-cn1-034.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-core/0.3.0-cn1-034/teavm-core-0.3.0-cn1-034.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/org/teavm/teavm-jso/0.3.0-cn1-034/teavm-jso-0.3.0-cn1-034.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-dom/0.3.0-cn1-034/teavm-dom-0.3.0-cn1-034.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/build445659554422347216xxx/target/classes
[INFO] Building JavaScript file
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.585 s
[INFO] Finished at: 2015-05-07T08:28:23-04:00
[INFO] Final Memory: 16M/892M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-034:build-javascript (web-client) on project MyApplication: Unexpected error occured: NullPointerException -> [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:



Steve Hannah

unread,
May 7, 2015, 9:17:08 AM5/7/15
to codenameone...@googlegroups.com

Can you provide me with a copy of the project so I can see what the issue is?

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 http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/7df09b26-1774-4fc4-b1d5-34af95976b6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jaanus...@gmail.com

unread,
May 7, 2015, 9:20:07 AM5/7/15
to codenameone...@googlegroups.com
Thanks, but unfortunately I can't share this source code :(

Steve Hannah

unread,
May 7, 2015, 11:30:03 AM5/7/15
to codenameone...@googlegroups.com
I have added the "-e" flag to the maven build command so it will show the stack trace of the NullPointer.  (It's not on the build server yet but will be soon).  If you can try again (probably later today or tomorrow) and provide me with the stack trace, I can probably track it from there.

Thanks

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 http://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

Shai Almog

unread,
May 8, 2015, 1:53:59 AM5/8/15
to codenameone...@googlegroups.com, steve....@codenameone.com
This will be online in a couple of hours.

jaanus...@gmail.com

unread,
May 8, 2015, 4:19:04 AM5/8/15
to codenameone...@googlegroups.com
Hi!

Thanks for another quick reply. Now the error shows such traces: 

[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-034:build-javascript (web-client) on project MyApplication: Unexpected error occured: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-034:build-javascript (web-client) on project MyApplication: 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.NullPointerException
at org.teavm.javascript.StatementGenerator.generateJumpStatement(StatementGenerator.java:611)
at org.teavm.javascript.Decompiler.closeExpiredBookmarks(Decompiler.java:496)
at org.teavm.javascript.Decompiler.getRegularMethodStatement(Decompiler.java:373)
at org.teavm.javascript.Decompiler.decompileAsyncCacheMiss(Decompiler.java:314)
at org.teavm.javascript.Decompiler.decompileAsync(Decompiler.java:280)
at org.teavm.javascript.Decompiler.decompile(Decompiler.java:217)
at org.teavm.javascript.Decompiler.decompile(Decompiler.java:207)
at org.teavm.vm.TeaVM.modelToAst(TeaVM.java:566)
at org.teavm.vm.TeaVM.build(TeaVM.java:399)
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:
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Steve Hannah

unread,
May 8, 2015, 11:00:20 AM5/8/15
to codenameone...@googlegroups.com
Thanks.  I have filed an issue with TeaVM and will hopefully have a resolution soon.

Steve

To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.



--
Steve Hannah
Software Developer
Codename One

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

For more options, visit https://groups.google.com/d/optout.

jaanus...@gmail.com

unread,
May 19, 2015, 10:31:28 AM5/19/15
to codenameone...@googlegroups.com
Thanks, now error log show exactly which method was failed to decompile, so I can continue testing. 
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.



--
Steve Hannah
Software Developer
Codename One

--
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-discussions+unsub...@googlegroups.com.

Steve Hannah

unread,
May 19, 2015, 11:57:43 AM5/19/15
to codenameone...@googlegroups.com
If you are able to recreate the error with a minimal test project that you can share, that would be very helpful.

To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.



--
Steve Hannah
Software Developer
Codename One

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



--
Steve Hannah
Software Developer
Codename One

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

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages