Sure. I just simplified the full stack trace, for the reader's sake:

Failed to execute query "SELECT rec FROM com.testapp.model.TestRecord... ".
Check the query syntax for correctness. See nested exception for details.
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
        at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
        at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:286)
        at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302)
...
Caused by: java.util.ConcurrentModificationException
        at java.util.LinkedList$LinkIterator.next(LinkedList.java:119)
        at
org.apache.openjpa.jdbc.kernel.exps.PCPath.getPCPathString(PCPath.java:260)
        at
org.apache.openjpa.jdbc.kernel.exps.ContainsExpression.initialize(ContainsExpression.java:44)
        at
org.apache.openjpa.jdbc.kernel.exps.AndExpression.initialize(AndExpression.java:47)
        at
org.apache.openjpa.jdbc.kernel.exps.AndExpression.initialize(AndExpression.java:48)
        at
org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.initialize(SelectConstructor.java:232)
        at
org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.newSelect(SelectConstructor.java:173)
        at
org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:87)
       
        at
org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:360)
        at
org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
        at
org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:783)
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
        ... 96 more

In terms of syntax, the JPQL query is correct. 
We run our regression every day in a list of machines and we stumbled upon
that concurrent modification error once, in one machine, so the error seems
to be related to some seldom timing of threads. Therefore, only enabling the
openjpa.Mulithreaded property is not enough for me to tell whether the
problem is gone. I'll have look at our code and look for holes in our
control to ensure EntityManagers are not shared accross threads

Thanks



--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Supposed-concurrent-access-issue-to-PCPath-instance-tp7585102p7585117.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Reply via email to