Hi Andy, here's the query that threw that exception:

BASE <http://thoughtwire.ca/ontology/2012/08/rvhs/>
PREFIX twehr: <http://thoughtwire.ca/ontology/ehr/2012/09/>
PREFIX schema: <http://schema.org/>
 CONSTRUCT {
<rvhsObservationsPersistence/addShiftObservation> twehr:Visit ?visit .
<rvhsObservationsPersistence/addShiftObservation> twehr:UpdateTime ?time .
}
WHERE {
?observation schema:DateTime ?time .
?observation twehr:ShiftReport ?shiftReport .
?shiftReport twehr:Visit ?visit .
{
SELECT ?observation ?time
WHERE {
?observation schema:DateTime ?time .
}
ORDER BY DESC(?time) LIMIT 1
}
}


Changing it to:

BASE <http://thoughtwire.ca/ontology/2012/08/rvhs/>
PREFIX twehr: <http://thoughtwire.ca/ontology/ehr/2012/09/>
PREFIX schema: <http://schema.org/>
 CONSTRUCT {
<rvhsObservationsPersistence/addShiftObservation> twehr:Visit ?visit .
<rvhsObservationsPersistence/addShiftObservation> twehr:UpdateTime ?time .
}
WHERE {
?observation schema:DateTime ?time .
?observation twehr:ShiftReport ?shiftReport .
?shiftReport twehr:Visit ?visit .
}
ORDER BY DESC(?time) LIMIT 1

did away with the error, though we aren't yet certain that it has the same
effect as the former (pretty sure, just not 100% certain.)

Thanks,
Vanessa


On Wed, Sep 18, 2013 at 6:56 AM, Andy Seaborne <[email protected]> wrote:

> Hi Vanessa,
>
> What is the query that cause this exception?
>
> (I will wildly guess it involves a LET)
>
>         Andy
>
>
> On 17/09/13 20:42, Vanessa Williams wrote:
>
>> Hello, we recently upgraded TDB from 0.9.4 to 0.10.1 because we needed a
>> nice fix in the latter. However now we are seeing errors such as these.
>>
>> ERROR 2013-09-17 19:21:05.026 -
>> com.hp.hpl.jena.sparql.engine.**iterator.**QueryIteratorCloseable -
>> QueryFatalException
>> com.hp.hpl.jena.sparql.**ARQInternalErrorException: Attempt to reassign
>> '?observation' from '<
>> http://thoughtwire.ca/**ontology/2012/08/rvhs/**shiftObservation_22<http://thoughtwire.ca/ontology/2012/08/rvhs/shiftObservation_22>>'
>> to '<
>> http://thoughtwire.ca/**ontology/2012/08/rvhs/**shiftObservation_22<http://thoughtwire.ca/ontology/2012/08/rvhs/shiftObservation_22>
>> >'
>> at
>> com.hp.hpl.jena.sparql.engine.**binding.BindingHashMap.**
>> checkAdd(BindingHashMap.java:**111)
>> at
>> com.hp.hpl.jena.sparql.engine.**binding.BindingHashMap.add(**
>> BindingHashMap.java:92)
>> at
>> com.hp.hpl.jena.sparql.engine.**binding.BindingFactory.**
>> materialize(BindingFactory.**java:60)
>> at
>> com.hp.hpl.jena.tdb.solver.**QueryEngineTDB$**
>> QueryIteratorMaterializeBindin**g.moveToNextBinding(**
>> QueryEngineTDB.java:136)
>> at
>> com.hp.hpl.jena.sparql.engine.**iterator.QueryIteratorBase.**
>> nextBinding(QueryIteratorBase.**java:154)
>> at
>> com.hp.hpl.jena.sparql.engine.**iterator.QueryIteratorWrapper.**
>> moveToNextBinding(**QueryIteratorWrapper.java:43)
>> at
>> com.hp.hpl.jena.sparql.engine.**iterator.QueryIteratorBase.**
>> nextBinding(QueryIteratorBase.**java:154)
>> at
>> com.hp.hpl.jena.sparql.engine.**iterator.QueryIteratorBase.**
>> next(QueryIteratorBase.java:**129)
>> at
>> com.hp.hpl.jena.sparql.engine.**iterator.QueryIteratorBase.**
>> next(QueryIteratorBase.java:**41)
>> at org.apache.jena.atlas.**iterator.Iter$5.hasNext(Iter.**java:335)
>> at
>> com.hp.hpl.jena.sparql.engine.**QueryExecutionBase.**execConstruct(**
>> QueryExecutionBase.java:228)
>> at
>> com.hp.hpl.jena.sparql.engine.**QueryExecutionBase.**execConstruct(**
>> QueryExecutionBase.java:204)
>>          <...snip>
>>
>> Can anyone shed any light on a possible cause? The error message is not
>> very informative. Note that the queries we're using haven't changed, and
>> neither has our code usage, only the TDB version has been altered.
>>
>> Thanks in advance for any advice,
>>
>> Vanessa
>>
>>
>

Reply via email to