Encountering a NoClassDefFoundError when the system attempts to load and parse certain ontologies, e.g., the N-Triples version of the AGROVOC ontology (submission ID 16) hosted in AgroPortal.
The error occurs because we're running on Java 11 in production where the JAXB APIs were removed.
Full stack trace from local dev environment:
java.lang.NoClassDefFoundError: javax/xml/bind/annotation/adapters/HexBinaryAdapter
at org.eclipse.rdf4j.rio.helpers.AbstractRDFParser.createNode(AbstractRDFParser.java:479)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseNodeID(TurtleParser.java:1114)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseValue(TurtleParser.java:594)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseSubject(TurtleParser.java:429)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseTriples(TurtleParser.java:370)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseStatement(TurtleParser.java:239)
at org.eclipse.rdf4j.rio.turtle.TurtleParser.parse(TurtleParser.java:201)
at org.semanticweb.owlapi.rio.RioParserImpl.parseDocumentSource(RioParserImpl.java:229)
at org.semanticweb.owlapi.rio.RioParserImpl.parse(RioParserImpl.java:180)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:221)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1294)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1234)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1191)
at org.stanford.ncbo.oapiwrapper.OntologyParser.findMasterFile(OntologyParser.java:594)
at org.stanford.ncbo.oapiwrapper.OntologyParser.internalParse(OntologyParser.java:513)
at org.stanford.ncbo.oapiwrapper.OntologyParser.parse(OntologyParser.java:497)
Encountering a NoClassDefFoundError when the system attempts to load and parse certain ontologies, e.g., the N-Triples version of the AGROVOC ontology (submission ID 16) hosted in AgroPortal.
The error occurs because we're running on Java 11 in production where the JAXB APIs were removed.
Full stack trace from local dev environment: