[x3d-public] Fatal X3DJSAIL error using JDK 8u202. Will try todownloadlatestJava binary version.
John Carlson
yottzumm at gmail.com
Wed Jul 3 08:32:04 PDT 2019
Let me describe my technique, first I was trying to fix non-wrapped code,
but it became overwhelming. Thus my second technique was judiciously
adding wrappers where it looked like adding wrappers would fix the problem.
On Wed, Jul 3, 2019 at 10:06 AM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:
> What's your list of problem fields? They should all work, no gaps known.
> For example
>
> metaObject: setName(String) accepts a simple String and returns the same
> object
>
> http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/metaObject.html#setName-java.lang.String-
>
> metaObject: setContent(String) accepts a simple String and returns the
> same object
>
> http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/metaObject.html#setContent-java.lang.String-
>
>
> On 7/3/2019 7:56 AM, John Carlson wrote:
> > There is a small list of attributes I add wrappers to to make the
> examples work found in the serializer.
> >
> > On Wed, Jul 3, 2019 at 9:38 AM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu <mailto:brutzman at nps.edu>> wrote:
> >
> > Looks like you are pretty close! Suggested tweaks if possible:
> >
> > - avoid wrapping types on attributes, e.g.
> x3dpsail.SFString("title") to "title"
> >
> > - can we change "import x3dpsail" to "import x3dpsail as x3d" and
> then change all the element prefixes from "x3dpsail." to "x3d."
> >
> > this would make the source more consistent. when we implement a
> native-Python class library, we can call that x3d and retain x3dpsail as is.
> >
> > good luck John!
> >
> > On 7/1/2019 7:07 PM, John Carlson wrote:
> > > Did either of these, HelloWorld.py or HelloWorld.future.py <
> http://HelloWorld.future.py> work for you? I believe they are checkin in
> under the python/pyjnius folder. Are you looking elsewhere, GitHub
> x3dpsail repository has them too.
> > >
> > > Thanks,
> > >
> > > John
> > >
> > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986>
> for Windows 10
> > >
> > > *From: *John Carlson <mailto:yottzumm at gmail.com <mailto:
> yottzumm at gmail.com>>
> > > *Sent: *Saturday, June 29, 2019 8:44 PM
> > > *To: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu
> <mailto:brutzman at nps.edu>>
> > > *Cc: *X3D Graphics public mailing list <mailto:
> x3d-public at web3d.org <mailto:x3d-public at web3d.org>>
> > > *Subject: *RE: Fatal X3DJSAIL error using JDK 8u202. Will try
> todownloadlatestJava binary version.
> > >
> > > This works too. I didn’t make any code changes to X3DJSAIL since
> your rebuild.
> > >
> > > import x3dpsail
> > >
> > > X3D0 = (x3dpsail.X3D().setProfile("Immersive").setVersion("3.3")
> > >
> > > .setHead(x3dpsail.head()
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.x3d").setName(x3dpsail.SFString("title")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("Simple X3D scene
> example: Hello World!").setName(x3dpsail.SFString("description")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("30 October
> 2000").setName(x3dpsail.SFString("created")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("14 April
> 2017").setName(x3dpsail.SFString("modified")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("Don
> Brutzman").setName(x3dpsail.SFString("creator")))
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.tall.png").setName(x3dpsail.SFString("Image")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://en.wikipedia.org/wiki/Hello_world
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> https://en.wikipedia.org/wiki/Hello#.22Hello.2C_World.22_computer_program
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> https://en.wikipedia.org/wiki/\ <https://en.wikipedia.org/wiki/%5C
> >"Hello,_World!\"_program").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://www.HelloWorldExample.net
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://www.web3D.org").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://www.web3d.org/realtime-3d/news/internationalization-x3d
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://www.web3d.org/x3d/content/examples/HelloWorld.x3d
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes
> ").setName(x3dpsail.SFString("reference")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview/HelloWorld.x3d
> ").setName(x3dpsail.SFString("identifier")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("
> http://www.web3d.org/x3d/content/examples/license.html
> ").setName(x3dpsail.SFString("license")))
> > >
> > > .addMeta(x3dpsail.meta().setContent("X3D-Edit 3.3,
> https://savage.nps.edu/X3D-Edit").setName(x3dpsail.SFString("generator")))
> > >
> > > # Alternate encodings: VRML97, X3D ClassicVRML Encoding,
> X3D Compressed Binary Encoding (CBE), X3DOM, JSON
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.wrl").setName(x3dpsail.SFString("reference")))
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.x3dv").setName(x3dpsail.SFString("reference")))
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.x3db").setName(x3dpsail.SFString("reference")))
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.xhtml").setName(x3dpsail.SFString("reference")))
> > >
> > >
> .addMeta(x3dpsail.meta().setContent("HelloWorld.json").setName(x3dpsail.SFString("reference"))))
> > >
> > > .setScene(x3dpsail.Scene()
> > >
> > > # Example scene to illustrate X3D nodes and fields (XML
> elements and attributes)
> > >
> > > .addChild(x3dpsail.WorldInfo().setTitle("Hello world!"))
> > >
> > > .addChild(x3dpsail.Group()
> > >
> > >
> .addChild(x3dpsail.Viewpoint().setDEF(x3dpsail.SFString("ViewUpClose")).setCenterOfRotation(x3dpsail.SFVec3f([0,-1,0])).setDescription(x3dpsail.SFString("Hello
> world!")).setPosition(x3dpsail.SFVec3f([0,-1,7])))
> > >
> > >
> .addChild(x3dpsail.Transform().setRotation(x3dpsail.SFRotation([0,1,0,3]))
> > >
> > > .addChild(x3dpsail.Shape()
> > >
> > > .setGeometry(x3dpsail.Sphere())
> > >
> > > .setAppearance(x3dpsail.Appearance()
> > >
> > >
> .setMaterial(x3dpsail.Material().setDEF(x3dpsail.SFString("MaterialLightBlue")).setDiffuseColor([0.1,0.5,1]))
> > >
> > >
> .setTexture(x3dpsail.ImageTexture().setDEF(x3dpsail.SFString("ImageCloudlessEarth")).setUrl(x3dpsail.MFString(["earth-topo.png","earth-topo.jpg","earth-topo-small.gif","
> http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png","
> http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg","
> http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif
> "]))))))
> > >
> > >
> .addChild(x3dpsail.Transform().setTranslation(x3dpsail.SFVec3f([0,-2,0]))
> > >
> > > .addChild(x3dpsail.Shape()
> > >
> > >
> .setGeometry(x3dpsail.Text().setDEF(x3dpsail.SFString("TextMessage")).setString(["Hello","world!"])
> > >
> > >
> .setFontStyle(x3dpsail.FontStyle().setJustify(["MIDDLE","MIDDLE"])))
> > >
> > > .setAppearance(x3dpsail.Appearance()
> > >
> > >
> .setMaterial(x3dpsail.Material().setUSE(x3dpsail.SFString("MaterialLightBlue")))))))))
> > >
> > > X3D0.toFileX3D("HelloWorld_RoundTrip.x3d")
> > >
> > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986>
> for Windows 10
> > >
> > > *From: *John Carlson <mailto:yottzumm at gmail.com <mailto:
> yottzumm at gmail.com>>
> > > *Sent: *Saturday, June 29, 2019 8:41 PM
> > > *To: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu
> <mailto:brutzman at nps.edu>>
> > > *Cc: *X3D Graphics public mailing list <mailto:
> x3d-public at web3d.org <mailto:x3d-public at web3d.org>>
> > > *Subject: *RE: Fatal X3DJSAIL error using JDK 8u202. Will try to
> downloadlatestJava binary version.
> > >
> > > Okay. This Hello, World works for me with 202. Attached. Let me
> know if/when you got it.
> > >
> > > John
> > >
> > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986>
> for Windows 10
> > >
> > > *From: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu
> <mailto:brutzman at nps.edu>>
> > > *Sent: *Saturday, June 29, 2019 8:05 PM
> > > *To: *John Carlson <mailto:yottzumm at gmail.com <mailto:
> yottzumm at gmail.com>>
> > > *Cc: *X3D Graphics public mailing list <mailto:
> x3d-public at web3d.org <mailto:x3d-public at web3d.org>>
> > > *Subject: *Re: Fatal X3DJSAIL error using JDK 8u202. Will try to
> download latestJava binary version.
> > >
> > > 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 <http://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 <
> http://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 <mailto: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
> > >
> >
> >
> > all the best, Don
> > --
> > Don Brutzman Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu <mailto: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
> >
>
>
> 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/20190703/52051de3/attachment-0001.html>
More information about the x3d-public
mailing list