Bug #5920
closedJava reflexive API fails to run, throws ClassNotFoundException for org.jdom2.Document
100%
Description
With Saxon 12 (EE) but not with Saxon 11 importing a module that references a Java method using reflection does not run but fails with the stack below. I've pared it down: simply having the reference to the Java methods seems to be enough.
Run as: java -cp saxon-ee-12.0.jar net.sf.saxon.Query -q:crash.xqy
xception in thread "main" java.lang.NoClassDefFoundError: org/jdom2/Document at net.sf.saxon.option.jdom2.JDOM2ObjectModel.isRecognizedNodeClass(JDOM2ObjectModel.java:159) at net.sf.saxon.option.jdom2.JDOM2ObjectModel.getPJConverter(JDOM2ObjectModel.java:104) at net.sf.saxon.expr.PJConverter.allocate(PJConverter.java:220) at com.saxonica.expr.JavaExtensionFunctionCall.typeCheck(JavaExtensionFunctionCall.java:228) at com.saxonica.config.JavaExtensionLibrary$UnresolvedExtensionFunctionCall.typeCheck(JavaExtensionLibrary.java:1164) at net.sf.saxon.expr.Operand.typeCheck(Operand.java:224) at net.sf.saxon.expr.flwor.FLWORExpression.lambda$typeCheck$1(FLWORExpression.java:178) at net.sf.saxon.expr.flwor.LetClause.processOperands(LetClause.java:133) at net.sf.saxon.expr.flwor.FLWORExpression.typeCheck(FLWORExpression.java:180) at net.sf.saxon.query.XQueryFunction.compile(XQueryFunction.java:423) at net.sf.saxon.query.XQueryFunctionLibrary.fixupGlobalFunctions(XQueryFunctionLibrary.java:423) at net.sf.saxon.query.QueryModule.fixupGlobalFunctions(QueryModule.java:1103) at net.sf.saxon.expr.instruct.Executable.fixupQueryModules(Executable.java:446) at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:175) at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:563) at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:625) at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:651) at net.sf.saxon.Query.compileQuery(Query.java:869) at net.sf.saxon.Query.doQuery(Query.java:330) at net.sf.saxon.Query.main(Query.java:106) Caused by: java.lang.ClassNotFoundException: org.jdom2.Document at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
Files
Please register to edit this issue