[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:36:45 PST 2018


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.throwAsScriptE
xception(NashornScriptEngine.java:470)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Nasho
rnScriptEngine.java:454)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Nasho
rnScriptEngine.java:406)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Nasho
rnScriptEngine.java:402)
        at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornSc
riptEngine.java:155)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.
java:264)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
ssorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
thodAccessorImpl.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(ReflectWrapp
er.java:81)
        at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluat
eScript(JavaxScriptRunner.java:103)
        at org.apache.tools.ant.util.optional.JavaxScriptRunner.execute
Script(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(DelegatingMe
thodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch
Utils.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.ja
va:1405)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D
efaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(Bridg
eImpl.java:286)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExe
cutor.java:555)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThrea
d.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(Scrip
tFunctionData.java:637)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFun
ction.java:494)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRunti
me.java:393)
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(Nasho
rnScriptEngine.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/75fead1b/attachment-0001.html>


More information about the x3d-public mailing list