How to prefer jar files packed in a plugin?

Post here questions and problems related to oXygen frameworks/document types.
Krille
Posts: 34
Joined: Thu Nov 12, 2020 12:24 pm

How to prefer jar files packed in a plugin?

Post by Krille »

Hi,

I'm currently developing XPath bindings for the ICU4J library by providing Saxon function extensions. The aim is to have ICU's normalization and transliteration power in XPath.

The bindings are also packed for use in Oxygen by providing a plugin. The call of a function from a transformation scenario works. However, the processing of the function fails; while it succeeds with a Saxon standalone setup.

Apparently, it's an interference problem with the ICU package that ships with Oxygen. I provoked an exception in the Saxon standalone
setup and in Oxygen, and I get different trace backs, that indicate, that different versions of ICU4J are in force.

Question: Is there a way to make Oxygen use the version of ICU4J that is packaged into the plugin, at least when using Saxon based
transformations?

I tried classLoaderType="preferReferencedResources" on the plugin element in the plugin.xml file; and also tried
scope="globalHighPriority" on the librariesFolder element. But that did not make it.

Code is currently here: https://github.com/lueck/icu-xpath-bindings

The tracebacks from the different setups are reported in issue 1.

Regards,
Christian
Krille
Posts: 34
Joined: Thu Nov 12, 2020 12:24 pm

Re: How to prefer jar files packed in a plugin?

Post by Krille »

Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to prefer jar files packed in a plugin?

Post by Radu »

Hi Christian,

It would have helped me to know what version of Oxygen you are using.
Let's assume you are using our latest Oxygen 25.0 version. The "globalHighPriority" flag no longer works with Oxygen 22.0 and newer so you can no longer specify in a plugin that you want your jar library to be added to the global class loader and have more importance than Oxygen's own libraries.
About the Icu4j library used by Oxygen 25.0 by default, it is located in "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/lib/icu4j-70.1.jar". Is it not enough for your extensions?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply