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

tolog "reifies" predicate returns error on finding refiers of a topic #254

Closed
GoogleCodeExporter opened this issue Mar 16, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Mar 16, 2015

What steps will reproduce the problem?
1. Did the following tolog: "select $R from reifies($R,$T),
subject-identifier($T,"identifierstring")?


What is the expected output? What do you see instead?
Expected outoput as a list of reifier topics, got

"net.ontopia.topicmaps.impl.rdbms.Topic cannot be cast to
net.ontopia.topicmaps.core.ReifiableIF"

Please use labels and text to provide additional information.

Stack trace:

Stack Trace of root cause is:
java.lang.ClassCastException: net.ontopia.topicmaps.impl.rdbms.Topic cannot
be cast to net.ontopia.topicmaps.core.ReifiableIF
    at
net.ontopia.topicmaps.query.impl.basic.PredicateUtils.objectToOne(PredicateUtils
.java:141)
    at
net.ontopia.topicmaps.query.impl.basic.ReifiesPredicate.satisfy(ReifiesPredicate
.java:53)
    at
net.ontopia.topicmaps.query.impl.basic.AbstractQueryProcessor.satisfy(AbstractQu
eryProcessor.java:114)
    at
net.ontopia.topicmaps.query.impl.basic.QueryProcessor.execute(QueryProcessor.jav
a:169)
    at
net.ontopia.topicmaps.query.impl.basic.QueryProcessor.execute(QueryProcessor.jav
a:150)
    at
net.ontopia.topicmaps.query.impl.basic.ParsedQuery.execute(ParsedQuery.java:61)
    at org.apache.jsp.plugins.query.query_jsp._jspService(query_jsp.java:213)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:188)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
13)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
72)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108
)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConne
ction(Http11BaseProtocol.java:665)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:52
8)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorker
Thread.java:81)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:68
9)
    at java.lang.Thread.run(Thread.java:637)

Original issue reported on code.google.com by rolf.gue...@gmail.com on 2 Jun 2010 at 2:07

@GoogleCodeExporter
Copy link
Author

GoogleCodeExporter commented Mar 16, 2015

The problem is that $T (which contains) is used as the second parameter to 
reifies(), 
which expects the reified objects there (ReifiableIF). Since the second 
parameter is 
declared to accept all TMObjectIFs ("x"), the processor crashes.

Revision 1074 fixes this by adding a test case and correcting the declared 
types. The 
query now produces a meaningful error message instead of crashing.

Original comment by lar...@gmail.com on 2 Jun 2010 at 2:10

  • Changed state: Fixed
  • Added labels: Component-Tolog

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

No branches or pull requests

1 participant