[x3d-public] Possible patch to fix classpath issues, X3DUOM to ontology

John Carlson yottzumm at gmail.com
Sun Apr 10 18:15:08 PDT 2022


Don, here is patch to build.xml to include xmlresolver jars.  Tsvetanka
reported a similar issue to what I reported.

When I get home later tonight, I will try to build the ontologies, but I
may need a gentle reminder, like which targets to invoke—I see these from
Tsvetanka.

It appears like Tsvetanka  checked out the source under ant, which I doubt
is desirable???

John

---------- Forwarded message ---------
From: John Carlson <yottzumm at gmail.com>
Date: Sat, Apr 9, 2022 at 5:44 PM
Subject: Re: Problems building X3DJSAIL. old build log looks okay
To: X3D Graphics public mailing list <x3d-public at web3d.org>


Success compiling X3DJSAIL!

I had to make the following changes to build.xml, adding items to the
classpath of the saxon invocation, below.  You may wish to do something
else!

Here's what I added to the classpath:

${X3DJSAIL.lib.dir}/xmlresolver-4.2.0.jar
${X3DJSAIL.lib.dir}/xmlresolver-4.2.0-data.jar

The first 2 diffs show a problem I had on Linux, and is now appearing on
Windows 10.  I am not sure what is wrong.

The required diff is bolded.

$ svn diff build.xml
Index: build.xml
===================================================================
--- build.xml   (revision 33085)
+++ build.xml   (working copy)
@@ -161,9 +161,11 @@
         </exec>
         <!--
https://www.saxonica.com/documentation10/#!using-xsl/commandline -->
         <echo>saxon -? help</echo>
+       <!--
         <java classname="net.sf.saxon.Transform"
classpath="${saxon.dir}/${saxon.jar};." failonerror="true">
             <arg value="-?" description="help information"/>
         </java>
+       -->
         <echo>Check for node.js installation from https://nodejs.org</echo>
         <exec executable="${node.exe}">
             <arg value="--version"/>
@@ -445,7 +447,7 @@
         <echo message="create autogenerated Java source code:"/>
         <!--
https://stackoverflow.com/questions/51916221/javax-xml-bind-jaxbexception-implementation-of-jaxb-api-has-not-been-found-on-mo
-->
         <!--
https://stackoverflow.com/questions/48204141/replacements-for-deprecated-jpms-modules-with-java-ee-apis/48279048#48279048
-->
-        <java classname="net.sf.saxon.Transform"
classpath="${saxon.dir}/${saxon.jar};." fork="${fork}" failonerror="true">
+        <java classname="net.sf.saxon.Transform"
classpath="${saxon.dir}/${saxon.jar};
*${X3DJSAIL.lib.dir}/xmlresolver-4.2.0.jar;${X3DJSAIL.lib.dir}/xmlresolver-4.2.0-data.jar;*."
fork="${fork}" failonerror="true">
             <!-- arg value="-t" description="timing information"/ -->
             <arg value="-warnings:recover" description="recover after
writing a warning message"/>
             <arg value="-o:TempSaiJava.txt" description="output-doc"/>

On Sat, Apr 9, 2022 at 5:05 PM John Carlson <yottzumm at gmail.com> wrote:

> Yes, indeed, it was a problem with my installation.  I was running
> Microsoft JDK/JRE 11, it appears. Now I have a new problem running OpenJDK
> 18.  Any help is appreciated!  I will back out to OpenJDK 17, if required.
>
> $ ant create.X3DJSAIL
> Buildfile: C:\x3d-code\www.web3d.org\x3d\stylesheets\build.xml
>
> create.X3DJSAIL:
>      [echo] Build API for X3D Java Scene Authoring Interface Library
> (X3DJSAIL) from X3D Unified Object Model (X3DUOM)
>
> versions:
>      [echo]   ANT_HOME=${env.ANT_HOME}
>      [echo]  JAVA_HOME=C:/openjdk-18_windows-x64_bin/jdk-18
>      [echo] PYTHONHOME=${env.PYTHONHOME}
>      [echo] PYTHONPATH=${env.PYTHONPATH}
>      [echo] Check CLASSPATH for X3DJSAIL X3DJSAIL.4.0.full.jar or
> X3DJSAIL.4.0.classes.jar
>      [echo] CLASSPATH=${env.CLASSPATH}
>      [echo] javac source/target      $java.source=16
>      [echo]                          $java.target=16
>      [echo] Java/JVM version    $ant.java.version=18
>      [echo] Java/JVM detail version $java.version=18
>      [echo] Saxon directory            $saxon.dir=C:\x3d-code\
> www.web3d.org\x3d\stylesheets\java\lib
>      [echo] Saxon jar                  $saxon.jar=saxon-he-11.2.jar
>      [echo] Ant version              $ant.version=Apache Ant(TM) version
> 1.10.12 compiled on October 13 2021
>      [echo]
>      [echo] ant -version
>      [exec] Apache Ant(TM) version 1.10.12 compiled on October 13 2021
>      [echo] java -version
>      [exec] openjdk version "18" 2022-03-22
>      [exec] OpenJDK Runtime Environment (build 18+36-2087)
>      [exec] OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode,
> sharing)
>      [echo] python -version
>      [exec] Python 3.10.2
>      [echo] saxon -? help
>
> BUILD FAILED
> C:\x3d-code\www.web3d.org\x3d\stylesheets\build.xml:364: The following
> error occurred while executing this line:
> C:\x3d-code\www.web3d.org\x3d\stylesheets\build.xml:164:
> java.lang.UnsupportedOperationException: The Security Manager is deprecated
> and will be removed in a future release
>         at java.base/java.lang.System.setSecurityManager(System.java:416)
>         at
> org.apache.tools.ant.types.Permissions.setSecurityManager(Permissions.java:103)
>         at
> org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:216)
>         at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:155)
>         at org.apache.tools.ant.taskdefs.Java.run(Java.java:891)
>         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231)
>         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
>         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
>         at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:577)
>         at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>         at org.apache.tools.ant.Task.perform(Task.java:350)
>         at org.apache.tools.ant.Target.execute(Target.java:449)
>         at org.apache.tools.ant.Target.performTasks(Target.java:470)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
>         at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
>         at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:577)
>         at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>         at org.apache.tools.ant.Task.perform(Task.java:350)
>         at org.apache.tools.ant.Target.execute(Target.java:449)
>         at org.apache.tools.ant.Target.performTasks(Target.java:470)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
>         at org.apache.tools.ant.Main.runBuild(Main.java:818)
>         at org.apache.tools.ant.Main.startAnt(Main.java:223)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
>
> Total time: 0 seconds
>
> On Sat, Apr 9, 2022 at 4:25 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> There's probably some problem with my installation.
>>
>> $ ant create.X3DJSAIL
>> Buildfile: C:\x3d-code\www.web3d.org\x3d\stylesheets\build.xml
>>
>> create.X3DJSAIL:
>>      [echo] Build API for X3D Java Scene Authoring Interface Library
>> (X3DJSAIL) from X3D Unified Object Model (X3DUOM)
>>
>> versions:
>>      [echo]   ANT_HOME=${env.ANT_HOME}
>>      [echo]  JAVA_HOME=C:/openjdk-17.0.1_windows-x64_bin/jdk-17.0.1
>>      [echo] PYTHONHOME=${env.PYTHONHOME}
>>      [echo] PYTHONPATH=C:/x3d-code/www.web3d.org/x3d/stylesheets/python
>>      [echo] Check CLASSPATH for X3DJSAIL X3DJSAIL.4.0.full.jar or
>> X3DJSAIL.4.0.classes.jar
>>      [echo] CLASSPATH=${env.CLASSPATH}
>>      [echo] javac source/target      $java.source=16
>>      [echo]                          $java.target=16
>>      [echo] Java/JVM version    $ant.java.version=17
>>      [echo] Java/JVM detail version $java.version=17.0.1
>>      [echo] Saxon directory            $saxon.dir=C:\x3d-code\
>> www.web3d.org\x3d\stylesheets\java\lib
>>      [echo] Saxon jar                  $saxon.jar=saxon-he-11.2.jar
>>      [echo] Ant version              $ant.version=Apache Ant(TM) version
>> 1.10.12 compiled on October 13 2021
>>      [echo]
>>      [echo] ant -version
>>      [exec] Apache Ant(TM) version 1.10.12 compiled on October 13 2021
>>      [echo] java -version
>>      [exec] openjdk version "11.0.12" 2021-07-20
>>      [exec] OpenJDK Runtime Environment Microsoft-25199 (build 11.0.12+7)
>>      [exec] OpenJDK 64-Bit Server VM Microsoft-25199 (build 11.0.12+7,
>> mixed mode)
>>      [echo] python -version
>>      [exec] Python 3.10.2
>>      [echo] saxon -? help
>> WARNING: A terminally deprecated method in java.lang.System has been
>> called
>> WARNING: System::setSecurityManager has been called by
>> org.apache.tools.ant.types.Permissions
>> (file:/C:/apache-ant-1.10.12-bin/apache-ant-1.10.12/lib/ant.jar)
>> WARNING: Please consider reporting this to the maintainers of
>> org.apache.tools.ant.types.Permissions
>> WARNING: System::setSecurityManager will be removed in a future release
>>
>> BUILD FAILED
>> C:\x3d-code\www.web3d.org\x3d\stylesheets\build.xml:364: The following
>> error occurred while executing this line:
>> C:\x3d-code\www.web3d.org\x3d\stylesheets\build.xml:164:
>> java.lang.NoClassDefFoundError: org/xmlresolver/Resolver
>>         at
>> net.sf.saxon.lib.CatalogResourceResolver.<init>(CatalogResourceResolver.java:46)
>>         at net.sf.saxon.Configuration.init(Configuration.java:367)
>>         at net.sf.saxon.Configuration.<init>(Configuration.java:230)
>>         at
>> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>         at
>> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
>>         at
>> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>         at
>> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
>>         at
>> java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
>>         at
>> java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
>>         at java.base/java.lang.Class.newInstance(Class.java:645)
>>         at
>> net.sf.saxon.Configuration.newConfiguration(Configuration.java:246)
>>         at net.sf.saxon.s9api.Processor.<init>(Processor.java:69)
>>         at net.sf.saxon.Transform.doTransform(Transform.java:321)
>>         at net.sf.saxon.Transform.main(Transform.java:81)
>>         at
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>>         at
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
>>         at
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>>         at
>> org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:218)
>>         at
>> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:155)
>>         at org.apache.tools.ant.taskdefs.Java.run(Java.java:891)
>>         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231)
>>         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
>>         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
>>         at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
>>         at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown
>> Source)
>>         at
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>>         at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>>         at org.apache.tools.ant.Task.perform(Task.java:350)
>>         at org.apache.tools.ant.Target.execute(Target.java:449)
>>         at org.apache.tools.ant.Target.performTasks(Target.java:470)
>>         at
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
>>         at
>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
>>
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
>>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
>>         at
>> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
>>         at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
>>         at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown
>> Source)
>>         at
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>>         at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>>         at org.apache.tools.ant.Task.perform(Task.java:350)
>>         at org.apache.tools.ant.Target.execute(Target.java:449)
>>         at org.apache.tools.ant.Target.performTasks(Target.java:470)
>>         at
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
>>         at
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
>>         at org.apache.tools.ant.Main.runBuild(Main.java:818)
>>         at org.apache.tools.ant.Main.startAnt(Main.java:223)
>>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
>>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
>> Caused by: java.lang.ClassNotFoundException: org.xmlresolver.Resolver
>>         at
>> org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1402)
>>         at
>> org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1357)
>>         at
>> org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1118)
>>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
>>         ... 53 more
>>
>> Total time: 1 second
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220410/6ba41304/attachment-0001.html>


More information about the x3d-public mailing list