You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Erik Antelman <ea...@gmail.com> on 2011/09/23 21:28:35 UTC

*Punchline for* Understanding ConcurrentModificationException()

 *OOPS* conditioned fingered GMAIL (Emacs Bindings not actually good for
GMAIL and ^X^S sends not saves.)

The upshot is that using the listStatements Iterator I get the CME
exception. (in
com.hp.hpl.jena.reasoner.rulesys.impl.LPTopGoalIterator.checkCME())
Yet when I have SPARQL iterate there is no problem.

What is the story with CME? Should I use what I believe ARQ does, which is
Graph.find?

What am I missing to understand?

Will statements I add pass through the RETE network for forward inference?


-- 
for(;;); /* eantelman@gmail.com */

Re: *Punchline for* Understanding ConcurrentModificationException()

Posted by Dave Reynolds <da...@gmail.com>.
On Fri, 2011-09-23 at 15:28 -0400, Erik Antelman wrote: 
> *OOPS* conditioned fingered GMAIL (Emacs Bindings not actually good for
> GMAIL and ^X^S sends not saves.)
> 
> The upshot is that using the listStatements Iterator I get the CME
> exception. (in
> com.hp.hpl.jena.reasoner.rulesys.impl.LPTopGoalIterator.checkCME())
> Yet when I have SPARQL iterate there is no problem.

Bizarre.

You should certainly be able to use listStatements on a model that you
are not modifying without getting a CME - inference or no inference. 

> What is the story with CME? Should I use what I believe ARQ does, which is
> Graph.find?

No need, listStatements is just a wrapper round Graph.find, if
Graph.find works then listStatements on the same graph will work. There
is no state in listStatements itself.

Can you construct a complete minimal example on your problem so we can
see exactly how you are constructing and accessing your model. The
smaller the example the easier it will be to help.

> Will statements I add pass through the RETE network for forward inference?

If you add statements to an InfModel using the normal route then yes. If
you add then "behind its back" by adding them to the base graph then you
need to call rebind() to force the base data to be reconsulted.

Dave