Error trying to call https://www.saxonica.com/saxon-c/doc/html/saxonc.html#PyXPathProcessor-set_base_uri
Replies (2)
Please register to reply
Forums » Saxon/C Help and Discussions »
Added by Martin Honnen almost 5 years ago
Trying to use https://www.saxonica.com/saxon-c/doc/html/saxonc.html#PyXPathProcessor-set_base_uri from Python with Saxon/C 1.2.1 running with Saxon-HE 9.9.1.5C from Saxonica
I get an error: "Error: MyClassInDll.setBaseURI not found".
Thanks for reporting this error. I have reproduced the error, which I have added as a bug issue: #4410
Investigating.
Incorrect method signature used in the JNI.
The setBaseURI is a void method, but we have it as returning a boolean:
(jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "setBaseURI",
"(Ljava/lang/String;)Z");
Should be changed to:
(jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(cppClass, "setBaseURI",
"(Ljava/lang/String;)V");
The bug fix will be in the next maintenance release. In the meantime the simple fix can be applied in the XPathProcessor.cpp file.
Please register to reply