On 17 Jun 2014, at 09:18, Christian Schwaderer <email@example.com> wrote:I've now (almost) set up my XSLT 2 project and aside from the annoying crashes with the "JNI_CreateJavaVM() failed with result-5" errors* I'm quite content with Saxon/C, thinking this is the best Saxon integration for PHP programmers.I am still investigating this, but according to the Java SE Platfrom specification, JNI_CreateJavaVM can be invoked at most once in each separate process. This error means that we are invoking it more than once.
The way it works now:
- Create a jvm on the first new SaxonProcessor() for this php runtime (possibly within Apache)
- Close the jvm on MSHUTDOWN (end of this specific php runtime, not request) .
This way the same jvm should be used over multiple requests, and the jvm should be stopped when the webserver/worker is stopped.