Hi everyone,
 I'm tryng to use Joseki with SDB (on MySQL 5.1) for serving multithread 
application queries.
If all queries doesen't overlapp everything works well.
The problem comes wehn two different thread make concurrent queries that 
overlaps and I got this error:

======================= log Stacktrace =====================
2012-01-11 13:05:59 - log                       :: REQUEST /sparql on 
org.mortbay.jetty.HttpConnection@1181de1
2012-01-11 13:05:59 - log                       :: 
sessionManager=org.mortbay.jetty.servlet.HashSessionManager@f9f91d
2012-01-11 13:05:59 - log                       :: session=null
2012-01-11 13:05:59 - log                       :: servlet=SPARQL service 
processor
2012-01-11 13:05:59 - log                       :: chain=null
2012-01-11 13:05:59 - log                       :: servlet holder=SPARQL 
service processor
2012-01-11 13:05:59 - Servlet                   :: Request: 
http://localhost:2020/sparql
2012-01-11 13:05:59 - Servlet                   :: Service URI = <sparql>
2012-01-11 13:05:59 - SPARQL :: Query: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?resourceURI ?resourceType ?resourceLabel ?resourceComment WHERE { GRAPH <http://www.imonlinfo.it/ontologie/grafi/test/bps-all> { ?resourceURI rdfs:domain <http://www.imolinfo.it/ontologie/ea/v1.3/application-domain-model#Application> . ?resourceURI rdf:type ?resourceType OPTIONAL { ?resourceURI rdfs:label ?resourceLabel FILTER ( lang(?resourceLabel) = "en" ) } OPTIONAL { ?resourceURI rdfs:comment ?resourceComment FILTER ( lang(?resourceComment) = "en" ) } OPTIONAL { ?resourceURI rdfs:label ?resourceLabel FILTER ( lang(?resourceLabel) = "it" ) } OPTIONAL { ?resourceURI rdfs:comment ?resourceComment FILTER ( lang(?resourceComment) = "it" ) } OPTIONAL { ?resourceURI rdfs:label ?resourceLabel } OPTIONAL { ?resourceURI rdfs:comment ?resourceComment } } } 2012-01-11 13:05:59 - SPARQL :: OK/select: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?resourceURI ?resourceType ?resourceLabel ?resourceComment WHERE { GRAPH <http://www.imonlinfo.it/ontologie/grafi/test/bps-all> { ?resourceURI rdfs:domain <http://www.imolinfo.it/ontologie/ea/v1.3/application-domain-model#Application> . ?resourceURI rdf:type ?resourceType OPTIONAL { ?resourceURI rdfs:label ?resourceLabel FILTER ( lang(?resourceLabel) = "en" ) } OPTIONAL { ?resourceURI rdfs:comment ?resourceComment FILTER ( lang(?resourceComment) = "en" ) } OPTIONAL { ?resourceURI rdfs:label ?resourceLabel FILTER ( lang(?resourceLabel) = "it" ) } OPTIONAL { ?resourceURI rdfs:comment ?resourceComment FILTER ( lang(?resourceComment) = "it" ) } OPTIONAL { ?resourceURI rdfs:label ?resourceLabel } OPTIONAL { ?resourceURI rdfs:comment ?resourceComment } } }

2012-01-11 13:05:59 - log                       :: REQUEST /sparql on 
org.mortbay.jetty.HttpConnection@ddc728
2012-01-11 13:05:59 - log                       :: 
sessionManager=org.mortbay.jetty.servlet.HashSessionManager@f9f91d
2012-01-11 13:05:59 - log                       :: session=null
2012-01-11 13:05:59 - log                       :: servlet=SPARQL service 
processor
2012-01-11 13:05:59 - log                       :: chain=null
2012-01-11 13:05:59 - log                       :: servlet holder=SPARQL 
service processor
2012-01-11 13:05:59 - Servlet                   :: Request: 
http://localhost:2020/sparql
2012-01-11 13:05:59 - Servlet                   :: Service URI = <sparql>
2012-01-11 13:05:59 - TransactionHandlerSDB     :: beginTransaction: Already in 
a transaction
2012-01-11 13:05:59 - Servlet                   :: Internal server error
com.hp.hpl.jena.sdb.SDBException: Already in transaction
    at 
com.hp.hpl.jena.sdb.graph.TransactionHandlerSDB.begin(TransactionHandlerSDB.java:45)
    at com.hp.hpl.jena.rdf.model.impl.ModelCom.begin(ModelCom.java:1083)
    at org.joseki.processors.ProcessorBase.exec(ProcessorBase.java:80)
    at org.joseki.ServiceRequest.exec(ServiceRequest.java:36)
    at org.joseki.Dispatcher.dispatch(Dispatcher.java:59)
    at org.joseki.http.Servlet.doCommon(Servlet.java:178)
    at org.joseki.http.Servlet.doGet(Servlet.java:138)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    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.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
    at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:322)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at 
org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:164)
    at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
2012-01-11 13:05:59 - log                       :: RESPONSE /sparql  500
2012-01-11 13:05:59 - log                       :: RESPONSE /sparql  200
==========================================================================================

As you can see here I have the first REQUEST and the second one that come before RESPONSE of the first one. As a result The first ends correctly (RESPONSE /sparql 200) whereas the second one recieve a :: RESPONSE /sparql 500 (so that I get an Http 500 error: Internal Server Error:... from Joseki).

I already tried to configure "joseki:lockingPolicy" parameter but whatever value I specify (joseki:lockingPolicyMutex, joseki:lockingPolicyMRSW,joseki:lockingPolicyNone ) the result doesn't change. I also have tried to increase the the "joseki:poolSize" parameter but nothing.

What can I do to let Joseki manage correctly the concurrent queries trough SDB?

I'm working with:
- Joseki 3.4.4
- SDB-1.3.4
- Jena-2.6.4
- MySql 5.1

If it may be useful I can attach the joseki config file used.

Thanx in advance,
Matteo.

Reply via email to