Hi Andy,

we have (unreliably) run into exceptions like the one below, and my suspicion 
is that the ARQ Query class is not meant to be re-used by multiple threads. 
Although each step in the Query is converted into a corresponding Algebra 
objects for execution, the Aggregators seem to be shared between multiple 
objects. Is this correct and do I need to create a new Query each time I want a 
QueryExecution? This would slow down things quite a lot, as we currently cache 
all Queries that were created from string representation. If this is the case, 
are there any ways to tell which particular queries are not thread-safe, e.g. 
all queries involving aggregations?

If I am totally off the mark, do you know what else could cause the exception 
below, only sometimes in multi-threading conditions?

Thank you,
Holger


com.hp.hpl.jena.sparql.ARQInternalErrorException: Null for accumulator
        at 
com.hp.hpl.jena.sparql.expr.aggregate.AggregatorBase.getValue(AggregatorBase.java:61)
        at 
com.hp.hpl.jena.sparql.engine.iterator.QueryIterGroup.calc(QueryIterGroup.java:121)
        at 
com.hp.hpl.jena.sparql.engine.iterator.QueryIterGroup.<init>(QueryIterGroup.java:32)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.execute(OpExecutor.java:413)
        at 
com.hp.hpl.jena.sparql.engine.main.ExecutionDispatch.visit(ExecutionDispatch.java:255)
        at com.hp.hpl.jena.sparql.algebra.op.OpGroup.visit(OpGroup.java:37)
        at 
com.hp.hpl.jena.sparql.engine.main.ExecutionDispatch.exec(ExecutionDispatch.java:33)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.executeOp(OpExecutor.java:107)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.execute(OpExecutor.java:441)
        at 
com.hp.hpl.jena.sparql.engine.main.ExecutionDispatch.visit(ExecutionDispatch.java:241)
        at com.hp.hpl.jena.sparql.algebra.op.OpExtend.visit(OpExtend.java:107)
        at 
com.hp.hpl.jena.sparql.engine.main.ExecutionDispatch.exec(ExecutionDispatch.java:33)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.executeOp(OpExecutor.java:107)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.execute(OpExecutor.java:393)
        at 
com.hp.hpl.jena.sparql.engine.main.ExecutionDispatch.visit(ExecutionDispatch.java:213)
        at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:34)
        at 
com.hp.hpl.jena.sparql.engine.main.ExecutionDispatch.exec(ExecutionDispatch.java:33)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.executeOp(OpExecutor.java:107)
        at 
com.hp.hpl.jena.sparql.engine.main.OpExecutor.execute(OpExecutor.java:80)
        at com.hp.hpl.jena.sparql.engine.main.QC.execute(QC.java:40)
        at 
com.hp.hpl.jena.sparql.engine.main.QueryEngineMain.eval(QueryEngineMain.java:52)
        at 
com.hp.hpl.jena.sparql.engine.QueryEngineBase.evaluate(QueryEngineBase.java:138)
        at 
com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase.java:109)
        at 
com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.java:97)
        at 
com.hp.hpl.jena.sparql.engine.main.QueryEngineMain$1.create(QueryEngineMain.java:91)
        at 
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:266)
        at 
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:243)
        at 
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExecutionBase.java:248)
        at 
com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecutionBase.java:94)
        at 
org.topbraid.spin.arq.SPINARQFunction.executeBody(SPINARQFunction.java:121)

Reply via email to