Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot silently loses axioms for some ontologies #98

Closed
Tracked by #1093
cmungall opened this issue Sep 13, 2016 · 20 comments
Closed
Tracked by #1093

Robot silently loses axioms for some ontologies #98

cmungall opened this issue Sep 13, 2016 · 20 comments

Comments

@cmungall
Copy link
Contributor

test.owl:

<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/ro.owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://purl.obolibrary.org/obo/ro.owl"></owl:Ontology>

    <!-- dodgy URI -->
    <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#http://www.w3.org/2000/01/rdf-schema#seeAlso"/>

    <owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000050">
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part of</rdfs:label>
    </owl:ObjectProperty>
</rdf:RDF>
robot convert -i test.owl -o z.owl && cat z.owl
WARN  http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
WARN  entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
INFO  Notice: root element does not have an xml:base. Relative IRIs will be resolved against file:/Users/cjm/repos/porifera-ontology/src/ontology/test.owl
WARN  http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
WARN  entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl
<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/ro.owl#"
     xml:base="http://purl.obolibrary.org/obo/ro.owl"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://purl.obolibrary.org/obo/ro.owl"/>
</rdf:RDF>



<!-- Generated by the OWL API (version 0.0.1-SNAPSHOT) https://github.com/owlcs/owlapi -->

Note the OP is silently lost.

The root cause is presumably the strange URI for the AP. However, if this is invalid an error should be thrown. If it is not invalid then the OP should pass through.

There is a hint in the OWLAPI version. Why does it say OWL API (version 0.0.1-SNAPSHOT). The pom says to get 4.2.6

@cmungall
Copy link
Contributor Author

Note OWLTools (usig 4.2.6 of owlapi) has the expected behavior - ie OP is preserved

owltools test.owl -o z.owl && cat z.owl
...
   <!-- http://purl.obolibrary.org/obo/BFO_0000050 -->

    <owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000050">
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part of</rdfs:label>
    </owl:ObjectProperty>
...

cmungall added a commit to obophenotype/porifera-ontology that referenced this issue Sep 13, 2016
@jamesaoverton
Copy link
Member

It's probably picking up the ROBOT version, which is 0.0.1-SNAPSHOT.

The bug is weird.

@cmungall
Copy link
Contributor Author

I've never seen this before. It started when I upped version of the owlapi in #95

