[x3d-public] X3DJSAIL, X3dToJava.xslt and DOMX3DLoaderObjecttesting:anotherClassCastException

John Carlson yottzumm at gmail.com
Thu Jun 14 17:17:56 PDT 2018


When I try to build ant create.X3DJSAIL on mac, I get:     [javac] /Users/johncarlson/Downloads/www.web3d.org/x3d/stylesheets/java/src/org/web3d/x3d/sai/Shape/X3DAppearanceChildNode.java:55: error: reached end of file while parsing
    [javac] {
    [javac]  ^
    [javac] 1 error

apparently there is a problem with code generation on Mac?


Your turn?  I may not have gotten all the tooltips from SF.net <http://sf.net/>, will keep trying.

John

> On Jun 14, 2018, at 9:19 AM, Don Brutzman <brutzman at nps.edu> wrote:
> 
> And just notices a little more for you John:
> 
> There is also another block of javascript at the end of that file:
> ==================================
> var version = json['X3D']['@version'];
> var docType = DOMImplementation.createDocumentType('X3D', 'ISO//Web3D//DTD X3D '+version+'//EN', 'http://www.web3d.org/specifications/x3d-'+version+'.dtd <http://www.web3d.org/specifications/x3d-'+version+'.dtd>', null);
> var document = DOMImplementation.createDocument(null, 'X3D', docType);
> var mapToMethod = require('nashorn/node/mapToMethod.js');
> var mapToMethod2 = require('nashorn/node/mapToMethod2.js');
> var fieldTypes = require('nashorn/node/fieldTypes.js');
> load('nashorn/node/X3DJSONLD.js');
> load('nashorn/node/JavaScriptSerializer.js');
> var child = CreateElement('X3D');
> ConvertToX3DOM(json, '', child, 'flipper.json');
> print('Returning with', child);
> var output = new JavaScriptSerializer().serializeToString(json, child, '../nashorn/examples/HelloWorldProgramOutput.Nashorn.js', mapToMethod, fieldTypes);
> var FileWriter = Java.type('java.io.FileWriter');
> var fw = new FileWriter('../nashorn/examples/HelloWorldProgramOutput.Nashorn.js');
> fw.write(output);
> fw.close();
> ==================================
> 
> and now for an "oh duh" moment - I was thinking JSON but the file extension is .js so this might all be an OK application of your code.
> 
> ... in which case this narrowing of the problem remains appropriate, how is that file read and what is wrong?
> 
> again "good hunting" as you continue exploring out there, pushing onward in the tall grass...   8)
> 
> 
> On 6/14/2018 7:23 AM, Don Brutzman wrote:
>> On 6/13/2018 11:13 PM, John Carlson wrote:
>>> Are you sure those classpaths are portable?
>> Not personally (i use windows, sometimes centos linux on server) but that statement by Ant wouldn't stand if it weren't true.  This is part of original Ant design (read "Ant in Anger" to learn a lot about coding!) so it would not slip by unfixed.
>>     Apache Ant™ in Anger: Using Apache Ant in a Production Development System
>>     Steve Loughran, Last updated 2005-03-16
>>     https://ant.apache.org/ant_in_anger.html <https://ant.apache.org/ant_in_anger.html>
>> Further when I changed semicolon ; to colon : in build.xml classpath, everything still "worked" but had the exact same outputs and exceptions as before.
>> If there is a problem (different than what I saw) in node.js or in jjs shell implementations of JavaScript, you'd have to sleuth that because it is not occurring for me.   So that is not a problem in Ant.
>>> I was hoping to make them like the ones in java/build.xml if at all possible.
>> All of the java build.xml files throughout multiple different distributions are using semicolons with no identified problems.  I don't think that is the culprit.
>>> Also, I want you to debug the Java, not ant, JavaScript or nashorn.  See message with just the java class in it.
>>> 
>>> John
>> The exception that I get (shown below) reports
>>     javax.script.ScriptException: TypeError: Cannot load script from nashorn/jvm-npm.js
>> which has a header saying it is your modified version of an open-source nashorn file.  so i won't be sleuthing your custom jvm-npm.js (though you might want want to avoid customizations for future compatibility).
>> next part of exception:
>>     in ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js at line number 1
>> which seems to indicate that the ...intermediate.js file either wasn't writable, wasn't written, had a length of zero bytes, or wasn't readable by jvm-npm.js
>> when i look for that intermediate output file on my system, i do find it.  36KB, current time stamp (not an old file), attached to this mail for your inspection.
>> the first lines of that attached file are
>> =========================================
>> load('nashorn/jvm-npm.js');
>> load('nashorn/repeatPolyfill.js');
>> var xmldom = require('nashorn/node_modules/xmldom');
>> var DOMParser = xmldom.DOMParser;
>> var XMLSerializer = new xmldom.XMLSerializer();
>> var DOMImplementation = new xmldom.DOMImplementation();
>> var json = { "X3D": {
>>     "encoding":"UTF-8",
>>     "@profile":"Immersive",
>>     "@version":"3.3",
>> [etc.]
>> =========================================
>> so... it appears that you have some (6 and a half) other lines of Javascript source at the beginning of this X3D JSON output file created by your serializer.
>> and presumably (i'm guessing) that is what the "javax.script.ScriptException: TypeError" exception is reporting, that it couldn't load a JSON file that started with Javascript source.
>> so i recommend you next look at the code producing HelloWorldProgramOutput.Nashorn.js.intermediate.js which will either be (a) your X3DJSONLD serializer or (b) my X3dToJson.xslt stylesheet or (c) something in the build file or another script.  Probably one of these has unintentionally prepended the offending 6.5 lines of code preceding the X3D JSON.
>> at this point, it would be good to confirm you are seeing the same outputs on your system.  if not, then you and i might have a versionitis problem causing confusion.
>> hope this sleuthing gets the spotlight closer to the problem cause. good luck John!
>>> On Wed, Jun 13, 2018, 9:29 PM Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> wrote:
>>> 
>>>     On 6/8/2018 12:12 AM, John Carlson wrote:
>>>      > I would like for you to make the classpaths portable between windows and Ubuntu in www.web3d.org/x3d/stylesheets/java/nashorn/build.xml <http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml><http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml <http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml>> <http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml <http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml>> .  Search for ;
>>> 
>>>     OK understood now.  First some background:
>>> 
>>>     1. Ant classpath is supposed to be colon/semicolon agnostic, regardless of operating system.
>>>     https://ant.apache.org/manual/using.html <https://ant.apache.org/manual/using.html>
>>> 
>>>     2. You own the nashorn subdirectory tree so you can do anything you want there.  I can followup by confirming elsewhere.
>>> 
>>>     3. I am running
>>> 
>>>     don at it154928 ~
>>>     $ java -version
>>>     java version "1.8.0_172"
>>>     Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
>>>     Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
>>> 
>>>     4.I went into that build.xml and changed entries like
>>> 
>>>              classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.archive.jar.name <http://jsai.full.archive.jar.name <http://jsai.full.archive.jar.name/>>}
>>>     to
>>>              classpath="${java.classes.dir}:${java.jars.dir}/${jsai.full.archive.jar.name <http://jsai.full.archive.jar.name <http://jsai.full.archive.jar.name/>>}
>>> 
>>>     5. That change had no effect on output of build.xml test.nashorn, copy follows
>>>     ==============================================================================
>>>     ant -f E:\\x3d-code\\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>>\\x3d\\stylesheets\\java\\nashorn test.nashorn
>>>     test.nashorn:
>>>     Compile:
>>>     Compiling 1 source file to E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\classes
>>>     Compiling 1 source file to E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\classes
>>>     Copy:
>>>     Copying 1 file to E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples
>>>     Copying E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.x3d
>>>     Copying 1 file to E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples
>>>     Copying E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to E:\x3d-code\www.web3d.org <http://www.web3d.org/><http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.json
>>>     Run:
>>>     parameter: source file HelloWorldProgramOutput.x3d filesize 21195 bytes, parsed using Document Object Model (DOM) X3DLoader
>>>     parameter: "-tojs" for conversion to X3DJSONLD JavaScript source
>>>     parameter: "-toFile" "../nashorn/examples/HelloWorldProgramOutput.Nashorn.js" for result file name root ../nashorn/examples/HelloWorldProgramOutput.Nashorn
>>>     convert to JS JavaScript:
>>>     Warning: toFileJavaScript() is overwriting prior file ../nashorn/examples/HelloWorldProgramOutput.Nashorn.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
>>>     [Error] TODO problem handling local exception within CommandLine, exiting
>>>     org.web3d.x3d.sai.X3DException: ScriptException when processing fileName ..\nashorn\examples\HelloWorldProgramOutput.Nashorn.js.intermediate.js, unable to save result: javax.script.ScriptException: TypeError: Cannot load script from nashorn/jvm-npm.js in ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js at line number 1
>>>              at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1662)
>>>              at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:628)
>>>              at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:163)
>>>     parameter: source file HelloWorldProgramOutput.x3d filesize 21195 bytes, parsed using Document Object Model (DOM) X3DLoader
>>>     parameter: "-toJSON" for conversion to JSON encoding
>>>     parameter: "-toFile" "../nashorn/examples/HelloWorldProgramOutput.Java.json" for result file name root ../nashorn/examples/HelloWorldProgramOutput.Java
>>>     convert to JSON:
>>>     Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file ../nashorn/examples/HelloWorldProgramOutput.Java.json
>>>     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
>>>     file conversion successful: HelloWorldProgramOutput.Java.json (40043 bytes)
>>>     parameter: source file HelloWorldProgramOutput.x3d filesize 21195 bytes, parsed using Document Object Model (DOM) X3DLoader
>>>     parameter: "-toX3D" for conversion to X3D encoding
>>>     parameter: "-toFile" "../nashorn/examples/HelloWorldProgramOutput.Java.x3d" for result file name root ../nashorn/examples/HelloWorldProgramOutput.Java
>>>     convert to X3D:
>>>     Warning: toFileX3D() is overwriting prior file ../nashorn/examples/HelloWorldProgramOutput.Java.x3d
>>>     file conversion successful: HelloWorldProgramOutput.Java.x3d (21195 bytes)
>>>     ===========================================
>>>     HelloWorldProgramOutput.Java.x3d
>>>     1 file(s) have been successfully validated.
>>>     1 file(s) have been successfully validated.
>>>     matches HelloWorldProgramOutput.x3d: true
>>>     ===========================================
>>>     ===========================================
>>>     HelloWorldProgramOutput.Java.json
>>>     matches HelloWorldProgramOutput.json: true
>>>     ===========================================
>>>     script:
>>>     ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js:1 TypeError: Cannot load script from nashorn/node/X3Dautoclass.js
>>>     Result: 102
>>>     ===========================================
>>>     HelloWorldProgramOutput.Java.x3d
>>>     matches HelloWorldProgramOutput.Nashorn.js.new.x3d: false
>>>     ===========================================
>>>     ===========================================
>>>     HelloWorldProgramOutput.Java.json
>>>     matches HelloWorldProgramOutput.Nashorn.js.new.json: false
>>>     ===========================================
>>>     ../nashorn/examples/Nashorn.js:1 TypeError: Cannot load script from nashorn/node/X3Dautoclass.js
>>>     Result: 102
>>>     ===========================================
>>>     HelloWorldProgramOutput.x3d
>>>     matches Nashorn.x3d: false
>>>     ===========================================
>>>     ===========================================
>>>     HelloWorldProgramOutput.x3d
>>>     matches Nashorn0.x3d: false
>>>     ===========================================
>>>     ../nashorn/examples/Json.js:1 TypeError: Cannot load script from nashorn/node/X3Dautoclass.js
>>>     Result: 102
>>>     ===========================================
>>>     HelloWorldProgramOutput.x3d
>>>     matches Json.x3d: false
>>>     ===========================================
>>>     HelloWorldProgramOutput.json
>>>     matches Json.json: false
>>>     BUILD SUCCESSFUL (total time: 18 seconds)
>>>     ==============================================================================
>>> 
>>>     so more sleuthing needed... hope this comparison testing helps.
>>> 
>>>     v/r Don
>>> 
>>> 
>>>      > On Fri, Jun 8, 2018, 1:39 AM Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>>> wrote:
>>>      >
>>>      >     Apologies John, not tracking you on this one.  readAllBytes is in your code, not clear if you want me to replace a classpath separator with colon in documentation - or what.
>>>      >
>>>      >     Please advise, TIA.
>>>      >
>>>      >     On 6/7/2018 8:56 PM, John Carlson wrote:
>>>      >      > Then hold at jdk 8.   Doesn't mean you can't fix a bug that's unrelated to JDK 8.
>>>      >      >
>>>      >      > On Thu, Jun 7, 2018, 11:46 PM Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>>>> wrote:
>>>      >      >
>>>      >      >     Sorry but no, advancing a version in Java is a slippery slope if everything can't advance together.  Am holding at JDK 8 until Netbeans (and thus X3D-Edit) gets upgraded to JDK 9 or 10.
>>>      >      >
>>>      >      >     On 6/6/2018 4:07 PM, John Carlson wrote:
>>>      >      >      > Full script under OpenJDK 8,  Ubuntu on Windows 10.  Log attached.  The readAllBytes issue will be fixed by Java 9.  Is there a way to set your ant
>>>      >      >      > JDK to JDK 9 inside NetBeans?  Wondering.
>>>      >      >      >
>>>      >      >      > John
>>>      >      >      >
>>>      >      >      > $ cd /mnt/c/x3d-code/www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/><http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>> <http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>> <http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>>
>>>      >      >      >
>>>      >      >      > $ javac -cp lib/javax.json-api-1.0.jar src/net/coderextreme/X3DJSONLD.java
>>>      >      >      >
>>>      >      >      > $ cp src/net/coderextreme/X3DJSONLD.class classes/net/coderextreme/
>>>      >      >      >
>>>      >      >      > # use ; instead of : in command prompt and git bash
>>>      >      >      >
>>>      >      >      > $ jjs -J-Djava.class.path=jars/X3DJSAIL.3.3.full.jar:classes nashorn/examples/Json.js
>>>      >      >      >
>>>      >      >      > $ diff -w nashorn/examples/HelloWorldProgramOutput.Java.x3d nashorn/examples/Json.x3d
>>>      >      >      >
>>>      >      >      > You should be able to duplicate the error with JDK 8 this way.  Command prompt will differ slightly.
>>>      >      >      >
>>>      >      >      > John
>>>      >      >      >
>>>      >      >      > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986 <https://go.microsoft.com/fwlink/?LinkId=550986>> for Windows 10
>>>      >      >      >
>>>      >      >      > *From: *John Carlson <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com><mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>>>>
>>>      >      >      > *Sent: *Wednesday, June 6, 2018 6:06 PM
>>>      >      >      > *To: *Don Brutzman <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>>>>
>>>      >      >      > *Cc: *x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org><mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org><mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>>>>
>>>      >      >      > *Subject: *RE: X3DJSAIL, X3dToJava.xslt and DOMX3DLoaderObjecttesting:anotherClassCastException
>>>      >      >      >
>>>      >      >      > Under OpenJDK 8 on Ubuntu under windows, the jjs command is:
>>>      >      >      >
>>>      >      >      > $ jjs -J-Djava.class.path=jars/X3DJSAIL.3.3.full.jar:classes nashorn/examples/Json.js
>>>      >      >      >
>>>      >      >      > And the cd command is:
>>>      >      >      >
>>>      >      >      > $ cd /mnt/c/x3d-code/www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/><http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>> <http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>> <http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>>
>>>      >      >      >
>>>      >      >      > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986 <https://go.microsoft.com/fwlink/?LinkId=550986>> for Windows 10
>>>      >      >      >
>>>      >      >      > *From: *John Carlson <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com><mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>>>>
>>>      >      >      > *Sent: *Wednesday, June 6, 2018 5:37 PM
>>>      >      >      > *To: *Don Brutzman <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>>>>
>>>      >      >      > *Cc: *x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org><mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org><mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>>>>
>>>      >      >      > *Subject: *RE: X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObjecttesting:anotherClassCastException
>>>      >      >      >
>>>      >      >      > Try stepping through with these commands at command prompt or similar (you’ll have to use diff and cp from Ubuntu, now available on Windows or similar commands under DOS)
>>>      >      >      >
>>>      >      >      > $ cd /c/x3d-code/www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/><http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>> <http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>> <http://www.web3d.org/x3d/stylesheets/java/ <http://www.web3d.org/x3d/stylesheets/java/>>
>>>      >      >      >
>>>      >      >      > $ javac -cp lib/javax.json-api-1.0.jar src/net/coderextreme/X3DJSONLD.java
>>>      >      >      >
>>>      >      >      > $ cp src/net/coderextreme/X3DJSONLD.class classes/net/coderextreme/
>>>      >      >      >
>>>      >      >      > $ jjs -cp "jars/X3DJSAIL.3.3.full.jar;classes" nashorn/examples/Json.js    # you may have to use the Java 8 way of specifying the classpath. See build.xml
>>>      >      >      >
>>>      >      >      > $ diff -w nashorn/examples/HelloWorldProgramOutput.Java.x3d nashorn/examples/Json.x3d
>>>      >      >      >
>>>      >      >      > 32a33,35
>>>      >      >      >
>>>      >      >      >  >         <meta name='translated' content='27 May 2018'/>
>>>      >      >      >
>>>      >      >      >  >         <meta name='generator' content='X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html'/ <http://www.web3d.org/x3d/stylesheets/X3dToJson.html'/>>
>>>      >      >      >
>>>      >      >      >  >         <meta name='reference' content='X3D JSON encoding: http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding'/ <http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding'/>>
>>>      >      >      >
>>>      >      >      > 35,38c38
>>>      >      >      >
>>>      >      >      > <         <ViewpointGroup description='Available viewpoints'>
>>>      >      >      >
>>>      >      >      > <             <Viewpoint DEF='DefaultView' description='Hello X3DJSAIL'/>
>>>      >      >      >
>>>      >      >      > <             <Viewpoint DEF='TopDownView' description='top-down view from above' orientation='1 0 0 -1.570796' position='0 100 0'/>
>>>      >      >      >
>>>      >      >      > <         </ViewpointGroup>
>>>      >      >      >
>>>      >      >      > ---
>>>      >      >      >
>>>      >      >      >  >         <ViewpointGroup description='Available viewpoints'/>
>>>      >      >      >
>>>      >      >      > You will see the missing Viewpoint’s (children of ViewpointGroup) as above.  Also jjs will generate significant output.
>>>      >      >      >
>>>      >      >      > I can’t connect through svn, so I may be out of date.
>>>      >      >      >
>>>      >      >      > John
>>>      >      >      >
>>>      >      >      > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986 <https://go.microsoft.com/fwlink/?LinkId=550986>> for Windows 10
>>>      >      >      >
>>>      >      >      > *From: *Don Brutzman <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>>>>
>>>      >      >      > *Sent: *Wednesday, June 6, 2018 9:41 AM
>>>      >      >      > *To: *John Carlson <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com><mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com> <mailto:yottzumm at gmail.com <mailto:yottzumm at gmail.com>>>>>
>>>      >      >      > *Cc: *x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org><mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org><mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org> <mailto:x3d-public at web3d.org <mailto:x3d-public at web3d.org>>>>>
>>>      >      >      > *Subject: *Re: X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObject testing:anotherClassCastException
>>>      >      >      >
>>>      >      >      > 1. Hi John, finally getting back to this one.
>>>      >      >      >
>>>      >      >      > On 4/30/2018 3:15 PM, John Carlson wrote:
>>>      >      >      >
>>>      >      >      >  > Previously reported problem, now assigned to the X3DLoaderObject, I believe.
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  > No Viewpoint children in X3D or JSON output.
>>>      >      >      >
>>>      >      >      > Not sure what that means?  Viewpoint node typically does not have any children, except perhaps for a Metadata* node or an IS/connect.
>>>      >      >      >
>>>      >      >      >  > Is a problem with X3DLoaderObject, looks like another class cast exception.  X3DJSONLD was eliminated from the problem by printing out the DOM object, and verifying the Viewpoint objects were there.   See x3d-code/www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js <http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js><http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js <http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js>> <http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js <http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js>> <http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js <http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js>>.
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  > Can be regenerated by running `ant test.nashorn` in x3d-code/www.web3d.org/x3d/stylesheets/java <http://www.web3d.org/x3d/stylesheets/java> <http://www.web3d.org/x3d/stylesheets/java <http://www.web3d.org/x3d/stylesheets/java>> <http://www.web3d.org/x3d/stylesheets/java <http://www.web3d.org/x3d/stylesheets/java>> <http://www.web3d.org/x3d/stylesheets/java <http://www.web3d.org/x3d/stylesheets/java>>
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  > See output in nashorn/examples/Json.{json,x3d}
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  > John
>>>      >      >      >
>>>      >      >      > OK have recently updated to Java JDK 1.8.0_172 and adjusted PATH to confirm jjs is running OK.
>>>      >      >      >
>>>      >      >      > Have also synchronized X3DJSAIL sudirectory nashorn/ and contents with subversion.
>>>      >      >      >
>>>      >      >      > I get the following outputs when running test.nashorn build target:
>>>      >      >      >
>>>      >      >      > ============================================================
>>>      >      >      >
>>>      >      >      > ant -f E:\\x3d-code\\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\\x3d\\stylesheets\\java test.nashorn
>>>      >      >      >
>>>      >      >      > test.nashorn:
>>>      >      >      >
>>>      >      >      > ===========================================
>>>      >      >      >
>>>      >      >      > ant nashorn/build.xml test.nashorn
>>>      >      >      >
>>>      >      >      > X3D Nashorn SAI Library.test.nashorn:
>>>      >      >      >
>>>      >      >      > Compile:
>>>      >      >      >
>>>      >      >      > Compiling 1 source file to E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\classes
>>>      >      >      >
>>>      >      >      > Compiling 1 source file to E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\classes
>>>      >      >      >
>>>      >      >      > Copy:
>>>      >      >      >
>>>      >      >      > Copying 1 file to E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples
>>>      >      >      >
>>>      >      >      > Copying E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.x3d
>>>      >      >      >
>>>      >      >      > Copying 1 file to E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples
>>>      >      >      >
>>>      >      >      > Copying E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.json
>>>      >      >      >
>>>      >      >      > Run:
>>>      >      >      >
>>>      >      >      > parameter: source file HelloWorldProgramOutput.x3d filesize 20956 bytes, parsed using Document Object Model (DOM) X3DLoader
>>>      >      >      >
>>>      >      >      > parameter: "-tojs" for conversion to X3DJSONLD JavaScript source
>>>      >      >      >
>>>      >      >      > parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Nashorn.js" for result file name root nashorn/examples/HelloWorldProgramOutput.Nashorn
>>>      >      >      >
>>>      >      >      > convert to JS JavaScript:
>>>      >      >      >
>>>      >      >      > Warning: toFileJavaScript() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.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
>>>      >      >      >
>>>      >      >      > TypeError: input.readAllBytes is not a function
>>>      >      >      >
>>>      >      >      > Error: Cannot read file [E:\x3d-code\www.web3d.org <http://www.web3d.org/> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>> <http://www.web3d.org <http://www.web3d.org/>>\x3d\stylesheets\java\nashorn\node_modules\xmldom\package.json]:
>>>      >      >      >
>>>      >      >      > [Error] TODO problem handling local exception within CommandLine, exiting
>>>      >      >      >
>>>      >      >      > org.web3d.x3d.sai.X3DException: ScriptException when processing fileName nashorn\examples\HelloWorldProgramOutput.Nashorn.js.intermediate.js, unable to save result: javax.script.ScriptException: Error: Cannot load JSON file in nashorn/jvm-npm.js at line number 216 at column number 8
>>>      >      >      >
>>>      >      >      >                  at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1662)
>>>      >      >      >
>>>      >      >      >                  at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:628)
>>>      >      >      >
>>>      >      >      >                  at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:163)
>>>      >      >      >
>>>      >      >      > parameter: source file HelloWorldProgramOutput.x3d filesize 20956 bytes, parsed using Document Object Model (DOM) X3DLoader
>>>      >      >      >
>>>      >      >      > parameter: "-toJSON" for conversion to JSON encoding
>>>      >      >      >
>>>      >      >      > parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Java.json" for result file name root nashorn/examples/HelloWorldProgramOutput.Java
>>>      >      >      >
>>>      >      >      > convert to JSON:
>>>      >      >      >
>>>      >      >      > Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Java.json
>>>      >      >      >
>>>      >      >      > 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
>>>      >      >      >
>>>      >      >      > file conversion successful: HelloWorldProgramOutput.Java.json (39749 bytes)
>>>      >      >      >
>>>      >      >      > parameter: source file HelloWorldProgramOutput.x3d filesize 20956 bytes, parsed using Document Object Model (DOM) X3DLoader
>>>      >      >      >
>>>      >      >      > parameter: "-toX3D" for conversion to X3D encoding
>>>      >      >      >
>>>      >      >      > parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Java.x3d" for result file name root nashorn/examples/HelloWorldProgramOutput.Java
>>>      >      >      >
>>>      >      >      > convert to X3D:
>>>      >      >      >
>>>      >      >      > Warning: toFileX3D() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Java.x3d
>>>      >      >      >
>>>      >      >      > file conversion successful: HelloWorldProgramOutput.Java.x3d (20956 bytes)
>>>      >      >      >
>>>      >      >      > ===========================================
>>>      >      >      >
>>>      >      >      > ============================================================
>>>      >      >      >
>>>      >      >      > As you can see, the exception is in nashorn/jvm-npm.js:
>>>      >      >      >
>>>      >      >      >                  TypeError: input.readAllBytes is not a function
>>>      >      >      >
>>>      >      >      > Header in that file indicates that you have modified it.
>>>      >      >      >
>>>      >      >      > Specific javascript code block of interest:
>>>      >      >      >
>>>      >      >      >     function readFile (filename, core) {
>>>      >      >      >
>>>      >      >      >       var input;
>>>      >      >      >
>>>      >      >      >       try {
>>>      >      >      >
>>>      >      >      >         if (core) {
>>>      >      >      >
>>>      >      >      >           var classloader = java.lang.Thread.currentThread().getContextClassLoader();
>>>      >      >      >
>>>      >      >      >           input = classloader.getResourceAsStream(filename);
>>>      >      >      >
>>>      >      >      >         } else {
>>>      >      >      >
>>>      >      >      >                  input = new java.io.FileInputStream(filename);
>>>      >      >      >
>>>      >      >      >         }
>>>      >      >      >
>>>      >      >      >         return new java.lang.String(input.readAllBytes());
>>>      >      >      >
>>>      >      >      >       } catch (e) {
>>>      >      >      >
>>>      >      >      >         System.err.println(e);
>>>      >      >      >
>>>      >      >      >         throw new ModuleError('Cannot read file [' + filename + ']: ', 'IO_ERROR', e);
>>>      >      >      >
>>>      >      >      >       }
>>>      >      >      >
>>>      >      >      >     }
>>>      >      >      >
>>>      >      >      > JDK 8 Javadoc for java.io.FileInputStream does not provide a "readAllBytes()" method.  (Nor does JDK 1.9; however I am currently holding at 1.8 to stay compatible with Netbeans 8.)
>>>      >      >      >
>>>      >      >      > https://docs.oracle.com/javase/8/docs/api/java/io/FileInputStream.html <https://docs.oracle.com/javase/8/docs/api/java/io/FileInputStream.html>
>>>      >      >      >
>>>      >      >      > So it looks like you need another method.
>>>      >      >      >
>>>      >      >      > A search for "java.io.FileInputStream readAllBytes" provides a number of hits.  For example:
>>>      >      >      >
>>>      >      >      >                  File to byte[] in Java
>>>      >      >      >
>>>      >      >      > https://stackoverflow.com/questions/858980/file-to-byte-in-java <https://stackoverflow.com/questions/858980/file-to-byte-in-java>
>>>      >      >      >
>>>      >      >      > 2. Continuing with your prior error console also appears fruitful:
>>>      >      >      >
>>>      >      >      >  >       [exec] [X3DLoaderObject error] Incorrectly handled object construction, current elementObject=ViewpointGroup (ViewpointGroup), child=Viewpoint, java.lang.ClassCastException: org.web3d.x3d.jsail.Navigation.ViewpointGroupObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec] java.lang.ClassCastException: org.web3d.x3d.jsail.Navigation.ViewpointGroupObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:1146)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:542)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:542)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:430)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:399)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$372$Json$cu1$restOf.:program(nashorn/examples/Json.js:15)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)
>>>      >      >      >
>>>      >      >      >  >
>>>      >      >      >
>>>      >      >      >  >       [exec]     at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)
>>>      >      >      >
>>>      >      >      > Looks like it was trying to treat ViewpointGroup like a X3DGroupingNode - but it is not.  ViewpointGroup is not a X3DGroupingNode node, and can only contain a Metadata* node, Viewpoint/OrthoViewpoint/GeoViewpoint and other ViewpointGroup nodes.
>>>      >      >      >
>>>      >      >      > This might have been fixed already as part of the many DOM loader improvements performed; not seeing that error in my console.  Worth retesting if you can address the readAllBytes issue.
>>>      >      >      >
>>>      >      >      > I've added a warning to X3D tooltips to clarify that.
>>>      >      >      >
>>>      >      >      > Hope next round of improvement/testing can sort this one out fully.
>>>      >      >      >
>>>      >      >      > all the best, Don
>>>      >      >      >
>>>      >      >      > --
>>>      >      >      >
>>>      >      >      > Don Brutzman  Naval Postgraduate School, Code USW/Br brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto: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 <http://faculty.nps.edu/brutzman>
>>>      >      >      >
>>>      >      >
>>>      >      >
>>>      >      >     all the best, Don
>>>      >      >     --
>>>      >      >     Don Brutzman  Naval Postgraduate School, Code USW/Br brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu>> <mailto:brutzman at nps.edu <mailto:brutzman at nps.edu><mailto:brutzman at nps.edu <mailto: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
>>>      >      >
>>>      >
>>>      >
>>>      >     all the best, Don
>>>      >     --
>>>      >     Don Brutzman  Naval Postgraduate School, Code USW/Br brutzman at nps.edu <mailto:brutzman at nps.edu> <mailto:brutzman at nps.edu <mailto: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
>>>      >
>>> 
>>> 
>>>     all the best, Don
>>>     --     Don Brutzman  Naval Postgraduate School, Code USW/Br brutzman at nps.edu <mailto: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
>>> 
>> all the best, Don
> 
> 
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu <mailto: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 <http://faculty.nps.edu/brutzman>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180614/40baf044/attachment-0001.html>


More information about the x3d-public mailing list