[x3d-public] X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObject testing

John Carlson yottzumm at gmail.com
Wed Apr 25 12:11:58 PDT 2018


Okay, the CommandLine class was key.  Previously reported class cast errors seem to be working fine now. Here are the leftover errors, and I will attach the files.
There are more, but similar.  Let’s handle these first, because I don’t want to run out of space in the mail message.  As far as I can tell, these don’t give warnings when validating Java code.

These errors all seem related to using hex values in images.

Good luck!

John

$ java org.web3d.x3d.jsail.CommandLine ../data/indexedfaceset_pixeltexture_whole.x3d -validate
parameter: source file indexedfaceset_pixeltexture_whole.x3d filesize 4087 bytes
parameter: "-validate" for model validation
[X3DLoaderObject] <meta name='warning' content='file did not transform to vrml97'/>
[X3DLoaderObject] <meta name='info' content='Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, http://www.web3d.org/working-groups/x3d'/>
[X3DLoaderObject error] Invoking PixelTexture.setImage(2 2 4 0xFF0000FF 0x00FF00FF 0xFFFFFFFF 0xFFFF00FF) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 2 4 0xFF0000FF 0x00FF00FF 0xFFFFFFFF 0xFFFF00FF) For input string: "0xFF0000FF"

validate results: success, no problems noted




$ java org.web3d.x3d.jsail.CommandLine ../data/PixelTextureComponentExamples.x3d -validate
parameter: source file PixelTextureComponentExamples.x3d filesize 4639 bytes
parameter: "-validate" for model validation
[X3DLoaderObject error] Invoking PixelTexture.setImage(1 2 1 0xFF 0x00) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(1 2 1 0xFF 0x00) For input string: "0xFF"

[X3DLoaderObject error] Invoking PixelTexture.setImage(2 1 2 0xCCFF 0x2277) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 1 2 0xCCFF 0x2277) For input string: "0xCCFF"

[X3DLoaderObject error] Invoking PixelTexture.setImage(2 4 3 0xFF0000 0xFF00 0x000000 0 0 0 0xFFFFFF 0xFFFF00) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 4 3 0xFF0000 0xFF00 0x000000 0 0 0 0xFFFFFF 0xFFFF00) For input string: "0xFF0000"

[X3DLoaderObject error] Invoking PixelTexture.setImage(3 2 4 0xFF0000FF 0x00FF00FF 0x0000FFFF 0xFF00007F 0x00FF007F 0x0000FF7F) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(3 2 4 0xFF0000FF 0x00FF00FF 0x0000FFFF 0xFF00007F 0x00FF007F 0x0000FF7F) For input string: "0xFF0000FF"

[X3DLoaderObject error] Invoking PixelTexture.setImage(8 8 1 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(8 8 1 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc) For input string: "0xcc"

validate results: success, no problems noted



$ java org.web3d.x3d.jsail.CommandLine ../data/rgb_alpha.x3d -validate
parameter: source file rgb_alpha.x3d filesize 4389 bytes
parameter: "-validate" for model validation
[X3DLoaderObject] <meta name='info' content='Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, http://www.web3d.org/working-groups/x3d'/>
[X3DLoaderObject error] Invoking PixelTexture.setImage(2 2 4 0xFF0000FF 0xFFFF0000 0xFFFF0000 0xFF0000FF) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 2 4 0xFF0000FF 0xFFFF0000 0xFFFF0000 0xFF0000FF) For input string: "0xFF0000FF"

validate results: success, no problems noted





$ java org.web3d.x3d.jsail.CommandLine ../data/Table5_18PixelTexture.x3d -validate
parameter: source file Table5_18PixelTexture.x3d filesize 3293 bytes
parameter: "-validate" for model validation
[X3DLoaderObject error] Invoking PixelTexture.setImage(2 2 3 0xE6B5FD 0xFFDBB7 0xFFDBB7 0xE6B5FD) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 2 3 0xE6B5FD 0xFFDBB7 0xFFDBB7 0xE6B5FD) For input string: "0xE6B5FD"

[X3DLoaderObject error] Invoking PixelTexture.setImage(1 2 1 0xFF 0x00) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(1 2 1 0xFF 0x00) For input string: "0xFF"

[X3DLoaderObject error] Invoking PixelTexture.setImage(2 1 2 0xCCFF 0x2277) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 1 2 0xCCFF 0x2277) For input string: "0xCCFF"

[X3DLoaderObject error] Invoking PixelTexture.setImage(2 4 3 0xFF0000 0x00FF00 0 0 0 0 0xFFFFFF 0xFFFF00) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(2 4 3 0xFF0000 0x00FF00 0 0 0 0 0xFFFFFF 0xFFFF00) For input string: "0xFF0000"

[X3DLoaderObject error] Invoking PixelTexture.setImage(3 2 4 0xFF0000FF 0x00FF00FF 0x0000FFFF 0xFF00007F 0x00FF007F 0x0000FF7F) failed (likely due to illegal value),
   java.lang.reflect.InvocationTargetException null
   org.web3d.x3d.sai.InvalidFieldValueException: new SFImageObject(3 2 4 0xFF0000FF 0x00FF00FF 0x0000FFFF 0xFF00007F 0x00FF007F 0x0000FF7F) For input string: "0xFF0000FF"

validate results: success, no problems noted



Sent from Mail for Windows 10

From: Don Brutzman
Sent: Wednesday, April 25, 2018 1:57 PM
To: John Carlson
Cc: x3d-public at web3d.org
Subject: Re: X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObject testing

On 4/24/2018 11:53 PM, John Carlson wrote:
> You’ve either disabled the DOM Loader, or disabled validation on input X3D files.

Actually full testing of DOM loader, in concert with validation, is the subject of my recent posts.

Are you using the latest X3DJSAIL distribution?  Perhaps you have a custom properties setting or codebase change that is overriding something somehow?

Let's get you realigned please, details follow.

>  I will try to come up with my own Java or JavaScript to validate the DOM Loaded files.

Hoping we can get on the same sheet of music first, saving some time.  Then let's extend the test framework further to add anything else you want.

X3DJSAIL X3DLoaderObject does the DOM loading, and is further launchable via CommandLine class.  A number of omissions have been fixed in the past week, the gap is closing.

Excerpted outputs follow.

===================================================
http://www.web3d.org/x3d/content/examples/build.xml

<target name="processScenes.X3DJSAIL.DomLoaderTests.all"
	 description="test DOM-based scene loading by X3DJSAIL.X3DLoader">
    <echo message="test DOM-based scene loading by X3DJSAIL.X3DLoader for all of the example archives"/>
    <echo message="..X3dForAdvancedModeling,X3dForWebAuthors,Vrml2Sourcebook,ConformanceNist,Basic,Savage,SavageDefense"/>
    <echo message="processScenes.X3DJSAIL.DomLoaderTests in all example archives"/>
    <ant dir="X3dForAdvancedModeling" target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <ant dir="X3dForWebAuthors"       target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <ant dir="Vrml2Sourcebook"        target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <ant dir="ConformanceNist"        target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <ant dir="Basic"                  target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <ant dir="Savage"                 target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <ant dir="SavageDefense"          target="processScenes.X3DJSAIL.DomLoaderTests" inheritAll="false"/>
    <echo message="processScenes.X3DJSAIL.DomLoaderTests.all complete"/>
</target>

===================================================

ant -f E:\\x3d-code\\www.web3d.org\\x3d\\content\\examples processScenes.X3DJSAIL.DomLoaderTests.all
processScenes.X3DJSAIL.DomLoaderTests.all:
test DOM-based scene loading by X3DJSAIL.X3DLoader for all of the example archives
..X3dForAdvancedModeling,X3dForWebAuthors,Vrml2Sourcebook,ConformanceNist,Basic,Savage,SavageDefense
processScenes.X3DJSAIL.DomLoaderTests in all example archives

X3D examples: X3dForAdvancedModeling.processScenes.X3DJSAIL.DomLoaderTests:
test DOM-based scene loading by X3DJSAIL.X3DLoader
Verifying Apache Ant XML Catalog resolver classpath: C:\apache-ant-1.10.1\lib/resolver.jar (84091 bytes)
org.web3d.x3d.jsail.CommandLine E:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CaffeinePubChem2519SticksColor.x3d -validate
parameter: source file CaffeinePubChem2519SticksColor.x3d filesize 22932 bytes
parameter: "-validate" for model validation
validate results: success, no problems noted
===================================
org.web3d.x3d.jsail.CommandLine E:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//CleatClamp.x3d -validate
parameter: source file CleatClamp.x3d filesize 172126 bytes
parameter: "-validate" for model validation
[X3DLoaderObject] <meta name='warning' content='Do not use for climbing or yachting.'/>
validate results: success, no problems noted
===================================
org.web3d.x3d.jsail.CommandLine E:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//MetadataRootNodeTest.x3d -validate
parameter: source file MetadataRootNodeTest.x3d filesize 3427 bytes
parameter: "-validate" for model validation
validate results: success, no problems noted
===================================
org.web3d.x3d.jsail.CommandLine E:\x3d-code\www.web3d.org\x3d\content\examples\X3dForAdvancedModeling/AdditiveManufacturing//Rocktopus.x3d -validate
parameter: source file Rocktopus.x3d filesize 2224841 bytes
parameter: "-validate" for model validation
validate results: success, no problems noted
[...]
===================================================

I periodically upload the following, will refresh and update.  The first is the specific focus of current testing, excerpted above.

http://www.web3d.org/x3d/content/examples/build.log.DomLoader.txt
http://www.web3d.org/x3d/content/examples/build.log.java.txt
http://www.web3d.org/x3d/content/examples/build.log.json.txt

and X3DJSAIL "smoke tests" that are checked and updated with each release:

http://www.web3d.org/specifications/java/X3DJSAIL.html#Examples

console output:
http://www.web3d.org/specifications/java/examples/HelloWorldProgramOutputLog.txt

> Will look for an update.
http://www.web3d.org/specifications/java/X3DJSAIL.html#Downloads

Test programs, results and autogeneration build scripts are available in Sourceforge version control.
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/

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/20180425/9d1b7f9d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Table5_18PixelTexture.x3d
Type: application/octet-stream
Size: 3293 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180425/9d1b7f9d/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgb_alpha.x3d
Type: application/octet-stream
Size: 4389 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180425/9d1b7f9d/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PixelTextureComponentExamples.x3d
Type: application/octet-stream
Size: 4639 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180425/9d1b7f9d/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indexedfaceset_pixeltexture_whole.x3d
Type: application/octet-stream
Size: 4087 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180425/9d1b7f9d/attachment-0007.obj>


More information about the x3d-public mailing list