exception thrown saving rdf/xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

exception thrown saving rdf/xml

Fragoso, Gilberto (NIH/NCI) [E]

Hi all,

 

We are converting a vocabulary to OWL2 and it loads fine in Protégé 4, but if we then try to save it to rdf/xml (or turtle) we get an exception.  This exception is not thrown if we save to owl/xml or functional syntax.  The top of the stack trace is:

 

IllegalArgumentException: Comparison method violates its general contract!

    java.util.TimSort.mergeHi(Unknown Source)

    java.util.TimSort.mergeAt(Unknown Source)

    java.util.TimSort.mergeForceCollapse(Unknown Source)

    java.util.TimSort.sort(Unknown Source)

    java.util.TimSort.sort(Unknown Source)

    java.util.Arrays.sort(Unknown Source)

    java.util.Collections.sort(Unknown Source)

    org.coode.owlapi.rdf.model.RDFGraph.getSortedTriplesForSubject(RDFGraph.java:127)

    org.coode.owlapi.rdf.rdfxml.RDFXMLRenderer.render(RDFXMLRenderer.java:199)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderEntity(RDFRendererBase.java:338)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderEntities(RDFRendererBase.java:330)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderClasses(RDFRendererBase.java:294)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderInOntologySignatureEntities(RDFRendererBase.java:278)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderOntologyComponents(RDFRendererBase.java:266)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.render(RDFRendererBase.java:251)

    org.coode.owlapi.rdf.rdfxml.RDFXMLOntologyStorer.storeOntology(RDFXMLOntologyStorer.java:92)

    org.semanticweb.owlapi.util.AbstractOWLOntologyStorer.storeOntology(AbstractOWLOntologyStorer.java:102)

    uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:1037)

 

Might be an issue with a comparator in the owl api (let me know if I should post this to the owl api list).  This is not crucial for us as we do not edit this particular vocabulary, we are just tweaking a conversion and evaluating the results in P4.  Please let me know if you’d like to examine the file and I can post it to an FTP site. 

 

Thanks,

Gilberto

 

 

 

 


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: exception thrown saving rdf/xml

Timothy Redmond

Hi Gilberto -

My current guess is that this is probably an OWL-api bug.  I think that I see the cause but I failed to replicate it so far.  I will try to look at it later and see if I can get more information.  (The java.util.TimSort class is a bit confusing there actually.  In this case Tim is not me and the class doesn't appear in the java javadoc.)

-Timothy

On 12/12/2013 12:33 PM, Fragoso, Gilberto (NIH/NCI) [E] wrote:

Hi all,

 

We are converting a vocabulary to OWL2 and it loads fine in Protégé 4, but if we then try to save it to rdf/xml (or turtle) we get an exception.  This exception is not thrown if we save to owl/xml or functional syntax.  The top of the stack trace is:

 

IllegalArgumentException: Comparison method violates its general contract!

    java.util.TimSort.mergeHi(Unknown Source)

    java.util.TimSort.mergeAt(Unknown Source)

    java.util.TimSort.mergeForceCollapse(Unknown Source)

    java.util.TimSort.sort(Unknown Source)

    java.util.TimSort.sort(Unknown Source)

    java.util.Arrays.sort(Unknown Source)

    java.util.Collections.sort(Unknown Source)

    org.coode.owlapi.rdf.model.RDFGraph.getSortedTriplesForSubject(RDFGraph.java:127)

    org.coode.owlapi.rdf.rdfxml.RDFXMLRenderer.render(RDFXMLRenderer.java:199)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderEntity(RDFRendererBase.java:338)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderEntities(RDFRendererBase.java:330)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderClasses(RDFRendererBase.java:294)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderInOntologySignatureEntities(RDFRendererBase.java:278)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderOntologyComponents(RDFRendererBase.java:266)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.render(RDFRendererBase.java:251)

    org.coode.owlapi.rdf.rdfxml.RDFXMLOntologyStorer.storeOntology(RDFXMLOntologyStorer.java:92)

    org.semanticweb.owlapi.util.AbstractOWLOntologyStorer.storeOntology(AbstractOWLOntologyStorer.java:102)

    uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:1037)

 

Might be an issue with a comparator in the owl api (let me know if I should post this to the owl api list).  This is not crucial for us as we do not edit this particular vocabulary, we are just tweaking a conversion and evaluating the results in P4.  Please let me know if you’d like to examine the file and I can post it to an FTP site. 

 

Thanks,

Gilberto

 

 

 

 



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: exception thrown saving rdf/xml

Timothy Redmond

While I am not sure of all the details - there is a partial fix for this problem in the latest OWL api.  I checked and this is fix is already in place in the latest Protege code on github, so the fix should show up in the next Protege release.  In the mean time, this problem only occurs with java 7 so java 6 is a temporary workaround.

-Timothy

On 12/13/2013 12:00 AM, Timothy Redmond wrote:

Hi Gilberto -

My current guess is that this is probably an OWL-api bug.  I think that I see the cause but I failed to replicate it so far.  I will try to look at it later and see if I can get more information.  (The java.util.TimSort class is a bit confusing there actually.  In this case Tim is not me and the class doesn't appear in the java javadoc.)

-Timothy

On 12/12/2013 12:33 PM, Fragoso, Gilberto (NIH/NCI) [E] wrote:

Hi all,

 

We are converting a vocabulary to OWL2 and it loads fine in Protégé 4, but if we then try to save it to rdf/xml (or turtle) we get an exception.  This exception is not thrown if we save to owl/xml or functional syntax.  The top of the stack trace is:

 

IllegalArgumentException: Comparison method violates its general contract!

    java.util.TimSort.mergeHi(Unknown Source)

    java.util.TimSort.mergeAt(Unknown Source)

    java.util.TimSort.mergeForceCollapse(Unknown Source)

    java.util.TimSort.sort(Unknown Source)

    java.util.TimSort.sort(Unknown Source)

    java.util.Arrays.sort(Unknown Source)

    java.util.Collections.sort(Unknown Source)

    org.coode.owlapi.rdf.model.RDFGraph.getSortedTriplesForSubject(RDFGraph.java:127)

    org.coode.owlapi.rdf.rdfxml.RDFXMLRenderer.render(RDFXMLRenderer.java:199)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderEntity(RDFRendererBase.java:338)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderEntities(RDFRendererBase.java:330)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderClasses(RDFRendererBase.java:294)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderInOntologySignatureEntities(RDFRendererBase.java:278)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.renderOntologyComponents(RDFRendererBase.java:266)

    org.coode.owlapi.rdf.renderer.RDFRendererBase.render(RDFRendererBase.java:251)

    org.coode.owlapi.rdf.rdfxml.RDFXMLOntologyStorer.storeOntology(RDFXMLOntologyStorer.java:92)

    org.semanticweb.owlapi.util.AbstractOWLOntologyStorer.storeOntology(AbstractOWLOntologyStorer.java:102)

    uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:1037)

 

Might be an issue with a comparator in the owl api (let me know if I should post this to the owl api list).  This is not crucial for us as we do not edit this particular vocabulary, we are just tweaking a conversion and evaluating the results in P4.  Please let me know if you’d like to examine the file and I can post it to an FTP site. 

 

Thanks,

Gilberto

 

 

 

 



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback



_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback