problem with Java 21 and reflexive java extension functions in XSLT
Posted: Thu Jun 26, 2025 8:48 am
We are using Oxygen Developer 27.1 to develop an XSLT application.
This application uses a few reflexive java externsion functions, the respective compiled *.class files are put into the classpath of our transformation and in Oxygen 27.1 we use the "extensions" of the xslt-run-senario.
This all works perfectly fine when we compile our static java classes with target Java 17. Now our team wants to update the whole codebase to Java 21.
On the command line with saxon 12.5/12.6., with maven and in deployed state the app still works as expected with the compiled Java classes for Java 21
But in Oxygen 27.1 we get now errors when validating and transforming our xslt, the java functions are not found anymore (see below)
Is this a known restriction with Oxygen 27.1? is there workaround?
thanks
Reto
System-ID: C:\data\trafo\src\main\resources\xslt\util\log.xslt
Haupt-Validierungsdatei: C:\data\trafo\src\main\resources\xslt\util\log.xslt
Szenarioname: ETrafo XSLT [standalone]
Programmname: Saxon-EE 12.5
Fehlerlevel: fatal
Problem-ID: XPST0017
Beschreibung: Cannot find a 1-argument function named Q{java:ch.xxx.oms.trafo.util.LoggerUtil}logger(). Cannot load Java class java:ch.xxx.oms.trafo.util.LoggerUtil. For diagnostics on calls to Java methods, use the -TJ command line option or set the Configuration property FeatureKeys.TRACE_EXTERNAL_FUNCTIONS
Anfang: 24:27
Länge: 1
URL: http://www.w3.org/TR/xpath20/#ERRXPST0017
This application uses a few reflexive java externsion functions, the respective compiled *.class files are put into the classpath of our transformation and in Oxygen 27.1 we use the "extensions" of the xslt-run-senario.
This all works perfectly fine when we compile our static java classes with target Java 17. Now our team wants to update the whole codebase to Java 21.
On the command line with saxon 12.5/12.6., with maven and in deployed state the app still works as expected with the compiled Java classes for Java 21
But in Oxygen 27.1 we get now errors when validating and transforming our xslt, the java functions are not found anymore (see below)
Is this a known restriction with Oxygen 27.1? is there workaround?
thanks
Reto
System-ID: C:\data\trafo\src\main\resources\xslt\util\log.xslt
Haupt-Validierungsdatei: C:\data\trafo\src\main\resources\xslt\util\log.xslt
Szenarioname: ETrafo XSLT [standalone]
Programmname: Saxon-EE 12.5
Fehlerlevel: fatal
Problem-ID: XPST0017
Beschreibung: Cannot find a 1-argument function named Q{java:ch.xxx.oms.trafo.util.LoggerUtil}logger(). Cannot load Java class java:ch.xxx.oms.trafo.util.LoggerUtil. For diagnostics on calls to Java methods, use the -TJ command line option or set the Configuration property FeatureKeys.TRACE_EXTERNAL_FUNCTIONS
Anfang: 24:27
Länge: 1
URL: http://www.w3.org/TR/xpath20/#ERRXPST0017