aspose file tools*
The moose likes JDBC 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
Bookmark "strange error" Watch "strange error" New topic
Author

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.
Jamie
Rema Remulta
Ranch Hand

Joined: Apr 03, 2002
Posts: 51
Hi,
Here's the following that displays on tomcat:
2003-07-25 08:36:11 - Ctx( /payroll ): Exception in: R( /payroll + /dbase + null) - java.uti
l.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 payroll.servlets.PayrollDatabaseServlet.executeQuery(PayrollDatabaseServlet.java:
238)
at payroll.servlets.PayrollDatabaseServlet.executeRequest(PayrollDatabaseServlet.jav
a:176)
at payroll.servlets.PayrollDatabaseServlet.service(PayrollDatabaseServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnec
tionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:536)
Tomcat: Jakarta-Tomcat-3.2.1
JSDK: Version 1.4.0_01
Dirk Schreckmann
Sheriff

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: http://aspose.com/file-tools
 
subject: strange error