This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes org.apache.jasper.JasperException: java.util.ConcurrentModificationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "org.apache.jasper.JasperException: java.util.ConcurrentModificationException" Watch "org.apache.jasper.JasperException: java.util.ConcurrentModificationException" New topic
Author

org.apache.jasper.JasperException: java.util.ConcurrentModificationException

gaston lopez
Greenhorn

Joined: Nov 25, 2008
Posts: 9
Hi!. I have the next error and i don't know why.
Running on a web application of glassfish V2.1.1


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:418)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:873)
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:292)
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:268)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:329)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
ar.org.hospitalitaliano.negocio.DAO.Hibernation.doFilter(Hibernation.java:126)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

You'll have to give us more info that that!

What's the code causing the problem? (not all the code, just the code causing the problem).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
gaston lopez
Greenhorn

Joined: Nov 25, 2008
Posts: 9
thanks for respone.

I'm using struts and hibernate as framework of my app.

I have a class Hibernation that crate the factory of hibernate, etc, etc.... and implements Filter , so, I have a method doFilter:




On the red line get the error, but I don't know so much.
I know that the doFilter is executed after and before pass for a jsp, but I don't know by what jsp, It sounds like random, i dont know.
gaston lopez
Greenhorn

Joined: Nov 25, 2008
Posts: 9
May be help to resolve, but i have another error (sound random) in the same line:

(using glassfish on cluster)

Rajagopal Mani
Ranch Hand

Joined: Mar 24, 2011
Posts: 84

Generally java.util.ConcurrentModificationException will occur when one thread to modify a Collection while another thread is iterating over it. Please check your code with this viewpoint. Below approach can be considered.

[1] Copy the collection object to be modified
[2] Modify the collection object inside the synchronized block
 
jQuery in Action, 2nd edition
 
subject: org.apache.jasper.JasperException: java.util.ConcurrentModificationException
 
Similar Threads
connectio null problem
HELP with java.lang.NullPointerException on doFilter
Null Pointer Execption error when running application
HELP with java.lang.NullPointerException on doFilter
Error on RequestProcessor using cluster