Hi Chris,
it was a bug - the updated distribution (there was typo in the link from the
previous mail to the list)
http://www.ontotext.com/owlim/v3.0.a/owlim-beta5-sesame-2.0.zip
contain also a fix for this issue
regards,
Damyan
- Original Message -
From: Chris Halaschek [EMAIL PROTECTED]
To: owlim-discussion@ontotext.com
Sent: Wednesday, April 09, 2008 10:59 PM
Subject: [OWLIM-discussion] Class cast exception in OWLIM 3.0
Hi,
I seem to get a class cast exception when browsing my OWLIM KB via the
Sesame Workbench web app. Currently, my configuration is as follows:
- OWLIM 3.0 Beta 4
- Sesame 2.0
- Tomcat 6
The exception shows up in the OWLIM and Tomcat logs when I browse to
various object properties in the KB. I've also tried to issue SPARQL
queries for triples involving the object properties in the KB that
cause the exception when browsed to in the Workbench web app and no
results are returned even though the original OWL ontology contains
various assertions involving these properties (clearly, at minimum
there should be basic rdf type and subproperty assertions).
I looked into our ontology (which is perfectly valid RDF) and was able
to isolate the problem to what appears to be interactions between
inverse and symmetric properties. Perhaps this is causing a problem
when loading the KB into OWLIM (note however, that I do not see any
errors related to this in the log files).
Below is a trivial ontology that causes the issue. Clearly, one can
remove the inverse property assertion for
'http://example.com#sampleInverseProperty' on itself, however this
should still be valid RDF and not cause problems for OWLIM (at least
that's my understanding). Interestingly, if this assertion is removed,
then the problem is resolved.
?xml version=1.0?
!DOCTYPE rdf:RDF [
!ENTITY owl http://www.w3.org/2002/07/owl#;
!ENTITY rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#;
]
rdf:RDF xmlns=http://example.com#;
xml:base=http://example.com#;
xmlns:owl=http://www.w3.org/2002/07/owl#;
xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
owl:Ontology rdf:about=/
owl:ObjectProperty rdf:about=#sampleProperty
owl:inverseOf rdf:resource=#sampleInverseProperty/
/owl:ObjectProperty
owl:ObjectProperty rdf:about=#sampleInverseProperty
rdf:type rdf:resource=owl;SymmetricProperty/
owl:inverseOf rdf:resource=#sampleInverseProperty/
/owl:ObjectProperty
/rdf:RDF
Additionally, here is the actual exception thrown when browsing to the
property 'http://example.com#sampleInverseProperty':
Exeception:
-
org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is java.lang.ClassCastException:
org.openrdf.model.impl.URIImpl cannot be cast to
org.openrdf.model.Literal
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:472)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:415)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.ClassCastException: org.openrdf.model.impl.URIImpl cannot be
cast to org.openrdf.model.Literal
com.ontotext.trree.owlim_ext.CustomLiteralImpl.getLabel(Unknown Source)
org.openrdf.rio.turtle.TurtleWriter.writeLiteral(TurtleWriter.java:355)
org.openrdf.rio.turtle.TurtleWriter.writeValue(TurtleWriter.java:302)
org.openrdf.rio.turtle.TurtleWriter.handleStatement(TurtleWriter.java:230)
org.openrdf.rio.trig.TriGWriter.handleStatement(TriGWriter.java:129)
org.openrdf.repository.sail.SailRepositoryConnection.exportStatements(SailRepositoryConnection.java:209)
org.openrdf.http.server.repository.statements.ExportStatementsView.render(ExportStatementsView.java:99)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1123)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:860)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:774)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:460)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:415)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Any help you can offer would be greatly appreciated.
Best,
Chris
--
Christian Halaschek-Wiener, Ph.D.
Web page: http://www.mindswap.org/~chris
___
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion_ontotext.com
___
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion_ontotext.com