[x3d-public] Fatal X3DJSAIL error using JDK 8u202. Will try to download latest Java binary version.

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sat Jun 29 18:05:47 PDT 2019


1. I have rebuilt and redeployed X3DJSAIL using JDK 8u212.  No changes in code, all smoke tests pass.  Should be the same as 202 version.  You do not need JDK 8u212 to run the X3DJSAIL .jar since we should remain compatible with any JDK 1.8 version.  Can you please test that the binary .jar works with 202.

Not yet ready to add OpenJDK or Java 12 testing to the build process.  At some point later this year it will likely happen.

2. Next, to your problem.  Inspection reveals that X3DJSAIL has multiple methods for ProtoBody to addChild or addChildren.

[First entry shows return type; when type is void then it is likely a requirement of underlying SAI which cannot be overridden.]

X3DJSAIL Javadoc: ProtoBody
http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/ProtoBodyObject.html#method.summary

------
ProtoBodyObject 	addChild(X3DNode newValue)
	Utility method to add single child element to contained list of existing children nodes (if any).
ProtoBodyObject 	addChildren(ProtoInstanceObject newValue)
	Add single ProtoInstanceObject (with appropriate node type and containerField value) to MFNode array for children field.
void 	addChildren(X3DNode newValue)
	Add single node to existing array of children nodes (if any).
void 	addChildren(X3DNode[] newValue)
	Add array of children nodes to array of existing nodes (if any).
------

John we can sometimes add a utility method if there is a hole or something missing, but we can't add them for every node in X3D.  Can't overload methods/interfaces with overlapping types in Java.

As before I recommend we get HelloWorld.py working first, since HelloWorld.x3d and HelloWorld.java and HelloWorld.json all work just fine.  There are several "abox" models scattered around so it is not possible for me to replicate your results with confidence.



On 6/28/2019 12:17 AM, John Carlson wrote:
> ===========================================================================================================
> 
> But work on my abox.future.py bug below, pretty please?  With or without wrappers, it doesn’t matter which to me.
> 
> Here is the minimal code which fails.
> 
> import x3dpsail
> 
> (x3dpsail.ProtoBody()
> 
>      .addChild(x3dpsail.Transform()
> 
>          .setIS(x3dpsail.ISObject())
> 
>      )
> 
> )
> 
> addChild takes an X3DNode.
> 
> setIS returns a  TransformObject—an X3DConcreteNode
> 
> Please add to ProtoBodyObject.java an
> 
> addChild(TransformObject)
> 
> and/or
> 
> addChild(X3DConcreteNode)
> 
> You can do it at the same time you are adding addShaders() – see below.
> 
> Alternatively, you can make X3DConcreteNode inherit from X3DNode, I guess.   This seems best.  I’m not sure why it doesn’t already? How about TransformObject extend from X3DNode in the short term?   That’s not in the standard, right?  It looks like it already does.
> 
> This appears to be a Java issue.  What does the same Java do? AHA!
> 
> $ java -cp /c/x3d-code/www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.3.3.full.jar";". net/coderextreme/data/abox
> 
> java.lang.NoClassDefFoundError: org/web3d/x3d/sai/Rendering/X3DGeometryNode
> 
>          at java.lang.Class.getDeclaredMethods0(Native Method)
> 
>          at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
> 
>          at java.lang.Class.privateGetMethodRecursive(Unknown Source)
> 
>          at java.lang.Class.getMethod0(Unknown Source)
> 
>          at java.lang.Class.getMethod(Unknown Source)
> 
>          at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
> 
>          at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
> 
> Caused by: java.lang.ClassNotFoundException: org.web3d.x3d.sai.Rendering.X3DGeometryNode
> 
>          at java.net.URLClassLoader.findClass(Unknown Source)
> 
>          at java.lang.ClassLoader.loadClass(Unknown Source)
> 
>          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> 
>          at java.lang.ClassLoader.loadClass(Unknown Source)
> 
>          ... 7 more
> 
> Error: A JNI error has occurred, please check your installation and try again
> 
> Exception in thread "main"
> 
> Previous versions of the jar work:
> 
> $ java -cp ../../../../pythonSAI/X3DJSAIL.3.3.full.jar";". net/coderextreme/data/abox
> 
> Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file ../data/abox.new.json
> 
> Time to back some changes out? Report bug to Oracle?
> 
> $ java -version
> 
> java version "1.8.0_202"
> 
> Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
> 
> Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
> 
> Thanks,
> 
> I don’t have the current version of Java on my system.  I don’t want to install the lastest JDK 8 under the new Oracle agreement.
> 
> HELP!
> 
> Please try on your own systems.
>

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


More information about the x3d-public mailing list