Timeouts don't work so looking for solution for that too.

So far other queries work, also ones taking more time than timeout, but this might be the most complex one.
And confirmed that this exception indeed occurs at timeout point.

On 13/06/2019 12:24, Andy Seaborne wrote:
You have timeouts working otherwise ?
(the previous email thread does not say)

Do other queries work?

    Andy

On 13/06/2019 10:11, Mikael Pesonen wrote:

Using regular dataset instead of textdataset didn't help, same exception occurs.

:text_dataset rdf:type     text:TextDataset ;
      text:dataset   :my_dataset ;
      text:index     <#indexLucene> ;
      .

# A TDB dataset used for RDF storage
:my_dataset rdf:type      tdb:DatasetTDB ;
      tdb:location "/home/text/tools/jena_data/" ;
      ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "1000" ] ;

#    tdb:unionDefaultGraph true ; # Optional
      .

<#service> rdf:type fuseki:Service ;
      fuseki:name                     "/ds" ;   # http://host:port/ds-ro
      fuseki:serviceQuery             "query" ;    # SPARQL query service       fuseki:serviceQuery             "sparql" ;   # SPARQL query service       fuseki:serviceUpdate            "update" ;   # SPARQL update service       fuseki:serviceUpload            "upload" ;   # Non-SPARQL upload service       fuseki:serviceReadWriteGraphStore "data" ;     # SPARQL Graph store protocol (read and write)
      fuseki:dataset           :my_dataset; #:text_dataset ;
      .


On 12/06/2019 17:02, Andy Seaborne wrote:
Does it work if the fuseki:dataset connects to the dataseet without text index :my_dataset?

On 12/06/2019 13:00, Mikael Pesonen wrote:

Tested with smaller data and it works even when query takes 60+ seconds (with 1 second timeout in config). I can provide you with the whole data, it's just collection of public RDF schemas.

On 12/06/2019 14:05, Andy Seaborne wrote:
The exception is the query timeout counter.

That worked for me when I tested the previous question.

The setup is complex.
Do you have complete, minimal example on a plain database? Or does that work always?

    Andy


On 11/06/2019 14:34, Mikael Pesonen wrote:

Hi,

following query causes exception every time it's executed. Exactly same query has worked before, but can't say which Jena version it was.

  [2019-06-11 13:02:51] Fuseki     WARN  [24] RC = 500 : null
java.lang.NullPointerException
         at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:301)          at org.apache.jena.fuseki.servlets.SPARQL_Query.executeBody(SPARQL_Query.java:250)          at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:230)          at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:266)          at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:155)          at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)          at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)          at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)          at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)          at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)          at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)          at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)          at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)          at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)          at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)          at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)          at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)          at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)          at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)          at org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:285)          at org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:248)          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)          at org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:285)          at org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:248)          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)          at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)          at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)          at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)          at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)          at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)          at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)          at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)          at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)          at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)          at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:690)          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
         at org.eclipse.jetty.server.Server.handle(Server.java:503)
         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)          at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)          at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)          at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)          at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)          at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)          at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)          at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:748)
[2019-06-11 13:02:51] Fuseki     INFO  [24] 500 Server Error (1.070 s)



