[x3d-public] Fatal X3DJSAIL error using JDK 8u202. Will try to downloadlatestJava binary version.
John Carlson
yottzumm at gmail.com
Fri Jun 28 09:42:26 PDT 2019
Thanks for your patience!
https://github.com/carlsonsolutiondesign/x3dpsail
Is ready to test again.
You may install in python (not Anaconda) via command prompt:
$ pip3 install x3dpsail
If someone can find a workable solution for creating an Anaconda channel and package installation instructions that would be great.
I got it to work in Anaconda by putting the package in my PATH, and restarting Anaconda.
I also had to do
from x3dpsail import x3dpsail
at the top of the file in jupyter lab.
Attached is a sample notebook that has a bug in it. Should I offer a bug bounty?
I’ve got it worked down to the following code:
from x3dpsail import x3dpsail
(x3dpsail.ProtoBody()
.addChild(x3dpsail.Transform()
.setIS(x3dpsail.IS())
)
)
The thing is, TransformObject extends X3DNode, so I am puzzled!
Traceback (most recent call last):
File "passed.py", line 5, in <module>
.setIS(x3dpsail.IS())
File "jnius\jnius_export_class.pxi", line 760, in jnius.JavaMethod.__call__
File "jnius\jnius_conversion.pxi", line 78, in jnius.populate_args
File "jnius\jnius_utils.pxi", line 205, in jnius.check_assignable_from
jnius.JavaException: Invalid instance of 'org/web3d/x3d/jsail/X3DConcreteNode' passed for a 'org/web3d/x3d/sai/Core/X3DNode'
So it’s a java bug. See errors in below message.
Thanks,
John
Sent from Mail for Windows 10
From: John Carlson
Sent: Friday, June 28, 2019 3:06 AM
To: X3D Graphics public mailing list; Don Brutzman
Subject: RE: Fatal X3DJSAIL error using JDK 8u202. Will try to downloadlatestJava binary version.
“Works” with OpenJDK 12.0.1 binary—no JNI error. Please upgrade.
Here’s the error generated.
$ java -cp /c/x3d-code/www.web3d.org/x3d/stylesheets/java/jars/X3DJSAIL.3.3.full.jar";". net/coderextreme/data/abox
Error: Unable to initialize main class net.coderextreme.data.abox
Caused by: java.lang.NoClassDefFoundError: org/web3d/x3d/sai/Rendering/X3DGeometryNode
Sent from Mail for Windows 10
From: John Carlson
Sent: Friday, June 28, 2019 2:17 AM
To: X3D Graphics public mailing list; Don Brutzman
Subject: Fatal X3DJSAIL error using JDK 8u202. Will try to download latestJava binary version.
===========================================================================================================
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.
Sent from Mail for Windows 10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190628/eb14cac1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConcreteOrNot.ipynb
Type: application/octet-stream
Size: 5422 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190628/eb14cac1/attachment-0001.obj>
More information about the x3d-public
mailing list