I have used this version of the owlapi elsewhere with no issues (this is what is used in the owltools export above, it signs it <!-- Generated by the OWL API (version 4.2.6) https://github.com/owlcs/owlapi -->)

However, perhaps somehow the act of upping the version changed things unexpectedly. I notice robot has exclusions for elk in the pom, owltools does not

clutching at straws...

@balhoff
Copy link
Contributor

balhoff commented Sep 14, 2016

If you run org.obolibrary.robot.CommandLineInterface directly within Eclipse, and pass the same arguments, the program works correctly. If you first run mvn package, and run the result on the command line, you see the weird behavior @cmungall reported.

@jamesaoverton
Copy link
Member

Thanks @balhoff! Sorry, but I can't help with the debugging this week.

@balhoff
Copy link
Contributor

balhoff commented Sep 14, 2016

I have a guess that it is some XML weirdness from some classes overwriting one another when the combined jar is made (if that makes sense...). I tried adding the one-jar plugin, which uses some custom class-loading magic, to the plugins section of robot-command/pom.xml:

<plugin>
    <groupId>com.jolira</groupId>
    <artifactId>onejar-maven-plugin</artifactId>
    <version>1.4.4</version>
    <executions>
        <execution>
            <configuration>
                <mainClass>org.obolibrary.robot.CommandLineInterface</mainClass>
                <onejarVersion>0.97</onejarVersion>
                <attachToBuild>true</attachToBuild>
            </configuration>
            <goals>
                <goal>one-jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>

If you run robot after replacing the jar with the "one-jar" version that is produced (in robot-command/target), you get the correct results. But it also prints all this:

JarClassLoader: Warning: Null manifest from input stream associated with: lib/javax.inject-1.jar
JarClassLoader: Warning: org/apache/commons/logging/impl/SimpleLog.class in lib/commons-logging-1.1.3.jar is hidden by lib/jcl-over-slf4j-1.7.6.jar (with different bytecode)
JarClassLoader: Warning: org/apache/commons/logging/impl/NoOpLog.class in lib/commons-logging-1.1.3.jar is hidden by lib/jcl-over-slf4j-1.7.6.jar (with different bytecode)
JarClassLoader: Warning: org/apache/commons/logging/impl/SimpleLog$1.class in lib/commons-logging-1.1.3.jar is hidden by lib/jcl-over-slf4j-1.7.6.jar (with different bytecode)
JarClassLoader: Warning: org/apache/commons/logging/LogConfigurationException.class in lib/commons-logging-1.1.3.jar is hidden by lib/jcl-over-slf4j-1.7.6.jar (with different bytecode)
JarClassLoader: Warning: org/apache/commons/logging/LogFactory.class in lib/commons-logging-1.1.3.jar is hidden by lib/jcl-over-slf4j-1.7.6.jar (with different bytecode)
JarClassLoader: Warning: org/apache/commons/logging/Log.class in lib/commons-logging-1.1.3.jar is hidden by lib/jcl-over-slf4j-1.7.6.jar (with different bytecode)
JarClassLoader: Warning: org/w3c/dom/UserDataHandler.class in lib/jaxen-1.1.4.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/EventFilter.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/FactoryConfigurationError.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/Location.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/StreamFilter.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLEventFactory.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLEventReader.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLEventWriter.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLInputFactory.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLOutputFactory.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLReporter.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLResolver.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLStreamConstants.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLStreamException.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLStreamReader.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/XMLStreamWriter.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/Attribute.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/Characters.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/Comment.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/DTD.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/EndDocument.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/EndElement.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/EntityDeclaration.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/EntityReference.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/Namespace.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/NotationDeclaration.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/ProcessingInstruction.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/StartDocument.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/StartElement.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/events/XMLEvent.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/util/EventReaderDelegate.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/util/StreamReaderDelegate.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/util/XMLEventAllocator.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: javax/xml/stream/util/XMLEventConsumer.class in lib/geronimo-stax-api_1.0_spec-1.0.1.jar is hidden by lib/xml-apis-1.4.01.jar (with different bytecode)
JarClassLoader: Warning: Null manifest from input stream associated with: lib/axiom-impl-1.2.14.jar
JarClassLoader: Warning: Null manifest from input stream associated with: lib/axiom-dom-1.2.14.jar

@cmungall
Copy link
Contributor Author

Thanks! I will experiment more with the pom when I get a chance. Another experiment would be to try making it more like the owltools pom (or conversely, making the owltools one more like robot until we replicate the issue).

Do we know which version of the owlapi the erroneous version is picking up? I have never seen the behavior in the various iterations of the owlapi, if it's picking up something on the master branch of owlapi we should report this.

@balhoff
Copy link
Contributor

balhoff commented Sep 14, 2016

If you revert to OWL API 4.2.4, the same pattern happens (failure in flattened jar, works in one-jar). But it is not a silent failure:

Parser: org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser@23f5b5dc
    Stack trace:
org.semanticweb.owlapi.rdf.rdfxml.parser.RDFParserException: [line=11:column=132] IRI 'http://www.geneontology.org/formats/oboInOwl#http://www.w3.org/2000/01/rdf-schema#seeAlso' cannot be resolved against current base IRI file:/Users/jbalhoff/Desktop/test.owl reason is: Illegal character in fragment at index 81: http://www.geneontology.org/formats/oboInOwl#http://www.w3.org/2000/01/rdf-schema#seeAlso        org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:76)
        uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:197)
        uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1061)
        uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1017)
        uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:967)
        uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:978)

If you make an entirely new pom.xml with only one dependency, owlapi-distribution, and one source file that just tries to load an RDF/XML ontology, same problem happens. So it is nothing to do with the rest of robot. Some kind of class problem when OWL API is flattened with its dependencies.

@balhoff
Copy link
Contributor

balhoff commented Sep 14, 2016

