Project

Profile

Help

Error trying to call https://www.saxonica.com/saxon-c/doc/html/saxonc.html#PyXPathProcessor-set_base_uri

Added by Martin Honnen over 4 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".


Replies (2)

RE: Error trying to call https://www.saxonica.com/saxon-c/doc/html/saxonc.html#PyXPathProcessor-set_base_uri - Added by O'Neil Delpratt over 4 years ago

Thanks for reporting this error. I have reproduced the error, which I have added as a bug issue: #4410

Investigating.

RE: Error trying to call https://www.saxonica.com/saxon-c/doc/html/saxonc.html#PyXPathProcessor-set_base_uri - Added by O'Neil Delpratt over 4 years ago

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.

    (1-2/2)

    Please register to reply