struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Dunphy (JIRA)" <>
Subject [jira] Created: (WW-3019) ConcurrentModificationException using s:iterator (intermittent)
Date Mon, 02 Mar 2009 20:10:45 GMT
ConcurrentModificationException using s:iterator (intermittent)

                 Key: WW-3019
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.1.6
         Environment: OS:
Linux  2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 19:33:52 EDT 2008 i686 i686 i386 GNU/Linux
Version = Sun Java System Application Server 9.1_02

            Reporter: Chris Dunphy
         Attachments: layout_wait.jsp, struts.xml, tiles.xml

I have an intermittent problem using the s:iterator tag with the waitAndExec interceptor.
 Here is the file that I am trying to insert into the tiles layout (viewrequest.jsp):
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:if test="empeRequest.messages.size() > 0">
	<div class="box" style="background-color: #CCCCCC">
	<h3><s:property value="empeRequest.description" /></h3>
		<s:iterator value="empeRequest.messages">
			<s:if test="status.toString() == 'NORMAL'">
				<li style="background-color: #CCFFCC"><s:property
					value="message" /></li>
			<s:elseif test="status.toString() == 'WARNING'">
				<li style="background-color: #FFFFCC"><s:property
					value="message" /></li>
			<s:elseif test="status.toString() == 'ERROR'">
				<li style="background-color: #FFBBBB"><s:property
					value="message" /></li>

This is the layout page I am including the above file in (waitlayout.jsp):
<%@ taglib uri="" prefix="tiles"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en">
		<meta http-equiv="refresh" content="5;url=<s:url includeParams="all" />" />
		<style type="text/css">@import url( css/empe.css );</style>
	<div class="force-scrollbar">&nbsp;</div>
	<div class="main">
		<div class="content">
			<tiles:insertAttribute name="body" />
			<tiles:insertAttribute name="viewRequest" />

This sometimes crashses with the following stack trace:
Caused by: java.util.ConcurrentModificationException
        at java.util.AbstractList$Itr.checkForComodification(
        at java.util.AbstractList$
        at org.apache.struts2.components.IteratorComponent.end(
        at org.apache.struts2.views.jsp.IteratorTag.doAfterBody(
        at org.apache.jsp.jsp.fragments.viewrequest_jsp._jspx_meth_s_iterator_0(
from :177)
        at org.apache.jsp.jsp.fragments.viewrequest_jsp._jspx_meth_s_if_0(
from :108)
        at org.apache.jsp.jsp.fragments.viewrequest_jsp._jspService( from
        at org.apache.jasper.runtime.HttpJspBase.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.jasper.servlet.JspServletWrapper.service(
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(
        at org.apache.jasper.servlet.JspServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.catalina.core.ApplicationFilterChain.servletService(
        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(
        at org.apache.catalina.core.ApplicationDispatcher.invoke(
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(
        at org.apache.catalina.core.ApplicationDispatcher.include(
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(
        at org.apache.jasper.runtime.PageContextImpl.include(
        at org.apache.tiles.jsp.context.JspTilesRequestContext.include(
        ... 112 more

This doesn't happen consistently, but every third or forth run, which is enough to cause problems
for users.  I don't suspect it is a tiles issue, but appears to be an issue with iterator
based on the stack trace.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message