Okay I think I've got it. Inside the various jars are some metadata files within top-level META-INF folders. Inside these are services folders, with files named like org.openrdf.rio.RDFParserFactory, org.apache.commons.logging.LogFactory, etc. This is a part of Java I don't know very well. But different jars can provide implementations for the same services. So for org.openrdf.rio.RDFParserFactory these are being squashed by only one of the incoming files (the one from owlapi-distribution, which looks like:

org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
org.semanticweb.owlapi.rio.RioOWLXMLParserFactory
org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
org.semanticweb.owlapi.rio.RioOWLXMLParserFactory

If you edit the jar and append one more line to /META-INF/services/org.openrdf.rio.RDFParserFactory:

org.openrdf.rio.rdfxml.RDFXMLParserFactory

Then run, the program will execute correctly.

I think the answer may be to just switch to building the jar with the one-jar plugin, which avoids squashing all the jars together (it archives them separately inside the resulting jar, and then sets up a special class loader to access them correctly). This would also correct the problem of the OWL API version being printed correctly.

@jamesaoverton
Copy link
Member

Nice. I'm fine with one-jar if that's the fix.

On Sep 14, 2016, at 11:34, Jim Balhoff [email protected] wrote:

Okay I think I've got it. Inside the various jars are some metadata files within top-level META-INF folders. Inside these are services folders, with files named like org.openrdf.rio.RDFParserFactory, org.apache.commons.logging.LogFactory, etc. This is a part of Java I don't know very well. But different jars can provide implementations for the same services. So for org.openrdf.rio.RDFParserFactory these are being squashed by only one of the incoming files (the one from owlapi-distribution, which looks like:

org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
org.semanticweb.owlapi.rio.RioOWLXMLParserFactory
org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
org.semanticweb.owlapi.rio.RioOWLXMLParserFactory
If you edit the jar and append one more line to /META-INF/services/org.openrdf.rio.RDFParserFactory:

org.openrdf.rio.rdfxml.RDFXMLParserFactory

Then run, the program will execute correctly.

I think the answer may be to just switch to building the jar with the one-jar plugin, which avoids squashing all the jars together (it archives them separately inside the resulting jar, and then sets up a special class loader to access them correctly). This would also correct the problem of the OWL API version being printed correctly.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@cmungall
Copy link
Contributor Author

cmungall commented Oct 6, 2016

Not 100% sure how to do this - is this an easy PR?

@balhoff
Copy link
Contributor

balhoff commented Oct 6, 2016

Oh yeah I was meaning to get back to this. I'll submit a PR.

On Oct 6, 2016, at 7:05 PM, Chris Mungall [email protected] wrote:

Not 100% sure how to do this - is this an easy PR?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@jamesaoverton
Copy link
Member

Is there any way to avoid all the JarClassLoader warnings?

jamesaoverton added a commit that referenced this issue Nov 2, 2016
- add regression test for #98
- revert POM to pre-OneJar, then replace maven-assembly-plugin
  with maven-shade-plugin
@jamesaoverton
Copy link
Member

I spent most of my day trying to get rid of the OneJar warnings, and came up with #106.

OneJar is ancient and unmaintained. Despite various advice on the web, I couldn't suppress its 40 lines of warnings.

I dug in and tried to resolve the dependency conflict. It's almost certainly caused by a conflict between with geronimo-stax and xml-apis, where geronimo-stax is used by org.apache.ws.commons.axiom, which is used by HermiT. I tried excluding all this crap in the POM, and it reduced the number of OneJar warnings, but not completely.

The immediate fix is to change /META-INF/services/org.openrdf.rio.RDFParserFactory as @balhoff explains above. I tried just providing an alternative version of the file, but the build is non-deterministic, so half the time my version wins and the problem is fixed, and half the time the owlapi-distribution version wins.

Using maven-shade-plugin and it's ServicesResourceTransformer we can merge the various /META-INF/services/org.openrdf.rio.RDFParserFactory alternatives, resulting in something like:

org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
org.semanticweb.owlapi.rio.RioOWLXMLParserFactory
org.semanticweb.owlapi.rio.RioFunctionalSyntaxParserFactory
org.semanticweb.owlapi.rio.RioManchesterSyntaxParserFactory
org.semanticweb.owlapi.rio.RioOWLXMLParserFactory
org.openrdf.rio.binary.BinaryRDFParserFactory
org.openrdf.rio.n3.N3ParserFactory
org.openrdf.rio.nquads.NQuadsParserFactory
org.openrdf.rio.ntriples.NTriplesParserFactory
org.openrdf.rio.rdfjson.RDFJSONParserFactory
org.openrdf.rio.rdfxml.RDFXMLParserFactory
org.openrdf.rio.trix.TriXParserFactory
org.openrdf.rio.turtle.TurtleParserFactory
org.openrdf.rio.trig.TriGParserFactory
com.github.jsonldjava.sesame.SesameJSONLDParserFactory
org.semarglproject.sesame.rdf.rdfa.SesameRDFaParserFactory

This seems to work: No more OneJar, and no more warning lines. Maven Shade is maintained, at least, and I think they're accomplishing the same thing. Now that I see all the gory details of this problem and solution, worried about side-effects. This is Shades' build-time warning:

[WARNING] xml-apis-1.4.01.jar, geronimo-stax-api_1.0_spec-1.0.1.jar define 33 overlapping classes:
[WARNING]   - javax.xml.stream.XMLEventReader
[WARNING]   - javax.xml.stream.StreamFilter
[WARNING]   - javax.xml.stream.util.StreamReaderDelegate
[WARNING]   - javax.xml.stream.events.StartDocument
[WARNING]   - javax.xml.stream.EventFilter
[WARNING]   - javax.xml.stream.XMLEventWriter
[WARNING]   - javax.xml.stream.XMLStreamConstants
[WARNING]   - javax.xml.stream.events.EntityDeclaration
[WARNING]   - javax.xml.stream.events.ProcessingInstruction
[WARNING]   - javax.xml.stream.XMLInputFactory
[WARNING]   - 23 more...
[WARNING] xml-apis-1.4.01.jar, jaxen-1.1.4.jar define 1 overlapping classes:
[WARNING]   - org.w3c.dom.UserDataHandler
[WARNING] geronimo-activation_1.1_spec-1.1.jar, geronimo-javamail_1.4_spec-1.7.1.jar define 2 overlapping classes:
[WARNING]   - org.apache.geronimo.osgi.locator.ProviderLocator
[WARNING]   - org.apache.geronimo.osgi.locator.Activator
[WARNING] jcl-over-slf4j-1.7.6.jar, commons-logging-1.1.3.jar define 6 overlapping classes:
[WARNING]   - org.apache.commons.logging.impl.SimpleLog$1
[WARNING]   - org.apache.commons.logging.Log
[WARNING]   - org.apache.commons.logging.impl.SimpleLog
[WARNING]   - org.apache.commons.logging.LogConfigurationException
[WARNING]   - org.apache.commons.logging.impl.NoOpLog
[WARNING]   - org.apache.commons.logging.LogFactory
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/

Any opinions?

@jamesaoverton
Copy link
Member

Ok, I merged #106 which includes a regression test for this problem, so I'm closing this.

@balhoff
Copy link
Contributor

balhoff commented Nov 8, 2016

@jamesaoverton thanks for cleaning this up!

@matentzn
Copy link
Contributor

I have to reopen this one for a quick discussion, as the new OWLAPI does not seem to permit this IRI, see commit:

95ca0dc

In one of our integration tests. The Test simply fails, and Protege does not open it. Note this is not a big problem as this issue here is still "fixed" - in that it fails hard (not failed silently). Maybe instead of dropping the bad axiom we should make the test expect the failure?

Q to @jamesaoverton: Why did this not show up in our migration to 4.5.24? Because I tried opening the file in Protege (which is using 4.5.24) and it definitely does not open!

@matentzn matentzn reopened this Feb 16, 2023
@jamesaoverton
Copy link
Member

I can reproduce this: regression test passes in 4.5.24 and fails in 4.5.25. There were only two commits to OWLAPI, and I can't see how they would affect this: https://github.com/owlcs/owlapi/commits/version4.

In ROBOT 1.9.2 (with OWLAPI 4.5.24) the regression test is not actually working. When I run:

> java -jar robot-1.9.2.jar convert -i docs/examples/dropped_axiom.owl -o dropped_axiom.owl

I can see that the axiom is silently dropped from dropped_axiom.owl. The test is ineffective because the robot diff also silently ignores the axiom when it read the original file.

> java -jar robot-1.9.2.jar diff -l docs/examples/dropped_axiom.owl -r dropped_axiom.owl
Ontologies are identical

So the small changes in 4.5.25 are causing a hard fail, which is better than silently dropping axioms.

I guess I'm fine with removing the regression test, which wasn't actually working. ROBOT being more strict here may cause more pipeline failures. The error message you get is good, but since it's a parser error the message is buried with all the other attempted parsers. Sigh.

@matentzn
Copy link
Contributor

Thanks for checking. Its a great failure to have.. I will support people fixing this.

@jamesaoverton
Copy link
Member

I dropped this test in #1181 because OWLAPI seems to be taking care of it by throwing an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants