Closed ghsnd closed 9 years ago
fixed, can you check please?
I get another exception now (tested with 2 and more threads):
ERROR 2015-08-27 10:32:13,896 [http-nio-8080-exec-1] eu.freme.broker.eservices.ELink -
java.lang.ArrayIndexOutOfBoundsException: -3
at com.hp.hpl.jena.mem.HashedTripleBunch.add(HashedTripleBunch.java:76)
at com.hp.hpl.jena.mem.NodeToTriplesMapMem.add(NodeToTriplesMapMem.java:51)
at com.hp.hpl.jena.mem.GraphTripleStoreBase.add(GraphTripleStoreBase.java:63)
at com.hp.hpl.jena.mem.GraphMem.performAdd(GraphMem.java:37)
at com.hp.hpl.jena.graph.impl.GraphBase.add(GraphBase.java:202)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.add(ModelCom.java:1159)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.add(ModelCom.java:161)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.add(ModelCom.java:149)
at eu.freme.eservices.elink.TemplateDAO.addTemplate(TemplateDAO.java:213)
at eu.freme.broker.eservices.ELink.createTemplate(ELink.java:288)
had READ lock instead of WRITE lock, not it should be fixed. please check.
Now I get
java.util.ConcurrentModificationException
at com.hp.hpl.jena.mem.HashCommon$BasicKeyIterator.hasNext(HashCommon.java:349)
at com.hp.hpl.jena.util.iterator.NiceIterator$1.hasNext(NiceIterator.java:103)
at com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
at com.hp.hpl.jena.util.iterator.FilterIterator.hasNext(FilterIterator.java:54)
at com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
at com.hp.hpl.jena.util.iterator.Map1Iterator.hasNext(Map1Iterator.java:48)
at com.hp.hpl.jena.util.iterator.WrappedIterator.hasNext(WrappedIterator.java:90)
at eu.freme.eservices.elink.TemplateDAO.generateTemplateId(TemplateDAO.java:327)
at eu.freme.broker.eservices.ELink.createTemplate(ELink.java:249)
can you please check again? IMO should be fixed
It is fixed, thanks. Probably my maven repo was not updated. Cleared it manually, problem solved.
When creating templates in parallel, some
java.util.ConcurrentModificationException
s occur. Here's the beginning of the stack trace:So this points to the Jena model not being thread safe; here is some documentation at the Jena website on how to avoid this.