<div dir="auto">It will be important for the JSON to DOM loader, once we start stress testing that.<div dir="auto"><br></div><div dir="auto">John</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 18, 2018, 10:09 PM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[cc: list, now that we've diagnosed the cause]<br>
<br>
aha good, thank you John! so you quit doing that (instead only invoking the Java by itself) and i go figure out what is going wrong.<br>
<br>
i have a better idea of what is causing the problem now, likely not enough handling of special cases for parent/child typing in the string-based DOM loader.<br>
<br>
On 4/18/2018 3:11 PM, John Carlson wrote:<br>
> Yes, specifying an .x3d file is what causes it to throw an exception.<br>
> <br>
> On Wed, Apr 18, 2018, 12:50 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a>>> wrote:<br>
> <br>
>     I was able to run all of your prior .java examples OK, including these.<br>
> <br>
>     Why do you have the .x3d file on the same line?  It doesn't have to load itself... probably that is getting mistakenly parsed as a command-line switch.  Should just be invocation of the java class.<br>
> <br>
>     example:<br>
> <br>
>              java net/x3djsonld/data/plainflowers<br>
> <br>
>     instead of<br>
> <br>
>              java net/x3djsonld/data/plainflowers ../data/plainflowers.x3d<br>
> <br>
>     Meanwhile I will look further at loader object handling of these cases.<br>
> <br>
>     On 4/17/2018 11:31 PM, John Carlson wrote:<br>
>      > Here’s the class cast exceptions being generated.  Perhaps we can add interfaces?<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.CubeMapTexturing.ComposedCubeMapTextureObject cannot be cast to org.web3d.x3d.sai.Core.X3DChildNode<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.EnvironmentalEffects.TextureBackgroundObject cannot be cast to org.web3d.x3d.jsail.Shape.AppearanceObject<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.Geometry3D.BoxObject cannot be cast to org.web3d.x3d.sai.Core.X3DChildNode<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.Geometry3D.IndexedFaceSetObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.Geometry3D.SphereObject cannot be cast to org.web3d.x3d.sai.Core.X3DChildNode<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.Shape.AppearanceObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.Shape.ShapeObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode<br>
>      ><br>
>      > java.lang.ClassCastException: org.web3d.x3d.jsail.Texturing.TextureCoordinateObject cannot be cast to org.web3d.x3d.sai.Rendering.X3DCoordinateNode<br>
>      ><br>
>      > Otherwise, these probably need to be handled differently in the code with instanceof or some such. See exceptions.txt for line numbers.<br>
>      ><br>
>      > Or else your generated Java (from XML) code is wrong—but I’m not sure why it’s being used if an XML file is being loaded.  Do you need the Java code again?<br>
>      ><br>
>      > Thanks,<br>
>      ><br>
>      > John<br>
>      ><br>
>      > Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" rel="noreferrer noreferrer" target="_blank">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br>
>      ><br>
>      > *From: *John Carlson <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank" rel="noreferrer">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank" rel="noreferrer">yottzumm@gmail.com</a>>><br>
>      > *Sent: *Wednesday, April 18, 2018 12:06 AM<br>
>      > *To: *Don Brutzman <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a>>><br>
>      > *Subject: *RE: X3DJSAIL, X3dToJava.xslt<br>
>      ><br>
>      > Here are all the invocations that fail, with the Exception generated:<br>
>      ><br>
>      > <a href="http://coderextreme.net/exceptions.txt" rel="noreferrer noreferrer" target="_blank">http://coderextreme.net/exceptions.txt</a><br>
>      ><br>
>      > Something’s up.   Is there a generic program I can use to load an X3D XML file?<br>
>      ><br>
>      > Thanks!<br>
>      ><br>
>      > John<br>
>      ><br>
>      > Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" rel="noreferrer noreferrer" target="_blank">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br>
>      ><br>
>      > *From: *Don Brutzman <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a>>><br>
>      > *Sent: *Tuesday, April 17, 2018 10:53 PM<br>
>      > *To: *John Carlson <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank" rel="noreferrer">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank" rel="noreferrer">yottzumm@gmail.com</a>>><br>
>      > *Subject: *Re: X3DJSAIL, X3dToJava.xslt<br>
>      ><br>
>      > Here is an example invocation for one of the examples that you had copied:<br>
>      ><br>
>      > ===================================<br>
>      ><br>
>      > E:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer noreferrer" target="_blank">www.web3d.org</a> <<a href="http://www.web3d.org" rel="noreferrer noreferrer" target="_blank">http://www.web3d.org</a>>\x3d\content\examples\X3dForAdvancedModeling/Buildings//ArchHalf.java produced from ArchHalf.x3d<br>
>      ><br>
>      > /** Large attribute array: IndexedFaceSet DEF='ArchIndex' coordIndex field, scene-graph level=4, element #12, 318 total numbers */<br>
>      ><br>
>      > /** Large attribute array: Coordinate DEF='ArchChord' point field, scene-graph level=5, element #12, 468 total numbers made up of 156 3-tuple values */<br>
>      ><br>
>      > [Large tuple found: Coordinate point, $tupleCount=156, $tupleSplitSize=10, string-length=3311]<br>
>      ><br>
>      > Compiling 1 source file to E:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer noreferrer" target="_blank">www.web3d.org</a> <<a href="http://www.web3d.org" rel="noreferrer noreferrer" target="_blank">http://www.web3d.org</a>>\x3d\content\examples\X3dForAdvancedModeling\classes<br>
>      ><br>
>      > now run and validate the java model<br>
>      ><br>
>      > java -classpath classes;../../../stylesheets/java/jars/X3DJSAIL.3.3.full.jar X3dForAdvancedModeling.Buildings.ArchHalf<br>
>      ><br>
>      > Java program "ArchHalf" self-validation test results: success<br>
>      ><br>
>      > ===================================<br>
>      ><br>
>      > all the best, Don<br>
>      ><br>
>      > --<br>
>      ><br>
>      > Don Brutzman  Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a>><br>
>      ><br>
>      > Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
>      ><br>
>      > X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
>      ><br>
> <br>
> <br>
>     all the best, Don<br>
>     -- <br>
>     Don Brutzman  Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a> <mailto:<a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a>><br>
>     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
>     X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
> <br>
<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank" rel="noreferrer">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
<br>
</blockquote></div>