[x3d-public] ClassCastException in X3DJSAIL. Probably okay, since it's a testprogram.

yottzumm at gmail.com yottzumm at gmail.com
Wed Feb 15 18:05:28 PST 2017


Likely there’s an easy reason.  Sorry I haven’t had more opportunity to look at this.  I am working on something else.

John

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Wednesday, February 15, 2017 8:32 PM
To: yottzumm at gmail.com
Cc: X3D Graphics public mailing list
Subject: Re: ClassCastException in X3DJSAIL. Probably okay, since it's a testprogram.

please send .java program, TIA

am guessing that maybe you didn't use setMetadata method on Appearance? two forms are available:

	http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Shape/AppearanceObject.html#setMetadata-org.web3d.x3d.sai.Core.X3DMetadataObject-

	http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Shape/AppearanceObject.html#setMetadata-org.web3d.x3d.jsail.Core.ProtoInstanceObject-

On 2/15/2017 4:41 PM, yottzumm at gmail.com wrote:
> www.web3d.org/x3d/content/examples/Basic/development/SchemaTest.json

or, more likely from scene head/meta information:

{

     "@name": "description",
     "@content": "Test scene for obscure schema validation cases."

},
{

     "@name": "error",
     "@content": "Test scene that does not render or validate."

},

	http://www.web3d.org/x3d/content/examples/Basic/development/SchemaTestIndex.html

X3D validator finds many things wrong:
	
	https://savage.nps.edu/X3dValidator?url=http://www.web3d.org/x3d/content/examples/Basic/development/SchemaTest.x3d

hmm, can you figure out a way to link a scene url into a json validator url?  for example, something that combines

	http://jsonlint.com/
with
	http://www.web3d.org/x3d/content/examples/Basic/development/SchemaTest.json

if so, i can add such validation-convenience links to each index page in the archives...


> java.lang.ClassCastException: org.web3d.x3d.jsail.Core.MetadataIntegerObject cannot be cast to org.web3d.x3d.sai.Core.X3DNode^M
>
>         at org.web3d.x3d.jsail.Core.MetadataSetObject.getValue(MetadataSetObject.java:427)^M
>
>         at org.web3d.x3d.jsail.Core.MetadataSetObject.validate(MetadataSetObject.java:1102)^M
>
>         at org.web3d.x3d.jsail.Shape.AppearanceObject.validate(AppearanceObject.java:1630)^M
>
>         at org.web3d.x3d.jsail.Shape.ShapeObject.validate(ShapeObject.java:1153)^M
>
>         at org.web3d.x3d.jsail.Core.SceneObject.validate(SceneObject.java:522)^M
>
>         at org.web3d.x3d.jsail.Core.X3DObject.validate(X3DObject.java:1603)^M
>
>         at org.web3d.x3d.jsail.Core.X3DObject.toFileJSON(X3DObject.java:725)^M
>
>         at www_web3d_org.x3d.content.examples.Basic.development.SchemaTest.main(SchemaTest.java:262)^M
>
> Exception in thread "main" java.lang.ClassCastException: org.web3d.x3d.jsail.Core.MetadataIntegerObject cannot be cast to org.web3d.x3d.sai.Core.X3DNode^M
>
>         at org.web3d.x3d.jsail.Core.MetadataSetObject.getValue(MetadataSetObject.java:427)^M
>
>         at org.web3d.x3d.jsail.Core.MetadataSetObject.validate(MetadataSetObject.java:1102)^M
>
>         at org.web3d.x3d.jsail.Shape.AppearanceObject.validate(AppearanceObject.java:1630)^M
>
>         at org.web3d.x3d.jsail.Shape.ShapeObject.validate(ShapeObject.java:1153)^M
>
>         at org.web3d.x3d.jsail.Core.SceneObject.validate(SceneObject.java:522)^M
>
>         at org.web3d.x3d.jsail.Core.X3DObject.validate(X3DObject.java:1603)^M
>
>         at org.web3d.x3d.jsail.Core.X3DObject.toFileJSON(X3DObject.java:725)^M
>
>         at www_web3d_org.x3d.content.examples.Basic.development.SchemaTest.main(SchemaTest.java:262)^M

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/20170215/b84e67cb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SchemaTest.java
Type: application/octet-stream
Size: 12820 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170215/b84e67cb/attachment-0001.obj>


More information about the x3d-public mailing list