File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes strange error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "strange error" Watch "strange error" New topic

strange error

Rema Remulta
Ranch Hand

Joined: Apr 03, 2002
Posts: 51
hi everyone,
Do you have some idea(s) why i'm having this strange error: concurrent modification exception when i connect the java app via jdbc to MySQL server ? Haven't encoutered this when such java app is connecting to MS Access db.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Are you sure this is a SQLException? I have only seen these happen while using the Collections classes:
from the docs on Collections
"They have fail-fast iterators, which throw a ConcurrentModificationException in response to concurrent modification of the the backing collection rather than behaving non-deterministically. The Collections class contains static factories called synchronization wrappers that may be used to add synchronization to any unsynchronized collection. All of the new implementations have fail-fast iterators, which detect illegal concurrent modification, and fail quickly and cleanly."
Cut and paste the actual Exception message and the line that is causing the exception, that could help us help you better.
Rema Remulta
Ranch Hand

Joined: Apr 03, 2002
Posts: 51
Here's the following that displays on tomcat:
2003-07-25 08:36:11 - Ctx( /payroll ): Exception in: R( /payroll + /dbase + null) - java.uti
at java.util.HashMap$HashIterator.nextEntry(
at java.util.HashMap$
at com.mysql.jdbc.Connection.closeAllOpenStatements(
at com.mysql.jdbc.Connection.close(
at payroll.servlets.PayrollDatabaseServlet.executeQuery(
at payroll.servlets.PayrollDatabaseServlet.executeRequest(PayrollDatabaseServlet.jav
at payroll.servlets.PayrollDatabaseServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.tomcat.core.ServletWrapper.doService(
at org.apache.tomcat.core.Handler.service(
at org.apache.tomcat.core.ServletWrapper.service(
at org.apache.tomcat.core.ContextManager.internalService(
at org.apache.tomcat.core.ContextManager.service(
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnec
at org.apache.tomcat.service.TcpWorkerThread.runIt(
at org.apache.tomcat.util.ThreadPool$
Tomcat: Jakarta-Tomcat-3.2.1
JSDK: Version 1.4.0_01
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
rema r.,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: strange error
jQuery in Action, 3rd edition