[x3d-public] X3DJSAIL, X3dToJava.xslt

John Carlson yottzumm at gmail.com
Wed Apr 18 19:13:15 PDT 2018


There are other problems too, besides casting.   I think they are also due
to string formatting, but not really sure.

On Wed, Apr 18, 2018, 10:09 PM Don Brutzman <brutzman at nps.edu> wrote:

> [cc: list, now that we've diagnosed the cause]
>
> 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.
>
> 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.
>
> On 4/18/2018 3:11 PM, John Carlson wrote:
> > Yes, specifying an .x3d file is what causes it to throw an exception.
> >
> > On Wed, Apr 18, 2018, 12:50 PM Don Brutzman <brutzman at nps.edu <mailto:
> brutzman at nps.edu>> wrote:
> >
> >     I was able to run all of your prior .java examples OK, including
> these.
> >
> >     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.
> >
> >     example:
> >
> >              java net/x3djsonld/data/plainflowers
> >
> >     instead of
> >
> >              java net/x3djsonld/data/plainflowers
> ../data/plainflowers.x3d
> >
> >     Meanwhile I will look further at loader object handling of these
> cases.
> >
> >     On 4/17/2018 11:31 PM, John Carlson wrote:
> >      > Here’s the class cast exceptions being generated.  Perhaps we can
> add interfaces?
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.CubeMapTexturing.ComposedCubeMapTextureObject cannot be
> cast to org.web3d.x3d.sai.Core.X3DChildNode
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.EnvironmentalEffects.TextureBackgroundObject cannot be
> cast to org.web3d.x3d.jsail.Shape.AppearanceObject
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.Geometry3D.BoxObject cannot be cast to
> org.web3d.x3d.sai.Core.X3DChildNode
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.Geometry3D.IndexedFaceSetObject cannot be cast to
> org.web3d.x3d.sai.Grouping.X3DGroupingNode
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.Geometry3D.SphereObject cannot be cast to
> org.web3d.x3d.sai.Core.X3DChildNode
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.Shape.AppearanceObject cannot be cast to
> org.web3d.x3d.sai.Grouping.X3DGroupingNode
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.Shape.ShapeObject cannot be cast to
> org.web3d.x3d.sai.Grouping.X3DGroupingNode
> >      >
> >      > java.lang.ClassCastException:
> org.web3d.x3d.jsail.Texturing.TextureCoordinateObject cannot be cast to
> org.web3d.x3d.sai.Rendering.X3DCoordinateNode
> >      >
> >      > Otherwise, these probably need to be handled differently in the
> code with instanceof or some such. See exceptions.txt for line numbers.
> >      >
> >      > 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?
> >      >
> >      > Thanks,
> >      >
> >      > John
> >      >
> >      > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986>
> for Windows 10
> >      >
> >      > *From: *John Carlson <mailto:yottzumm at gmail.com <mailto:
> yottzumm at gmail.com>>
> >      > *Sent: *Wednesday, April 18, 2018 12:06 AM
> >      > *To: *Don Brutzman <mailto:brutzman at nps.edu <mailto:
> brutzman at nps.edu>>
> >      > *Subject: *RE: X3DJSAIL, X3dToJava.xslt
> >      >
> >      > Here are all the invocations that fail, with the Exception
> generated:
> >      >
> >      > http://coderextreme.net/exceptions.txt
> >      >
> >      > Something’s up.   Is there a generic program I can use to load an
> X3D XML file?
> >      >
> >      > Thanks!
> >      >
> >      > John
> >      >
> >      > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986>
> for Windows 10
> >      >
> >      > *From: *Don Brutzman <mailto:brutzman at nps.edu <mailto:
> brutzman at nps.edu>>
> >      > *Sent: *Tuesday, April 17, 2018 10:53 PM
> >      > *To: *John Carlson <mailto:yottzumm at gmail.com <mailto:
> yottzumm at gmail.com>>
> >      > *Subject: *Re: X3DJSAIL, X3dToJava.xslt
> >      >
> >      > Here is an example invocation for one of the examples that you
> had copied:
> >      >
> >      > ===================================
> >      >
> >      > E:\x3d-code\www.web3d.org <http://www.web3d.org>\x3d\content\examples\X3dForAdvancedModeling/Buildings//ArchHalf.java
> produced from ArchHalf.x3d
> >      >
> >      > /** Large attribute array: IndexedFaceSet DEF='ArchIndex'
> coordIndex field, scene-graph level=4, element #12, 318 total numbers */
> >      >
> >      > /** Large attribute array: Coordinate DEF='ArchChord' point
> field, scene-graph level=5, element #12, 468 total numbers made up of 156
> 3-tuple values */
> >      >
> >      > [Large tuple found: Coordinate point, $tupleCount=156,
> $tupleSplitSize=10, string-length=3311]
> >      >
> >      > Compiling 1 source file to E:\x3d-code\www.web3d.org <
> http://www.web3d.org>\x3d\content\examples\X3dForAdvancedModeling\classes
> >      >
> >      > now run and validate the java model
> >      >
> >      > java -classpath
> classes;../../../stylesheets/java/jars/X3DJSAIL.3.3.full.jar
> X3dForAdvancedModeling.Buildings.ArchHalf
> >      >
> >      > Java program "ArchHalf" self-validation test results: success
> >      >
> >      > ===================================
> >      >
> >      > 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
> >     --
> >     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
> --
> 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/20180419/722bbc18/attachment-0001.html>


More information about the x3d-public mailing list