net.sf.saxon.trans.XPathException when publishing to PDF

Post here questions and problems related to editing and publishing DITA content.
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

When trying to publish content to PDF, I get the following error:

Code: Select all

[ERROR] java.lang.SecurityException: class "net.sf.saxon.trans.XPathException"'s signer information does not match signer information of other classes in the same package
java.lang.SecurityException: class "net.sf.saxon.trans.XPathException"'s signer information does not match signer information of other classes in the same package
	at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1158)
	at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:902)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at ro.sync.exml.workspace.b.b.e.<init>(Unknown Source)
	at ro.sync.exml.workspace.b.b.g.<init>(Unknown Source)
	at ro.sync.xml.transformer.dita.remote.b.<init>(Unknown Source)
	at ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration.<init>(Unknown Source)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
	at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
	at java.base/java.lang.Class.newInstance(Class.java:645)
	at org.apache.xerces.parsers.ObjectFactory.newInstance(ObjectFactory.java:348)
	at org.apache.xerces.parsers.ObjectFactory.createObject(ObjectFactory.java:141)
	at org.apache.xerces.parsers.ObjectFactory.createObject(ObjectFactory.java:97)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
	at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:217)
	at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:174)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:247)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:182)
	at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
	at org.apache.tools.ant.Main.runBuild(Main.java:809)
	at org.apache.tools.ant.Main.startAnt(Main.java:223)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

BUILD FAILED
org.apache.xerces.parsers.ObjectFactory$ConfigurationError: Provider ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration could not be instantiated: java.lang.SecurityException: class "net.sf.saxon.trans.XPathException"'s signer information does not match signer information of other classes in the same package
	at org.apache.xerces.parsers.ObjectFactory.newInstance(ObjectFactory.java:356)
	at org.apache.xerces.parsers.ObjectFactory.createObject(ObjectFactory.java:141)
	at org.apache.xerces.parsers.ObjectFactory.createObject(ObjectFactory.java:97)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
	at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:217)
	at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:174)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:247)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:182)
	at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
	at org.apache.tools.ant.Main.runBuild(Main.java:809)
	at org.apache.tools.ant.Main.startAnt(Main.java:223)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

Total time: 1 second
org.apache.xerces.parsers.ObjectFactory$ConfigurationError: Provider ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration could not be instantiated: java.lang.SecurityException: class "net.sf.saxon.trans.XPathException"'s signer information does not match signer information of other classes in the same package
	at org.apache.xerces.parsers.ObjectFactory.newInstance(ObjectFactory.java:356)
	at org.apache.xerces.parsers.ObjectFactory.createObject(ObjectFactory.java:141)
	at org.apache.xerces.parsers.ObjectFactory.createObject(ObjectFactory.java:97)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
	at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:217)
	at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:174)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:247)
	at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:182)
	at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
	at org.apache.tools.ant.Main.runBuild(Main.java:809)
	at org.apache.tools.ant.Main.startAnt(Main.java:223)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Provider ro.sync.xml.transformer.dita.remote.RelaxDefaultsDITARemoteMapsParserConfiguration could not be instantiated: java.lang.SecurityException: class "net.sf.saxon.trans.XPathException"'s signer information does not match signer information of other classes in the same package
Tool: Oxygen XML Author
Version: 24.1
dita-ot: 3.3.2
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by Radu »

Hi Antony,

Did you make any changes to the DITA OT 3.3.2 folder? Maybe add extra libraries?
If not can you edit the transformation scenario you are using in Oxygen and look in the "Advanced" tab? Is the "Prefer using the dita command" checkbox checked (it should be checked by default)? If not, can you click the "LIbraries" button? Did you make any changes in the libraries list there?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I am using an existing dita-ot version with pre-installed custom plugins. Not sure if my team has added any libraries to it.
I checked the Advanced tab. The Prefer using the dita command option is not selected by default. I checked the LIbraries window as well. No custom libraries are listed on the window. The custom pdf plugin merely extends the default pdf plugin. It does not have any new .jar files added.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by Radu »

Hi Antony,

