This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strange error

 
Rema Remulta
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic