Bug #4542 Exception while closing a jdbc connection.
Submitted: 14 Jul 2004 6:29 Modified: 15 Jul 2004 17:29
Reporter: Suavi Demir Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:4.0.x? OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[14 Jul 2004 6:29] Suavi Demir
Description:
mysql-connector-java-3.1.0-alpha-bin.jar:

java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:762)
	at java.util.HashMap$KeyIterator.next(HashMap.java:798)
	at com.mysql.jdbc.Connection.closeAllOpenStatements(Connection.java:2538)
	at com.mysql.jdbc.Connection.close(Connection.java:1067)
	at org.dbforms.devgui.XMLConfigGenerator.createXMLOutput(XMLConfigGenerator.java:877)
	at org.dbforms.devgui.ConfigFilePanel.actionPerformed(ConfigFilePanel.java:849)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
	at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)

How to repeat:
Use this jdbc driver with 4.x mysql with db-forms GUI tool. When you press Generate XML button, this will happen. I guess visual inspection of your close connection method will indicate that you are attempting to iterate over a container and modify it from some other iterator at the same time. Just a guess.
Regards,
Ali
[15 Jul 2004 17:29] Mark Matthews
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.
[15 Jul 2004 17:30] Mark Matthews
This was fixed quite some time ago in Connector/J 3.1.1 (3.1.3 is the current release).