[xsl] Followup about Saxon-HE and Oracle Unified Directory (OUD) problem

Subject: [xsl] Followup about Saxon-HE and Oracle Unified Directory (OUD) problem
From: "ohaya ohaya@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Aug 2023 21:06:03 -0000
This is a followup to a topic I posted on SO about problems I've been having trying to use Saxon-HE with Oracle Unified Directory (OUD - Oracle's current LDAP offering).  

If you all recall, a while ago, I got help about getting an XSLT working to transform an XML files with a bunch of attributes in it.  At that time, we were using XSLT on a Broadcom API Gateway (formerly Layer 7), but they now want us to move that to using a plugin in Oracle's OUD product and the plugins are Java-based, and I would like to migrate the XSLT to Java now.

I hope that it is ok posting here in the mailing list - I just feel more comfortable, so if it is not ok, let me know.

OUD supports something called "OUD plugin".  Basically the problem is that apparently if I even just add Saxon-HE as a Maven dependency to the code for an OUD plugin, the OUD instance will fail to start.

Michael has posted some comment on my SO topic, but I am still a little puzzled about why just having Saxon-HE in the dependencies is causing the OUD instance itself to fail to start, and also how, or even "if" it is possible to get it to work?

FYI, before I ran into the problem with the Saxon-HE working with OUD, I did try some small tests using Saxon-HE with a test Java app:

// Example from http://www.java2s.com/Tutorials/Java/Java_XML/0200__Java_XSLT_Intro.htm
//
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
 
 
public class Main {
 
  public static void main(String args[]) throws Exception {
 
    System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
 
    StreamSource source = new StreamSource(args[0]);
    StreamSource stylesource = new StreamSource(args[1]);
 
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(stylesource);
 
    StreamResult result = new StreamResult(System.out);
    transformer.transform(source, result);
  }
}

Comparing the above and what Michael has said on SO, I am wondering if I added the Saxon-HE dependency back to the plugin code, but also added a line to plugin code like:

System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");

Would THAT eliminate the problem and allow the OUD instance to start AND the XSLT being used in the plugin to also work?

I guess I am not sure how "deep" the problem is inside OUD itself, i.e., is something inside OUD just calling TransformerFactory.newInstance(), even before it gets to my plugin code?

Thanks in advance, and please let me know if it ok posting about this here?

Jim

Current Thread