DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Stefaan Van Cauwenberge
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store LDAP

Concurrentmodificationexception when running a query

Created: 22/Oct/12 03:48 PM   Updated: 26/Oct/12 05:18 PM   Resolved: 23/Oct/12 09:19 AM
Component/s: Queries
Affects Version/s: 3.1.0.release
Fix Version/s: 3.1.2

File Attachments: 1. File cfi.diff (1 kB)

Environment: Suse, Eclipse, eDirectory

Datastore: LDAP
Severity: Test/Acceptance

 Description  « Hide
When running a simple JDO query, an exception is thrown (ConcurrentModificationException).

Cause: afther the query (, the connection is closed. Before and after closing the connection, listeners are notified of this. The standard listener removes itself in the managedConnectionPostClose method (which is inside the loop).
Clone the list of listeners (eg to an array) and loop over this clone.


Sort Order: Ascending order - Click to sort in descending order
Stefaan Van Cauwenberge added a comment - 22/Oct/12 03:50 PM
Version used is 3.1.2, as downloaded from sourceForge.

Andy Jefferson added a comment - 22/Oct/12 05:55 PM
As all docs state, please provide a valid testcase that demonstrates something (using latest release).

Stefaan Van Cauwenberge added a comment - 22/Oct/12 09:01 PM
Diff file attached.

any query using


generated this exception. The patch just makes a copy of the listeners and loops over that copy. Listeners can then remove themselves as a listener.
For safty, this should also be done in the managedConnectionPreClose loop (not in the diff).

I used the latest version 3.1.2 (3.1.0 ldap is in that I believe).

I hope this helps cause reverse engineering your code is not that simple...


Andy Jefferson added a comment - 22/Oct/12 09:06 PM
So define *how* this is not fixed by using core-3.1.1 ? Providing a valid testcase would then define your problem rather than resorting to guesswork

Andy Jefferson added a comment - 23/Oct/12 09:19 AM
Reproduced on 3.1.x branch. Not present on SVN trunk.