[
https://issues.apache.org/jira/browse/STANBOL-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112642#comment-13112642
]
Olivier Grisel commented on STANBOL-330:
----------------------------------------
Querying the TextConstraint expression with "Richard M. Daley" triggers the
exception:
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException:
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException: Unable
execute Query on remote site http://dbpedia.org/sparql
at
org.apache.stanbol.entityhub.jersey.resource.ReferencedSiteRootResource.executeQuery(ReferencedSiteRootResource.java:340)
at
org.apache.stanbol.entityhub.jersey.resource.ReferencedSiteRootResource.queryEntities(ReferencedSiteRootResource.java:313)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1465)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1396)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by:
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException: Unable
execute Query on remote site http://dbpedia.org/sparql
at
org.apache.stanbol.entityhub.core.impl.ReferencedSiteImpl.find(ReferencedSiteImpl.java:389)
at
org.apache.stanbol.entityhub.jersey.resource.ReferencedSiteRootResource.executeQuery(ReferencedSiteRootResource.java:335)
... 42 more
Caused by: java.io.IOException: GET with Content:
Virtuoso 37000 Error XM028: Free-text expression, line 1: phrase consists of
noise words exclusively
in the following expression:
[ __enc "UTF-8" ] ("Richard" AND "M" AND "." AND "Daley")
SPARQL query:
define sql:big-data-const 0 define output:format "HTTP+TTL text/rdf+n3"
#output-format:text/rdf+n3
CONSTRUCT {
?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?v_1 .
?id <http://www.w3.org/2000/01/rdf-schema#label> ?v_2 .
<http://www.iks-project.eu/ontology/rick/query/QueryResultSet>
<http://www.iks-project.eu/ontology/rick/query/queryResult> ?id .
} WHERE {
{
SELECT ?id
WHERE {
?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://dbpedia.org/ontology/Person> .
?id <http://www.w3.org/2000/01/rdf-schema#label> ?v_2 .
?v_2 bif:contains '("Richard" AND "M" AND "." AND "Daley")' .
}
ORDER BY DESC ( <LONG::IRI_RANK> (?id) )
LIMIT 3
}
OPTIONAL { ?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?v_1 . }
OPTIONAL { ?id <http://www.w3.org/2000/01/rdf-schema#label> ?v_2 . }
}
at
org.apache.stanbol.entityhub.site.linkeddata.impl.SparqlEndpointUtils.sendSparqlRequest(SparqlEndpointUtils.java:65)
at
org.apache.stanbol.entityhub.site.linkeddata.impl.VirtuosoSearcher.find(VirtuosoSearcher.java:66)
at
org.apache.stanbol.entityhub.core.impl.ReferencedSiteImpl.find(ReferencedSiteImpl.java:387)
... 43 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for
URL:
http://dbpedia.org/sparql?query=CONSTRUCT+%7B+%0A++?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+?v_1+.%0A++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?v_2+.%0A++%3Chttp://www.iks-project.eu/ontology/rick/query/QueryResultSet%3E+%3Chttp://www.iks-project.eu/ontology/rick/query/queryResult%3E+?id+.+%0A%7D+WHERE+%7B+%0A++%7B+%0A++++SELECT+?id+%0A++++WHERE+%7B+%0A++++++?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+%3Chttp://dbpedia.org/ontology/Person%3E+.+%0A++++++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?v_2+.+%0A++++++++?v_2+bif:contains+'(%22Richard%22+AND+%22M%22+AND+%22.%22+AND+%22Daley%22)'+.+%0A++++%7D+%0A++++ORDER+BY+DESC+(+%3CLONG::IRI_RANK%3E+(?id)+)+%0A++++LIMIT+3+%0A++++++++%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+?v_1+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?v_2+.+%7D+%0A%7D+%0A&format=text/rdf%2Bn3
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
at
org.apache.stanbol.entityhub.site.linkeddata.impl.SparqlEndpointUtils.sendSparqlRequest(SparqlEndpointUtils.java:53)
... 45 more
Sep 22, 2011 5:06:10 PM com.sun.jersey.spi.container.ContainerResponse
logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException:
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException: Unable
execute Query on remote site http://dbpedia.org/sparql
at
org.apache.stanbol.entityhub.jersey.resource.ReferencedSiteRootResource.executeQuery(ReferencedSiteRootResource.java:340)
at
org.apache.stanbol.entityhub.jersey.resource.ReferencedSiteRootResource.queryEntities(ReferencedSiteRootResource.java:313)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1465)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1396)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by:
org.apache.stanbol.entityhub.servicesapi.site.ReferencedSiteException: Unable
execute Query on remote site http://dbpedia.org/sparql
at
org.apache.stanbol.entityhub.core.impl.ReferencedSiteImpl.find(ReferencedSiteImpl.java:389)
at
org.apache.stanbol.entityhub.jersey.resource.ReferencedSiteRootResource.executeQuery(ReferencedSiteRootResource.java:335)
... 42 more
> EnityHub query API can generate incorrect fulltext clause with Virtuoso
> searcher
> --------------------------------------------------------------------------------
>
> Key: STANBOL-330
> URL: https://issues.apache.org/jira/browse/STANBOL-330
> Project: Stanbol
> Issue Type: Bug
> Reporter: Olivier Grisel
>
> At the moment the fulltext expression is tokenized on the client side and the
> bif:contains clause contains a conjunction of single word phrase queries
> which can be invalid if one of the word is a stop word.
> Instead of tokenizing on the client size one should probably just do a basic
> fulltext search without explicit conjunction and phrase query operators.
> Detailed error message to be added in the first comment.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira