medbioinf / pia

:books: :microscope: PIA - Protein Inference Algorithms
https://github.com/medbioinf/pia
Other
22 stars 9 forks source link

XML export error #150

Closed bittremieux closed 4 years ago

bittremieux commented 4 years ago

I get the following error when PIA tries to write its XML output:

[05-Dec-2019 14:00:56 - INFO] "Writing PIA XML file to /home/wout/Downloads/b10000_ZNF230.xml" (de.mpc.pia.intermediate.compiler.PIACompiler:918)
[05-Dec-2019 14:00:56 - INFO] "Stream open, writing PIA XML" (de.mpc.pia.intermediate.compiler.PIACompiler:942)
[05-Dec-2019 14:00:56 - ERROR] "JAXBException while writing XML file" (de.mpc.pia.intermediate.compiler.PIACompiler:989)
javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:241)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:455)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:652)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:599)
at de.mpc.pia.intermediate.compiler.PIACompiler.createMarshallerForPiaXML(PIACompiler.java:1007)
at de.mpc.pia.intermediate.compiler.PIACompiler.marshalToFormattedFragmentMarshaller(PIACompiler.java:1030)
at de.mpc.pia.intermediate.compiler.PIACompiler.writeOutJaxbFilesList(PIACompiler.java:1080)
at de.mpc.pia.intermediate.compiler.PIACompiler.writeOutXML(PIACompiler.java:961)
at de.mpc.pia.intermediate.compiler.PIACompiler.writeOutXML(PIACompiler.java:919)
at de.mpc.pia.intermediate.compiler.PIACompiler.writeOutXML(PIACompiler.java:932)
at de.mpc.pia.intermediate.compiler.PIACompiler.main(PIACompiler.java:1273)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:573)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:239)
... 10 more
[05-Dec-2019 14:00:56 - INFO] "Writing of PIA XML file finished." (de.mpc.pia.intermediate.compiler.PIACompiler:996)

Could this be due to an outdated version of JAXB that's not compatible with my Java version? For example, see https://github.com/eclipse-ee4j/jaxb-api/issues/78 and https://stackoverflow.com/a/43574427.

I'm using Java version 13.0.1, while the pom file seems to indicate a PRIDE version 1.0.22 of JAXB is used. Is this even the standard JAXB version number? If so, it seems a pretty old one and an update to JAXB version 2.4 seems useful to support current Java versions.

julianu commented 4 years ago

Yes, this is a JAXB incompatibility with new Java versions (new being >= 9). Did you download the latest version or tried directly the GitHub version? If the version, could you please try the GitHub version. I had this problem before and at least for some versions it is fixed, but not released yet.

bittremieux commented 4 years ago

This was with version 1.3.10, the latest release available on here.

Do you mean to build the jar from master instead?

julianu commented 4 years ago

I just figured out the JAXB dependency was only in my private branch up to now. A new release was just added which should contain a fix for this. Please let me know, whether this solves the issue.

bittremieux commented 4 years ago

Yes, the JAXB error is fixed for version 1.3.11. Thanks.