Closed namedgraph closed 8 years ago
java.util.ConcurrentModificationException: Due to closed iterator
org.apache.jena.reasoner.rulesys.impl.LPTopGoalIterator.checkClosed(LPTopGoalIterator.java:257)
org.apache.jena.reasoner.rulesys.impl.LPTopGoalIterator.moveForward(LPTopGoalIterator.java:93)
org.apache.jena.reasoner.rulesys.impl.LPTopGoalIterator.hasNext(LPTopGoalIterator.java:223)
org.apache.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
org.apache.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
org.apache.jena.util.iterator.FilterIterator.hasNext(FilterIterator.java:55)
org.apache.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
org.apache.jena.util.iterator.FilterIterator.hasNext(FilterIterator.java:55)
org.apache.jena.util.IteratorCollection.iteratorToList(IteratorCollection.java:63)
org.apache.jena.graph.GraphUtil.addIteratorWorker(GraphUtil.java:156)
org.apache.jena.graph.GraphUtil.addInto(GraphUtil.java:151)
org.apache.jena.rdf.model.impl.ModelCom.add(ModelCom.java:201)
org.graphity.processor.provider.OntologyProvider.getOntModel(OntologyProvider.java:255)
Fixed by cloning OntModel
in OntologyProvider
Under a higher load, concurrent access becomes an issue as
OntClassMatcher.matchTemplates()
throws anConcurrentModificationException
. SinceOntology
instance is reused (it is cached inOntDocumentManager
), the code accessing it should probably be synchronized.