SELECT DISTINCT ?p ?label ?range   ?property_type
(GROUP_CONCAT(DISTINCT ?comment_g; separator=" ") as ?comment)
WHERE  {
     GRAPH <http://resource.lingsoft.fi/rdf/schema_meta>
     {
         VALUES ?domain_property { rdfs:domain schema:domainIncludes }          VALUES ?general_domain { rdfs:Resource owl:Thing schema:Thing }          VALUES ?property_type { rdf:Property owl:DatatypeProperty owl:ObjectProperty owl:AnnotationProperty }          VALUES ?class { <http://purl.org/dc/terms/Agent> <http://xmlns.com/foaf/0.1/Agent> }
         ?class rdfs:subClassOf* ?top_class .
         { ?p ?domain_property ?top_class } UNION { ?p rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?top_class }

         UNION { ?p ?domain_property ?general_domain }

         UNION { ?p a ?property_type FILTER ( NOT EXISTS { ?p rdfs:domain ?d } && NOT EXISTS { ?p schema:domainIncludes ?d } && NOT EXISTS { ?p rdfs:subPropertyOf ?p2 . ?p2 rdfs:domain ?d FILTER (?d != rdfs:Resource && ?d != owl:Thing) } ) }          OPTIONAL { ?p rdfs:subPropertyOf* ?p2 . { ?p2 schema:rangeIncludes ?range } UNION { ?p2 rdfs:range ?range } }          OPTIONAL { ?p rdfs:label ?label FILTER(LANGMATCHES(LANG(?label), "en")) }
         OPTIONAL { ?p rdfs:label ?label FILTER(LANG(?label) = "") }
         OPTIONAL { ?p rdfs:label ?label }
         OPTIONAL { ?p rdfs:comment ?comment_g FILTER(LANGMATCHES(LANG(?comment_g), "en")) }          OPTIONAL { ?p rdfs:comment ?comment_g FILTER(LANG(?comment_g) = "") }
         OPTIONAL { ?p rdfs:comment ?comment_g }
         OPTIONAL { ?p skos:definition ?comment_g FILTER(LANGMATCHES(LANG(?comment_g), "en")) }          OPTIONAL { ?p skos:definition ?comment_g FILTER(LANG(?comment_g) = "") }
         OPTIONAL { ?p skos:definition ?comment_g }

         FILTER ( NOT EXISTS { ?p schema:supersededBy ?sp } && NOT EXISTS { ?p <http://www.w3.org/2003/06/sw-vocab-status/ns#term_status> "archaic" } && NOT EXISTS { ?p owl:deprecated "true"^^xsd:boolean } )
  }  }
  GROUP BY ?p ?label ?range ?property_type
  ORDER BY ASC(?label)



Jena Fuseki version 3.11

  /usr/bin/java -Dlog4j.configuration=file:/home/text/tools/apache-jena-fuseki-3.11.0/log4j.properties -Xmx5600M -jar fuseki-server.jar --update --port 3030 --config=config.ttl


config.ttl:

@prefix :<http://localhost/jena_example/#>  .
@prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:<http://jena.hpl.hp.com/2008/tdb#>  .
@prefix ja:<http://jena.hpl.hp.com/2005/11/Assembler#>  .
@prefix text:<http://jena.apache.org/text#>  .
@prefix skos:<http://www.w3.org/2004/02/skos/core#>
@prefix fuseki:<http://jena.apache.org/fuseki#>  .
@prefix lsrm:<https://resource.lingsoft.fi/ns/resource_meta#> .

[] rdf:type fuseki:Server ;
    ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "1000" ] ;
    .

## Example of a TDB dataset and text index
## Initialize TDB
[] ja:loadClass "org.apache.jena.tdb.TDB" .
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

## Initialize text query
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
# A TextDataset is a regular dataset with a text index.
text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
# Lucene index
text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .


## ---------------------------------------------------------------


:text_dataset rdf:type     text:TextDataset ;
      text:dataset   :my_dataset ;
      text:index     <#indexLucene> ;
      .

# A TDB dataset used for RDF storage
:my_dataset rdf:type      tdb:DatasetTDB ;
      tdb:location "/home/text/tools/jena_data/" ;
      ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "1000" ] ;

#    tdb:unionDefaultGraph true ; # Optional
      .

# Text index description
<#indexLucene> a text:TextIndexLucene ;
      text:directory <file:/home/text/tools/jena_text_index/> ;
      text:entityMap <#entMap> ;
      text:storeValues true ;
      text:analyzer [ a text:StandardAnalyzer ] ;
# these mess up language search. why?
#     text:queryAnalyzer [ a text:KeywordAnalyzer ] ;
#     text:queryParser text:AnalyzingQueryParser ;
      text:multilingualSupport true ;
   .

<#entMap> a text:EntityMap ;
      text:defaultField     "prefLabel" ;
      text:entityField      "uri" ;
      text:uidField         "uid" ;
      text:langField        "lang" ;
      text:graphField       "graph" ;
      text:map (
           [ text:field "prefLabel" ; text:predicate skos:prefLabel ]
           [ text:field "altLabel"  ; text:predicate skos:altLabel ]
           [ text:field "content"  ; text:predicate lsrm:content ]
           ) .

<#service> rdf:type fuseki:Service ;
      fuseki:name                     "/ds" ;   # http://host:port/ds-ro       fuseki:serviceQuery             "query" ;    # SPARQL query service       fuseki:serviceQuery             "sparql" ;   # SPARQL query service       fuseki:serviceUpdate            "update" ;   # SPARQL update service       fuseki:serviceUpload            "upload" ;   # Non-SPARQL upload service       fuseki:serviceReadWriteGraphStore "data" ;     # SPARQL Graph store protocol (read and write)
      fuseki:dataset           :text_dataset ;
      .




--
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's 
Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: [email protected]
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND

Reply via email to