I am using the cpp and hpp files from the C API in Saxon EE , I just compiled and ran these lines :
SaxonProcessor* processor = new SaxonProcessor(false);
Xslt30Processor* xslt = processor->newXslt30Processor();
It shows the error when I create a XSLT30Processor. Also I'm not using a license.
Ive Debugged it and the furthest I could get to before the it calls JNI methods is line 36 of Xslt30Processor.cpp :
Xslt30Processor::Xslt30Processor(SaxonProcessor * p, std::string curr) {
proc = p;
jitCompilation = false;
exception = nullptr;
/*
* Look for class.
*/
cppClass = lookForClass(SaxonProcessor::sxn_environ->env, \\ It fails here
"net/sf/saxon/option/cpp/Xslt30Processor");
jobject tempcppXT = createSaxonProcessor2(SaxonProcessor::sxn_environ->env, cppClass,
"(Lnet/sf/saxon/s9api/Processor;)V", proc->proc);
if(tempcppXT) {
cppXT = SaxonProcessor::sxn_environ->env->NewGlobalRef(tempcppXT);
SaxonProcessor::sxn_environ->env->DeleteLocalRef(tempcppXT);
} else {
createException("Error: Failed to create the Xslt30Processor internal object");
}
#ifdef DEBUG
jmethodID debugMID = SaxonProcessor::sxn_environ->env->GetStaticMethodID(cppClass, "setDebugMode", "(Z)V");
SaxonProcessor::sxn_environ->env->CallStaticVoidMethod(cppClass, debugMID, (jboolean)true);
#endif
if(cppXT == nullptr) {
createException();
}
if(!(proc->cwd.empty()) && curr.empty()){
cwdXT = proc->cwd;
} else if(!curr.empty()){
cwdXT = curr;
}
}
I figured it out , my cpp files werent including the files in the write order. I cant beleive it