[x3d-public] Errors in my X3DJSAIL HelloWorldProgramOutput.java command line, generating XML, JSON and JS
John Carlson
yottzumm at gmail.com
Sat Jan 13 04:49:41 PST 2018
Here are the deltas, and a pointer to a new nashorn zip
2 files attached. One for www.web3d.org/x3d/stylesheets/java/build.xml and one for www.web3d.org/x3d/stylesheets/CreateX3dSceneAccessInterfaceJava.xslt
https://coderextreme.net/X3DJSONLD/nashorn3.zip
Sent from Mail for Windows 10
From: John Carlson
Sent: Saturday, January 13, 2018 7:36 AM
To: Don Brutzman
Cc: X3D Graphics public mailing list
Subject: Re: Errors in my X3DJSAIL HelloWorldProgramOutput.java command line,generating XML, JSON and JS
I suppose it could be the third line of nashorn/jvm-npm.js. I will have to look into it. My build.xml and current X3DJSAIL stylesheet are different from yours. I will deliver deltas today.
John
On Jan 13, 2018 5:44 AM, "Don Brutzman" <brutzman at nps.edu> wrote:
next: here is what i get in console when i run X3DJSAIL build.xml target "test.nashorn", with log then followed by the block of ant build.xml apparently triggering the exception. Not seeing what the problem is since all of your load('nashorn/***') calls seem to be pointing to files that are present:
=========================================================
ant -f C:\\x3d-code\\www.web3d.org\\x3d\\stylesheets\\java test.nashorn
test.nashorn:
Compile:
Compiling 2 source files to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\classes
Run:
Warning: toFileJavaScript() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.js
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
script:
C:\x3d-code\www.web3d.org\x3d\stylesheets\java\build.xml:98:
javax.script.ScriptException: TypeError: Cannot load script from nashorn/jvm-npm.js in <eval> at line number 3
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
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.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:109)
at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:53)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: <eval>:3 TypeError: Cannot load script from nashorn/jvm-npm.js
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
at jdk.nashorn.internal.runtime.Context.load(Context.java:868)
at jdk.nashorn.internal.objects.Global.load(Global.java:1545)
at jdk.nashorn.internal.scripts.Script$\^eval\_.:program(<eval>:3)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
... 28 more
BUILD FAILED (total time: 9 seconds)
=========================================================
<!-- <script language="nashorn"> TODO debugging -->
<script language="javascript" manager="javax">
<classpath>
<fileset dir="${saxon.dir}" includes="${saxon.jar}"/>
<fileset dir="${exificient.dir}" includes="${exificient.jar}"/>
<fileset dir="${openexi.dir}" includes="${openexi.jar}"/>
<fileset dir="${java.jars.dir}" includes="${jsai.classes.archive.jar.name}"/>
</classpath>
load('nashorn/jvm-npm.js');
load('nashorn/repeatPolyfill.js');
load('nashorn/examples/HelloWorldProgramOutput.js.intermediate.js');
load('nashorn/examples/HelloWorldProgramOutput.js');
</script>
=========================================================
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180113/3666fd8f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CreateX3dSceneAccessInterfaceJava.patch
Type: application/octet-stream
Size: 5639 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180113/3666fd8f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.xml.patch
Type: application/octet-stream
Size: 2545 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180113/3666fd8f/attachment-0003.obj>
More information about the x3d-public
mailing list