[x3d-public] Please fix these issues with X3DJSAIL, etc. if possible

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Fri Jun 30 08:26:41 PDT 2023


John, thanks for your testing.  Feedback:

 

a.	Use of DIS networking is highly specialized.  Don’t use those nodes - except maybe in a special exploratory test cases, currently only Xj3D supports them.  X3D-Edit panels for sending/receiving DIS can help in any troubleshooting there.
b.	Whenever you get a “cannot be cast to class” error, that is typically reporting that you are trying to create an invalid scene graph.  Not sure about your case, HAnimJoint and LoadSensor are somewhat special cases (since HAnimJoint can only contain HAnimJoint,HAnimSegment; and LoadSensor can only contain X3DUrlObject nodes).
c.	Comparing a validated .x3d model to the .java source that is trying to construct a similar model can reveal whether you are proceeding well.  Each of the 4000 models X3D Example Archives provide both, so there are no shortage of examples.
d.	Pay a lot more attention to your model’s Java source code that X3DJSAIL, usually, and work that to isolate errors.
e.	If the problem is truly in X3DJSAIL then I will debug that code.  For your helpful excerpt here, it appears that the X3DJSAIL message might be too obsequious.  It should possibly report something like “you are trying to create an invalid scene graph, those node types don’t go together in the way that you are trying” (or somesuch).

 

Rephrase for your particulars:  neither HAnimJoint nor LoadSensor are grouping nodes.  As an authoring assistant, please be aware that X3D Tooltips give helpful links to X3D Architecture specification, X3DJSAIL Javadoc, and other helpful validation links for each node.

 

*	X3D Tooltips: HAnimJoint
*	https://www.web3d.org/x3d/content/X3dTooltips.html#HAnimJoint
*	https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/nodeIndex.html#HAnimJoint
*	https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/HAnim/HAnimJoint.html

 

*	X3D Tooltips: LoadSensor
*	https://www.web3d.org/x3d/content/X3dTooltips.html#LoadSensor
*	https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/nodeIndex.html#LoadSensor
*	https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Networking/LoadSensor.html

 

And so… not seeing your source model.java.  Please share when ready so that I can carefully debug/check X3DJSAIL and we can try further.  Again thanks.

 



 

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 https://faculty.nps.edu/brutzman

 

From: John Carlson <yottzumm at gmail.com> 
Sent: Thursday, June 29, 2023 5:53 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Please fix these issues with X3DJSAIL, etc. if possible

Don, please fix these issues with X3DJSAIL.  I think they are in X3DLoaderDOM.java, I haven't explored X3DUOM or schema yet.

 

org.web3d.x3d.jsail.DIS.DISEntityManager cannot be cast to class org.web3d.x3d.sai.Grouping.X3DGroupingNode

 

org.web3d.x3d.jsail.HAnim.HAnimJoint cannot be cast to class org.web3d.x3d.sai.Grouping.X3DGroupingNode

 

org.web3d.x3d.jsail.Networking.LoadSensor cannot be cast to class org.web3d.x3d.sai.Grouping.X3DGroupingNode

 

Hot spots seem to be:

 

     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:1352)

     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:453)

     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:490)

     [java]     at org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)

 

The first blue one, line 1352, appears to be the main problem:

 

                                // Note that Scene statement was already handled earlier

                                if (!(elementObject instanceof X3DGroupingNode))

                                {

                                    errorNotice = "*** [X3DLoaderDOM error] Parent-child node relationship not found! (parent " + nodeName + ", child " + childElementName +

                                                   ", containerField='" + containerField + "') Please report this problem to brutzman at nps.edu <mailto:brutzman at nps.edu> ";

                                    validationResult.append(errorNotice);

                                    System.out.println(errorNotice); // avoiding System.err due to redirection difficulties

                                } // WHERE'S THE ELSE?

                                ((X3DGroupingNode)elementObject).addChildren(new org.web3d.x3d.sai.Core.X3DNode[] { (X3DNode) childX3dElement } ); // default fallback can throw exception // 1352

 

Hope this helps! I think fixing the egregious class cast exception at line 1352 would be the most help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230630/86f6460c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 581828 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230630/86f6460c/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230630/86f6460c/attachment-0001.p7s>


More information about the x3d-public mailing list