jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • DisplayTag
  • DISPL-491

Display tag errors with ConcurrentModificationException in portlets with more than one parameter inside portlet

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.1.1
  • Fix Version/s: TBD
  • Component/s: Paging/Sorting
  • Labels:
    None
  • Application server:
    Weblogic 9.2

Description

I'm using display tag with custom paging and running inside a portlet. My paging requires a searchId to be set as well as the page id, and this works fine when using it outside the portlet.

When using it inside the portlet, the initial display is fine. After selecting a page however, display tag dies with a concurrent modification exception. I tracked this down to the section in TableTag.initHref(..) where it's removing the un-encoded parameters - I have exclude set to *.

Attached is an updated PortletHref which follows the same procedure as DefaultHref and only pass back copies of the parameter map. This resolves the issue for me - paging now works.
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    PortletHref.java
    26/Sep/07 8:38 AM
    16 kB
    Pat Leamon

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Oleksandr Maksymchuk added a comment - 12/Jan/12 3:23 PM
I've also hit the same issue in this code:

{code}
                Iterator paramsIterator = baseHref.getParameterMap().keySet().iterator();
                while (paramsIterator.hasNext())
                {
                    String key = (String) paramsIterator.next(); // EXCEPTION HERE

                    // don't remove parameters added by the table tag
                    if (!this.paramEncoder.isParameterEncoded(key))
                    {
                        baseHref.removeParameter(key);
                    }
                }
{code}

Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.displaytag.tags.TableTag.initHref(TableTag.java:1172)


Can it be resolved by just using remove method of iterator instead of using removeParameter?
Show
Oleksandr Maksymchuk added a comment - 12/Jan/12 3:23 PM I've also hit the same issue in this code: {code}                 Iterator paramsIterator = baseHref.getParameterMap().keySet().iterator();                 while (paramsIterator.hasNext())                 {                     String key = (String) paramsIterator.next(); // EXCEPTION HERE                     // don't remove parameters added by the table tag                     if (!this.paramEncoder.isParameterEncoded(key))                     {                         baseHref.removeParameter(key);                     }                 } {code} Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$KeyIterator.next(HashMap.java:828) at org.displaytag.tags.TableTag.initHref(TableTag.java:1172) Can it be resolved by just using remove method of iterator instead of using removeParameter?

People

  • Reporter:
    Pat Leamon
Vote (1)
Watch (1)

Dates

  • Created:
    26/Sep/07 8:38 AM
    Updated:
    12/Jan/12 3:23 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.