How about if you check the "Prefer using the dita command " checkbox and run the transformation scenario?
Other than that I don't know what's inside your custom DITA OT folder, if you use it directly from the command line does it work like that?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I did try using the "Prefer using the dita command "and running the scenario. Not working.
Interestingly, the plugin works with the default toolkit that comes with Oxygen xml. It also seems to work with the latest version (3.7.2) downloaded from the DITA OT site. Not sure what is causing the issue.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by Radu »

Hi Antony,

If you use that custom DITA OT directly from the command line does it work like that?
As I said I do not know what it contains inside it, if you want to share it with me, you can zip it, upload it to our tech support form along with some details about how to reproduce the problem and I can try to find some time to take a look:
https://www.oxygenxml.com/techSupport.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I will check with my team and try to upload it. Thank you, Radu.
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I downloaded a fresh copy of DITA OT 3.3. 2 and installed the custom pdf plugin. The problem still persists when I try to run the scenario pointing to the fresh copy of the dita ot.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by Radu »

Hi Antony,

I asked you two times about this:
If you use that custom DITA OT directly from the command line does it work like that?
Does it work from the command line, taking Oxygen out of the equation?
https://www.dita-ot.org/dev/topics/firs ... mmand.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I am able to build the output using commandline interface and dita-ot-3.3.2. It seems to be a problem when trying to use dita-ot-3.3.2 from an Oxygen transform scenario.
Steps to reproduce:
  • Create a custom pdf plugin that extends the default DITA Map PDF - based on XSL-FO.
    Download dita-ot-3.3.2 and install the custom pdf plugin.
    Edit the dita.dir parameter to point to the downloaded dita-ot-3.2.2.
    Set the transtype parameter to the custom pdf transtype.
    Make other necessary modifications and run the transform scenario.
Last edited by antonyterrence on Wed Jun 29, 2022 2:11 pm, edited 1 time in total.
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

My apology for missing that question. I tried building the output via commandline. Please see my previous reply.
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I downgraded Oxygen to version 24 from version 24.1 and the build seems to work with dita-ot 3.3.2. At least, I am not getting the error I mentioned.
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by Radu »

Hi Antony,

Here's what I tested on my side:
1) Download DITA OT 3.3.2 from here: https://github.com/dita-ot/dita-ot/releases/tag/3.3.2 and unzipped it
2) In Oxygen 24.1 in the Preferences->DITA page set the default DITA OT installation to be the DITA OT 3.3.2 folder.
3) With a small sample DITA Map use the default "DITA Map PDF - based on XSL-FO" transformation scenario for publishing.
4) The publishing does not show that "java.lang.SecurityException: class "net.sf.saxon.trans.XPathException"'s signer" fatal error that you get on your side.

From time to time we release minor bug fix versions of Oxygen 24.1: https://www.oxygenxml.com/build_history ... 2022062007
Can you re-download and re-install Oxygen 24.1, then try again? Maybe one of our minor bug fix releases caused this problem.

One thing we changed between Oxygen 24.0 and 24.1 was the Saxon XSLT processor libraries bundled with Oxygen from version 9 to version 10, so this is probably the cause for the fatal error on your side. But as you say that you did not change the Libraries list in the transformation scenario, I do not know exactly how this problem could occur.


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

I don't know the cause either. All of us in the team face the same problem using the custom pdf plugin with Oxygen 24.1 and dita-ot 3.3.2
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by Radu »

Hi Antony,

If you perform exactly the steps I gave above (download DITA OT 3.3.2 from the DITA OT web site, use default PDF transformation scenario) does that work for you?
Also can you look at the build ID of your Oxygen 24.1 installation? If you start Oxygen, in the main menu Help->About there is a build ID value. Our latest build is "2022062007", if you do not have it maybe you can re-download and re-install Oxygen 24.1 and try again.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
antonyterrence
Posts: 26
Joined: Thu Jun 02, 2022 1:39 pm

Re: net.sf.saxon.trans.XPathException when publishing to PDF

Post by antonyterrence »

Sorry, I didn't get a chance to try that. I will do that over my weekend and let you know.
Post Reply