I wanted to bring to light an error I am receiving when running components-coreFatherExample unit test with my current JDK 17. This error occurs despite setting the target language to 8.
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:141)
at org.apache.jena.rdf.model.impl.ResourceImpl.<init>(ResourceImpl.java:87)
at org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:313)
at org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:92)
at org.apache.jena.vocabulary.XSD.<clinit>(XSD.java:183)
at Test.main(Test.java:40)
Caused by: java.lang.RuntimeException: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.invoke.MethodHandles$Lookup(java.lang.Class) accessible: module java.base does not "opens java.lang.invoke" to unnamed module @34123d65
at org.aksw.jena_sparql_api.mapper.proxy.MapperProxyUtils.createProxyFactory(MapperProxyUtils.java:1327)
at org.aksw.jena_sparql_api.mapper.proxy.JenaPluginUtils.createImplementation(JenaPluginUtils.java:194)
at org.aksw.jena_sparql_api.mapper.proxy.JenaPluginUtils.registerResourceClass(JenaPluginUtils.java:228)
at org.aksw.jena_sparql_api.mapper.proxy.JenaPluginUtils.registerResourceClasses(JenaPluginUtils.java:169)
at org.aksw.jena_sparql_api.mapper.proxy.JenaPluginUtils.registerResourceClasses(JenaPluginUtils.java:164)
at org.aksw.jena_sparql_api.core.plugin.JenaPluginJsaCore.init(JenaPluginJsaCore.java:21)
at org.aksw.jena_sparql_api.core.plugin.JenaPluginJsaCore.start(JenaPluginJsaCore.java:13)
at org.apache.jena.sys.JenaSystem.lambda$init$2(JenaSystem.java:117)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.apache.jena.sys.JenaSystem.forEach(JenaSystem.java:192)
at org.apache.jena.sys.JenaSystem.forEach(JenaSystem.java:169)
at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:115)
at org.apache.jena.graph.NodeFactory.<clinit>(NodeFactory.java:32)
... 6 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.invoke.MethodHandles$Lookup(java.lang.Class) accessible: module java.base does not "opens java.lang.invoke" to unnamed module @34123d65
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188)
at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181)
at org.aksw.jena_sparql_api.mapper.proxy.MapperProxyUtils.proxyDefaultMethod(MapperProxyUtils.java:1972)
at org.aksw.jena_sparql_api.mapper.proxy.MapperProxyUtils.createProxyFactory(MapperProxyUtils.java:1325)
... 18 more
Process finished with exit code 1
I did manage to find a simple workaround by modifying any calls to org.apache.jena.vocabulary.XSD.getURI() in the DL-Learner source code with the intended String literal value of "http://www.w3.org/2001/XMLSchema#".
I am unsure of whether this is an issue with the included Jena dependencies or if this indicative of a fundamental change in the way reflection can be used to access library functions outside of the scope of the main module being run in the latest JDK versions.
Hello,
I wanted to bring to light an error I am receiving when running
components-core
FatherExample
unit test with my current JDK 17. This error occurs despite setting the target language to 8.I did manage to find a simple workaround by modifying any calls to
org.apache.jena.vocabulary.XSD.getURI()
in the DL-Learner source code with the intended String literal value of "http://www.w3.org/2001/XMLSchema#".I am unsure of whether this is an issue with the included Jena dependencies or if this indicative of a fundamental change in the way reflection can be used to access library functions outside of the scope of the main module being run in the latest JDK versions.