Quantcast

Grails 2.0.1 Released

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Grails 2.0.1 Released

Graeme Rocher
Administrator
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy

--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

rosenfeld
Em 14-02-2012 15:05, Graeme Rocher escreveu:

> Hi all,
>
> We're pleased to announce the release of Grails 2.0.1. Further
> information below:
>
> Release Notes: http://grails.org/2.0.1+Release+Notes
> Download: http://grails.org/Download
>
> This release contains around 80 bug fixes and improvements since
> Grails 2.0 was released, hopefully improving the ability for folks to
> upgrade from 1.x
>

Thanks for releasing it today, Graeme! Much appreciated :)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

Matthias Hryniszak
Just downloaded and tested :) Thanks guys for the hard work you're doing!

Matthias

2012/2/14 Rodrigo Rosenfeld Rosas <[hidden email]>
Em 14-02-2012 15:05, Graeme Rocher escreveu:

Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x


Thanks for releasing it today, Graeme! Much appreciated :)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
In reply to this post by Graeme Rocher
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources
plugin.

It doesn't happen for all records sent to the view, but only a few of
them... Have no idea why it is happening and I can't create an example
application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR
errors.GrailsExceptionResolver  - ConcurrentModificationException
occurred when processing request: [GET] /myapp/mycontroller/view -
parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag
<g:render>: Error executing tag <r:script>:
java.util.ConcurrentModificationException
    Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error
executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>:
java.util.ConcurrentModificationException
->> 181 | run              in
/grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in
home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in
org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in
home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in
home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in
home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in
org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in
org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in
org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in
org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in
org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in
org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in
home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in
org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in
home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in
home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in
home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in
org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in
org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in
org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in
org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in
org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in
org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:

> Hi all,
>
> We're pleased to announce the release of Grails 2.0.1. Further
> information below:
>
> Release Notes: http://grails.org/2.0.1+Release+Notes
> Download: http://grails.org/Download
>
> This release contains around 80 bug fixes and improvements since
> Grails 2.0 was released, hopefully improving the ability for folks to
> upgrade from 1.x
>
> Enjoy
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

xmly
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
Forget about the resources plugin, I found the real culprit, although I have no idea what is causing the exception.

The (map as JSON) was converted to a String inside the view.

I forced the conversion in the controller, and the relevant stacktrace is:

->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON


This happens either on (map as JSON).toString() or map.encodeAsJSON().

But it doesn't happen to all maps (they are different for each domain instance being viewed).

Any ideas?

Thanks in advance,
Rodrigo.

Em 14-02-2012 17:41, Gavin Yue escreveu:
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
This is the only change in grails.converters.JSON since 2.0.0:

    public static Object parse(HttpServletRequest request) throws ConverterException {
         Object json = request.getAttribute(CACHED_JSON);
         if (json != null) return json;
 
         String encoding = request.getCharacterEncoding();
         if (encoding == null) {
             encoding = Converter.DEFAULT_REQUEST_ENCODING;
         }
         try {
-            json = parse(request.getInputStream(), encoding);
+            PushbackInputStream pushbackInputStream = null;
+            int firstByte = -1;
+            try {
+                pushbackInputStream = new PushbackInputStream(request.getInputStream());
+                firstByte = pushbackInputStream.read();
+            } catch (IOException ioe) {}
+           
+            if(firstByte == -1) {
+                return new JSONObject();
+            }
+           
+            pushbackInputStream.unread(firstByte);
+            json = parse(pushbackInputStream, encoding);
             request.setAttribute(CACHED_JSON, json);
             return json;
         }
         catch (IOException e) {
             throw new ConverterException("Error parsing JSON", e);
         }
     }
 

Do you think it could have any impact?

Line 199 is actually:


 /**
     * @param o
     * @throws ConverterException
     */
    public void value(Object o) throws ConverterException {
        o = config.getProxyHandler().unwrapIfProxy(o);
        try {
            if (o == null || o.equals(JSONObject.NULL)) {
                writer.value(null);
            }
            else if (o instanceof CharSequence) {
                writer.value(o);
            }
            else if (o instanceof Class<?>) {
                writer.value(((Class<?>)o).getName());
            }
            else if ((o.getClass().isPrimitive() && !o.getClass().equals(byte[].class)) ||
                    o instanceof Number || o instanceof Boolean) {
                writer.value(o);
            }
            else {
                if (referenceStack.contains(o)) {
                    handleCircularRelationship(o);
                }
                else {
                    referenceStack.push(o);
                    ObjectMarshaller<JSON> marshaller = config.getMarshaller(o);
                    if (marshaller == null) {
                        throw new ConverterException("Unconvertable Object of class: " + o.getClass().getName());
                    }
199:             marshaller.marshalObject(o, this);
                    referenceStack.pop();
                }
            }
        }
        catch (ConverterException ce) {
            throw ce;
        }
        catch (JSONException e) {
            throw new ConverterException(e);
        }
    }

Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
Forget about the resources plugin, I found the real culprit, although I have no idea what is causing the exception.

The (map as JSON) was converted to a String inside the view.

I forced the conversion in the controller, and the relevant stacktrace is:

->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON


This happens either on (map as JSON).toString() or map.encodeAsJSON().

But it doesn't happen to all maps (they are different for each domain instance being viewed).

Any ideas?

Thanks in advance,
Rodrigo.

Em 14-02-2012 17:41, Gavin Yue escreveu:
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
In reply to this post by rosenfeld
The full stacktrace taken from target/stacktrace.log is more useful I guess:


2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.util.ConcurrentModificationException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.convertAnother(JSON.java:162)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.render(JSON.java:134)


Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
Forget about the resources plugin, I found the real culprit, although I have no idea what is causing the exception.

The (map as JSON) was converted to a String inside the view.

I forced the conversion in the controller, and the relevant stacktrace is:

->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON


This happens either on (map as JSON).toString() or map.encodeAsJSON().

But it doesn't happen to all maps (they are different for each domain instance being viewed).

Any ideas?

Thanks in advance,
Rodrigo.

Em 14-02-2012 17:41, Gavin Yue escreveu:
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
I don't understand. Who is calling next() on line 199?!

The line is:

marshaller.marshalObject(o, this);


Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
The full stacktrace taken from target/stacktrace.log is more useful I guess:


2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.util.ConcurrentModificationException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.convertAnother(JSON.java:162)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.render(JSON.java:134)


Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
Forget about the resources plugin, I found the real culprit, although I have no idea what is causing the exception.

The (map as JSON) was converted to a String inside the view.

I forced the conversion in the controller, and the relevant stacktrace is:

->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON


This happens either on (map as JSON).toString() or map.encodeAsJSON().

But it doesn't happen to all maps (they are different for each domain instance being viewed).

Any ideas?

Thanks in advance,
Rodrigo.

Em 14-02-2012 17:41, Gavin Yue escreveu:
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
In reply to this post by rosenfeld
Grails is really messing with my stacktraces. I could finally get a complete one after clearing my stacktrace.log file and restarting Grails:

2012-02-14 19:07:53,885 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.lang.IllegalArgumentException: Null key for a Map not allowed
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:144)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
    at groovy.lang.Closure.call(Closure.java:412)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
    at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
    at groovy.json.JsonOutput$toJson.callStatic(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
    at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:146)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
    at groovy.lang.Closure.call(Closure.java:412)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
    at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
    at groovy.json.JsonOutput$toJson.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.json.JsonBuilder.toString(JsonBuilder.groovy:242)
    at groovy.json.JsonBuilder$toString.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at matterhorn.CustomerController.transactionDetails(CustomerController.groovy:205)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:67)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:330)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:211)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:177)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:116)
    at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:325)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
    at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:311)
    at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:276)
    at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:267)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:209)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:200)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:151)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at javax.servlet.FilterChain$doFilter.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
2012-02-14 19:07:53,888 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.lang.IllegalArgumentException: Null key for a Map not allowed
    at myapp.MyController.show(MyController.groovy:205)
    at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)


The line that triggers the issue is:

 println new groovy.json.JsonBuilder(myMap).toString()

The issue is also raised with (myMap as JSON).toString() or myMap.encodeAsJSON()

Does it help? The error message doesn't make sense to me: "Null key for a Map not allowed"

Please, help me! My deadline was last week, but Grails is making it difficult for me to get it done :(

Working with Grails is too frustrating for me... :( I face a new bug every day and every upgrade is painful :(

I hope I can keep my job but my employers are not developers and they don't understand how it is possible for me to find new bugs in my web framework every day.

Since I work from home, I guess they suspect I'm lying about all those bugs... :(

Rodrigo.

Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
The full stacktrace taken from target/stacktrace.log is more useful I guess:


2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.util.ConcurrentModificationException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.convertAnother(JSON.java:162)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.render(JSON.java:134)


Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
Forget about the resources plugin, I found the real culprit, although I have no idea what is causing the exception.

The (map as JSON) was converted to a String inside the view.

I forced the conversion in the controller, and the relevant stacktrace is:

->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON


This happens either on (map as JSON).toString() or map.encodeAsJSON().

But it doesn't happen to all maps (they are different for each domain instance being viewed).

Any ideas?

Thanks in advance,
Rodrigo.

Em 14-02-2012 17:41, Gavin Yue escreveu:
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
Ok, part of the issue is fixed after getting this full stacktrace.

After looking at the code for JsonOutput, I could understand what the message meaned.

The message is "Null key for a Map not allowed". Here is the relevant code:

static String toJson(Map m) {
        "{" + m.collect { k, v ->
                if (k == null) {
                    throw new IllegalArgumentException('Null key for a Map not allowed')
                }
                toJson(k.toString()) + ':' + toJson(v)
        }.join(',') + "}"
    }

The message should be "Maps with null keys can't be converted to JSON".

Then I've written this method for identifying where in my code the null key was being generated:

 private detectNull(m, top = true) {
    m.each {k, v ->
      if (top) println k
      if (k == null) println "Value for null: ${v}"
      if (v instanceof Map) detectNull(v, false)
    }
  }

After finding out where it was being generated and fixing the issue, new JsonBuilder(map).toString() was working.

I'm currently using it in my controller because "(map as JSON).toString()" or "map.encodeAsJSON()" still yields to ConcurrentModificationException.

But I'm too tired for keep investigating this today...



Em 14-02-2012 19:18, Rodrigo Rosenfeld Rosas escreveu:
Grails is really messing with my stacktraces. I could finally get a complete one after clearing my stacktrace.log file and restarting Grails:

2012-02-14 19:07:53,885 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.lang.IllegalArgumentException: Null key for a Map not allowed
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:144)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
    at groovy.lang.Closure.call(Closure.java:412)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
    at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
    at groovy.json.JsonOutput$toJson.callStatic(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
    at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:146)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
    at groovy.lang.Closure.call(Closure.java:412)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
    at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
    at groovy.json.JsonOutput$toJson.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.json.JsonBuilder.toString(JsonBuilder.groovy:242)
    at groovy.json.JsonBuilder$toString.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at matterhorn.CustomerController.transactionDetails(CustomerController.groovy:205)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:67)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:330)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:211)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:177)
    at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:116)
    at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:325)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
    at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:311)
    at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:276)
    at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:267)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:209)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:200)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:151)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at javax.servlet.FilterChain$doFilter.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
2012-02-14 19:07:53,888 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.lang.IllegalArgumentException: Null key for a Map not allowed
    at myapp.MyController.show(MyController.groovy:205)
    at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)


The line that triggers the issue is:

 println new groovy.json.JsonBuilder(myMap).toString()

The issue is also raised with (myMap as JSON).toString() or myMap.encodeAsJSON()

Does it help? The error message doesn't make sense to me: "Null key for a Map not allowed"

Please, help me! My deadline was last week, but Grails is making it difficult for me to get it done :(

Working with Grails is too frustrating for me... :( I face a new bug every day and every upgrade is painful :(

I hope I can keep my job but my employers are not developers and they don't understand how it is possible for me to find new bugs in my web framework every day.

Since I work from home, I guess they suspect I'm lying about all those bugs... :(

Rodrigo.

Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
The full stacktrace taken from target/stacktrace.log is more useful I guess:


2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full Stack Trace:
java.util.ConcurrentModificationException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.convertAnother(JSON.java:162)
    at grails.converters.JSON.value(JSON.java:199)
    at grails.converters.JSON.render(JSON.java:134)


Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
Forget about the resources plugin, I found the real culprit, although I have no idea what is causing the exception.

The (map as JSON) was converted to a String inside the view.

I forced the conversion in the controller, and the relevant stacktrace is:

->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON


This happens either on (map as JSON).toString() or map.encodeAsJSON().

But it doesn't happen to all maps (they are different for each domain instance being viewed).

Any ideas?

Thanks in advance,
Rodrigo.

Em 14-02-2012 17:41, Gavin Yue escreveu:
what is resource plugin version?


On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas <[hidden email]> wrote:
I'm experiencing some issues after the 2.0.1 release.

In a view I'm getting ConcurrentModificationException from the Resources plugin.

It doesn't happen for all records sent to the view, but only a few of them... Have no idea why it is happening and I can't create an example application reproducing the issue.

Here is the stacktrace:


| Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR errors.GrailsExceptionResolver  - ConcurrentModificationException occurred when processing request: [GET] /myapp/mycontroller/view - parameters:
id: 842
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
  Line | Method
->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <r:script>: java.util.ConcurrentModificationException
->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <r:script>: java.util.ConcurrentModificationException
->> 181 | run              in /grails-app/views/mydomain/_commonTemplates.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: java.util.ConcurrentModificationException
->> 2826 | valueOf          in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    99 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall . . . . . in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run              in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain . . in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call             in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall . . . . . in org.apache.shiro.subject.support.SubjectCallable
|    83 | call             in     ''
|   344 | execute . . . .  in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter . . . . in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread

Caused by ConcurrentModificationException: null
->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   392 | next             in java.util.LinkedHashMap$EntryIterator
|   391 | next . . . . . . in     ''
|   199 | value            in grails.converters.JSON
|   162 | convertAnother . in     ''
|   199 | value            in     ''
|   134 | render . . . . . in     ''
|   2826 | valueOf          in java.lang.String
|    99 | doCall . . . . . in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
|   420 | doCall           in org.grails.plugin.resource.ResourceTagLib$_closure7
|   102 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
|    24 | doCall           in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
|    27 | run . . . . . .  in home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
|   359 | executeChain     in org.apache.shiro.web.servlet.AbstractShiroFilter
|   275 | call . . . . . . in org.apache.shiro.web.servlet.AbstractShiroFilter$1
|    90 | doCall           in org.apache.shiro.subject.support.SubjectCallable
|    83 | call . . . . . . in     ''
|   344 | execute          in org.apache.shiro.subject.support.DelegatingSubject
|   272 | doFilterInternal in org.apache.shiro.web.servlet.AbstractShiroFilter
|    81 | doFilter         in org.apache.shiro.web.servlet.OncePerRequestFilter
|    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
|   886 | runTask          in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run . . . . . .  in     ''
^   662 | run              in java.lang.Thread


Any idea on this issue?

Thanks in advance,

Rodrigo.

Em 14-02-2012 15:05, Graeme Rocher escreveu:
Hi all,

We're pleased to announce the release of Grails 2.0.1. Further
information below:

Release Notes: http://grails.org/2.0.1+Release+Notes
Download: http://grails.org/Download

This release contains around 80 bug fixes and improvements since
Grails 2.0 was released, hopefully improving the ability for folks to
upgrade from 1.x

Enjoy



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email







Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

Graeme Rocher
Administrator
Since you're using the JsonBuilder from Groovy this would be an issue
in Groovy 1.8.6

Cheers

On Tue, Feb 14, 2012 at 10:41 PM, Rodrigo Rosenfeld Rosas
<[hidden email]> wrote:

> Ok, part of the issue is fixed after getting this full stacktrace.
>
> After looking at the code for JsonOutput, I could understand what the
> message meaned.
>
> The message is "Null key for a Map not allowed". Here is the relevant code:
>
> static String toJson(Map m) {
>         "{" + m.collect { k, v ->
>                 if (k == null) {
>                     throw new IllegalArgumentException('Null key for a Map
> not allowed')
>                 }
>                 toJson(k.toString()) + ':' + toJson(v)
>         }.join(',') + "}"
>     }
>
> The message should be "Maps with null keys can't be converted to JSON".
>
> Then I've written this method for identifying where in my code the null key
> was being generated:
>
>  private detectNull(m, top = true) {
>     m.each {k, v ->
>       if (top) println k
>       if (k == null) println "Value for null: ${v}"
>       if (v instanceof Map) detectNull(v, false)
>     }
>   }
>
> After finding out where it was being generated and fixing the issue, new
> JsonBuilder(map).toString() was working.
>
> I'm currently using it in my controller because "(map as JSON).toString()"
> or "map.encodeAsJSON()" still yields to ConcurrentModificationException.
>
> But I'm too tired for keep investigating this today...
>
>
>
> Em 14-02-2012 19:18, Rodrigo Rosenfeld Rosas escreveu:
>
> Grails is really messing with my stacktraces. I could finally get a complete
> one after clearing my stacktrace.log file and restarting Grails:
>
> 2012-02-14 19:07:53,885 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> Stack Trace:
> java.lang.IllegalArgumentException: Null key for a Map not allowed
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>     at
> com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
>     at
> org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
>     at
> org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
>     at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:144)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
>     at
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
>     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
>     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
>     at groovy.lang.Closure.call(Closure.java:412)
>     at
> org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
>     at
> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
>     at
> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
>     at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
>     at
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>     at
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>     at
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>     at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
>     at groovy.json.JsonOutput$toJson.callStatic(Unknown Source)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
>     at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:146)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
>     at
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
>     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
>     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
>     at groovy.lang.Closure.call(Closure.java:412)
>     at
> org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
>     at
> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
>     at
> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
>     at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
>     at
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>     at
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>     at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
>     at groovy.json.JsonOutput$toJson.call(Unknown Source)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>     at groovy.json.JsonBuilder.toString(JsonBuilder.groovy:242)
>     at groovy.json.JsonBuilder$toString.call(Unknown Source)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
>     at
> matterhorn.CustomerController.transactionDetails(CustomerController.groovy:205)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:67)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:330)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:211)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:177)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:116)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
>     at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>     at
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:325)
>     at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
>     at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
>     at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
>     at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>     at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
>     at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
>     at
> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:311)
>     at
> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:276)
>     at
> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:267)
>     at
> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:209)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:200)
>     at
> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:151)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at javax.servlet.FilterChain$doFilter.call(Unknown Source)
>     at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>     at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
>     at
> org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
>     at
> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
>     at
> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>     at
> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>     at
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
>     at
> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
>     at
> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
>     at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>     at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>     at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>     at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>     at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>     at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
>     at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
>     at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>     at java.lang.Thread.run(Thread.java:662)
> 2012-02-14 19:07:53,888 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> Stack Trace:
> java.lang.IllegalArgumentException: Null key for a Map not allowed
>     at myapp.MyController.show(MyController.groovy:205)
>     at
> org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
>     at
> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
>     at
> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
>     at
> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>     at
> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>     at
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
>     at
> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
>     at
> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>     at java.lang.Thread.run(Thread.java:662)
>
>
> The line that triggers the issue is:
>
>  println new groovy.json.JsonBuilder(myMap).toString()
>
> The issue is also raised with (myMap as JSON).toString() or
> myMap.encodeAsJSON()
>
> Does it help? The error message doesn't make sense to me: "Null key for a
> Map not allowed"
>
> Please, help me! My deadline was last week, but Grails is making it
> difficult for me to get it done :(
>
> Working with Grails is too frustrating for me... :( I face a new bug every
> day and every upgrade is painful :(
>
> I hope I can keep my job but my employers are not developers and they don't
> understand how it is possible for me to find new bugs in my web framework
> every day.
>
> Since I work from home, I guess they suspect I'm lying about all those
> bugs... :(
>
> Rodrigo.
>
> Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
>
> The full stacktrace taken from target/stacktrace.log is more useful I guess:
>
>
> 2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> Stack Trace:
> java.util.ConcurrentModificationException
>     at
> java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
>     at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
>     at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
>     at grails.converters.JSON.value(JSON.java:199)
>     at grails.converters.JSON.convertAnother(JSON.java:162)
>     at grails.converters.JSON.value(JSON.java:199)
>     at grails.converters.JSON.render(JSON.java:134)
>
>
> Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
>
> Forget about the resources plugin, I found the real culprit, although I have
> no idea what is causing the exception.
>
> The (map as JSON) was converted to a String inside the view.
>
> I forced the conversion in the controller, and the relevant stacktrace is:
>
> ->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> |   392 | next             in java.util.LinkedHashMap$EntryIterator
> |   391 | next . . . . . . in     ''
> |   199 | value            in grails.converters.JSON
>
>
> This happens either on (map as JSON).toString() or map.encodeAsJSON().
>
> But it doesn't happen to all maps (they are different for each domain
> instance being viewed).
>
> Any ideas?
>
> Thanks in advance,
> Rodrigo.
>
> Em 14-02-2012 17:41, Gavin Yue escreveu:
>
> what is resource plugin version?
>
>
> On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas
> <[hidden email]> wrote:
>>
>> I'm experiencing some issues after the 2.0.1 release.
>>
>> In a view I'm getting ConcurrentModificationException from the Resources
>> plugin.
>>
>> It doesn't happen for all records sent to the view, but only a few of
>> them... Have no idea why it is happening and I can't create an example
>> application reproducing the issue.
>>
>> Here is the stacktrace:
>>
>>
>> | Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR
>> errors.GrailsExceptionResolver  - ConcurrentModificationException occurred
>> when processing request: [GET] /myapp/mycontroller/view - parameters:
>> id: 842
>> Stacktrace follows:
>> Message: Error processing GroovyPageView: Error executing tag <g:render>:
>> Error executing tag <r:script>: java.util.ConcurrentModificationException
>>   Line | Method
>> ->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>> Caused by GrailsTagException: Error executing tag <g:render>: Error
>> executing tag <r:script>: java.util.ConcurrentModificationException
>> ->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>> Caused by GrailsTagException: Error executing tag <r:script>:
>> java.util.ConcurrentModificationException
>> ->> 181 | run              in
>> /grails-app/views/mydomain/_commonTemplates.gsp
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>> Caused by UnhandledException: java.util.ConcurrentModificationException
>> ->> 2826 | valueOf          in java.lang.String
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> |    99 | doCall           in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
>> |   420 | doCall . . . . . in
>> org.grails.plugin.resource.ResourceTagLib$_closure7
>> |   102 | run              in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
>> |    24 | doCall . . . . . in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
>> |    27 | run              in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
>> |   359 | executeChain . . in
>> org.apache.shiro.web.servlet.AbstractShiroFilter
>> |   275 | call             in
>> org.apache.shiro.web.servlet.AbstractShiroFilter$1
>> |    90 | doCall . . . . . in
>> org.apache.shiro.subject.support.SubjectCallable
>> |    83 | call             in     ''
>> |   344 | execute . . . .  in
>> org.apache.shiro.subject.support.DelegatingSubject
>> |   272 | doFilterInternal in
>> org.apache.shiro.web.servlet.AbstractShiroFilter
>> |    81 | doFilter . . . . in
>> org.apache.shiro.web.servlet.OncePerRequestFilter
>> |    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
>> |   886 | runTask . . . .  in
>> java.util.concurrent.ThreadPoolExecutor$Worker
>> |   908 | run              in     ''
>> ^   662 | run . . . . . .  in java.lang.Thread
>>
>> Caused by ConcurrentModificationException: null
>> ->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> |   392 | next             in java.util.LinkedHashMap$EntryIterator
>> |   391 | next . . . . . . in     ''
>> |   199 | value            in grails.converters.JSON
>> |   162 | convertAnother . in     ''
>> |   199 | value            in     ''
>> |   134 | render . . . . . in     ''
>> |   2826 | valueOf          in java.lang.String
>> |    99 | doCall . . . . . in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
>> |   420 | doCall           in
>> org.grails.plugin.resource.ResourceTagLib$_closure7
>> |   102 | run . . . . . .  in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
>> |    24 | doCall           in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
>> |    27 | run . . . . . .  in
>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
>> |   359 | executeChain     in
>> org.apache.shiro.web.servlet.AbstractShiroFilter
>> |   275 | call . . . . . . in
>> org.apache.shiro.web.servlet.AbstractShiroFilter$1
>> |    90 | doCall           in
>> org.apache.shiro.subject.support.SubjectCallable
>> |    83 | call . . . . . . in     ''
>> |   344 | execute          in
>> org.apache.shiro.subject.support.DelegatingSubject
>> |   272 | doFilterInternal in
>> org.apache.shiro.web.servlet.AbstractShiroFilter
>> |    81 | doFilter         in
>> org.apache.shiro.web.servlet.OncePerRequestFilter
>> |    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
>> |   886 | runTask          in
>> java.util.concurrent.ThreadPoolExecutor$Worker
>> |   908 | run . . . . . .  in     ''
>> ^   662 | run              in java.lang.Thread
>>
>>
>> Any idea on this issue?
>>
>> Thanks in advance,
>>
>> Rodrigo.
>>
>> Em 14-02-2012 15:05, Graeme Rocher escreveu:
>>>
>>> Hi all,
>>>
>>> We're pleased to announce the release of Grails 2.0.1. Further
>>> information below:
>>>
>>> Release Notes: http://grails.org/2.0.1+Release+Notes
>>> Download: http://grails.org/Download
>>>
>>> This release contains around 80 bug fixes and improvements since
>>> Grails 2.0 was released, hopefully improving the ability for folks to
>>> upgrade from 1.x
>>>
>>> Enjoy
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Grails 2.0.1 Released - ConcurrentModificationException in views

wwwclaes
I just stumbled upon this...

http://jira.codehaus.org/browse/GROOVY-5162

...so I'm informing you in case it is of relevance. Really don't know myself :-)

/Claes

> From: [hidden email]

> Date: Wed, 15 Feb 2012 08:40:32 +0100
> To: [hidden email]
> Subject: Re: [grails-user] Grails 2.0.1 Released - ConcurrentModificationException in views
>
> Since you're using the JsonBuilder from Groovy this would be an issue
> in Groovy 1.8.6
>
> Cheers
>
> On Tue, Feb 14, 2012 at 10:41 PM, Rodrigo Rosenfeld Rosas
> <[hidden email]> wrote:
> > Ok, part of the issue is fixed after getting this full stacktrace.
> >
> > After looking at the code for JsonOutput, I could understand what the
> > message meaned.
> >
> > The message is "Null key for a Map not allowed". Here is the relevant code:
> >
> > static String toJson(Map m) {
> >         "{" + m.collect { k, v ->
> >                 if (k == null) {
> >                     throw new IllegalArgumentException('Null key for a Map
> > not allowed')
> >                 }
> >                 toJson(k.toString()) + ':' + toJson(v)
> >         }.join(',') + "}"
> >     }
> >
> > The message should be "Maps with null keys can't be converted to JSON".
> >
> > Then I've written this method for identifying where in my code the null key
> > was being generated:
> >
> >  private detectNull(m, top = true) {
> >     m.each {k, v ->
> >       if (top) println k
> >       if (k == null) println "Value for null: ${v}"
> >       if (v instanceof Map) detectNull(v, false)
> >     }
> >   }
> >
> > After finding out where it was being generated and fixing the issue, new
> > JsonBuilder(map).toString() was working.
> >
> > I'm currently using it in my controller because "(map as JSON).toString()"
> > or "map.encodeAsJSON()" still yields to ConcurrentModificationException.
> >
> > But I'm too tired for keep investigating this today...
> >
> >
> >
> > Em 14-02-2012 19:18, Rodrigo Rosenfeld Rosas escreveu:
> >
> > Grails is really messing with my stacktraces. I could finally get a complete
> > one after clearing my stacktrace.log file and restarting Grails:
> >
> > 2012-02-14 19:07:53,885 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> > Stack Trace:
> > java.lang.IllegalArgumentException: Null key for a Map not allowed
> >     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> >     at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> >     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
> >     at
> > org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
> >     at
> > org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
> >     at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:144)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
> >     at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> >     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
> >     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
> >     at groovy.lang.Closure.call(Closure.java:412)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
> >     at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> >     at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
> >     at groovy.json.JsonOutput$toJson.callStatic(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
> >     at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:146)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
> >     at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> >     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
> >     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
> >     at groovy.lang.Closure.call(Closure.java:412)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
> >     at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> >     at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
> >     at groovy.json.JsonOutput$toJson.call(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> >     at groovy.json.JsonBuilder.toString(JsonBuilder.groovy:242)
> >     at groovy.json.JsonBuilder$toString.call(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
> >     at
> > matterhorn.CustomerController.transactionDetails(CustomerController.groovy:205)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:67)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:330)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:211)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:177)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:116)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
> >     at
> > org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
> >     at
> > org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:325)
> >     at
> > org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
> >     at
> > org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
> >     at
> > org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
> >     at
> > org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:311)
> >     at
> > org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:276)
> >     at
> > org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:267)
> >     at
> > org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:209)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:200)
> >     at
> > org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:151)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at javax.servlet.FilterChain$doFilter.call(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
> >     at
> > org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> >     at
> > org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
> >     at
> > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> >     at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> >     at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> >     at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >     at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >     at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> >     at
> > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> >     at
> > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
> >     at
> > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >     at java.lang.Thread.run(Thread.java:662)
> > 2012-02-14 19:07:53,888 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> > Stack Trace:
> > java.lang.IllegalArgumentException: Null key for a Map not allowed
> >     at myapp.MyController.show(MyController.groovy:205)
> >     at
> > org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> >     at
> > org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
> >     at
> > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >     at java.lang.Thread.run(Thread.java:662)
> >
> >
> > The line that triggers the issue is:
> >
> >  println new groovy.json.JsonBuilder(myMap).toString()
> >
> > The issue is also raised with (myMap as JSON).toString() or
> > myMap.encodeAsJSON()
> >
> > Does it help? The error message doesn't make sense to me: "Null key for a
> > Map not allowed"
> >
> > Please, help me! My deadline was last week, but Grails is making it
> > difficult for me to get it done :(
> >
> > Working with Grails is too frustrating for me... :( I face a new bug every
> > day and every upgrade is painful :(
> >
> > I hope I can keep my job but my employers are not developers and they don't
> > understand how it is possible for me to find new bugs in my web framework
> > every day.
> >
> > Since I work from home, I guess they suspect I'm lying about all those
> > bugs... :(
> >
> > Rodrigo.
> >
> > Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
> >
> > The full stacktrace taken from target/stacktrace.log is more useful I guess:
> >
> >
> > 2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> > Stack Trace:
> > java.util.ConcurrentModificationException
> >     at
> > java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
> >     at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
> >     at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
> >     at grails.converters.JSON.value(JSON.java:199)
> >     at grails.converters.JSON.convertAnother(JSON.java:162)
> >     at grails.converters.JSON.value(JSON.java:199)
> >     at grails.converters.JSON.render(JSON.java:134)
> >
> >
> > Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
> >
> > Forget about the resources plugin, I found the real culprit, although I have
> > no idea what is causing the exception.
> >
> > The (map as JSON) was converted to a String inside the view.
> >
> > I forced the conversion in the controller, and the relevant stacktrace is:
> >
> > ->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > |   392 | next             in java.util.LinkedHashMap$EntryIterator
> > |   391 | next . . . . . . in     ''
> > |   199 | value            in grails.converters.JSON
> >
> >
> > This happens either on (map as JSON).toString() or map.encodeAsJSON().
> >
> > But it doesn't happen to all maps (they are different for each domain
> > instance being viewed).
> >
> > Any ideas?
> >
> > Thanks in advance,
> > Rodrigo.
> >
> > Em 14-02-2012 17:41, Gavin Yue escreveu:
> >
> > what is resource plugin version?
> >
> >
> > On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas
> > <[hidden email]> wrote:
> >>
> >> I'm experiencing some issues after the 2.0.1 release.
> >>
> >> In a view I'm getting ConcurrentModificationException from the Resources
> >> plugin.
> >>
> >> It doesn't happen for all records sent to the view, but only a few of
> >> them... Have no idea why it is happening and I can't create an example
> >> application reproducing the issue.
> >>
> >> Here is the stacktrace:
> >>
> >>
> >> | Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR
> >> errors.GrailsExceptionResolver  - ConcurrentModificationException occurred
> >> when processing request: [GET] /myapp/mycontroller/view - parameters:
> >> id: 842
> >> Stacktrace follows:
> >> Message: Error processing GroovyPageView: Error executing tag <g:render>:
> >> Error executing tag <r:script>: java.util.ConcurrentModificationException
> >>   Line | Method
> >> ->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>
> >> Caused by GrailsTagException: Error executing tag <g:render>: Error
> >> executing tag <r:script>: java.util.ConcurrentModificationException
> >> ->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>
> >> Caused by GrailsTagException: Error executing tag <r:script>:
> >> java.util.ConcurrentModificationException
> >> ->> 181 | run              in
> >> /grails-app/views/mydomain/_commonTemplates.gsp
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>
> >> Caused by UnhandledException: java.util.ConcurrentModificationException
> >> ->> 2826 | valueOf          in java.lang.String
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >> |    99 | doCall           in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
> >> |   420 | doCall . . . . . in
> >> org.grails.plugin.resource.ResourceTagLib$_closure7
> >> |   102 | run              in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
> >> |    24 | doCall . . . . . in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
> >> |    27 | run              in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
> >> |   359 | executeChain . . in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |   275 | call             in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter$1
> >> |    90 | doCall . . . . . in
> >> org.apache.shiro.subject.support.SubjectCallable
> >> |    83 | call             in     ''
> >> |   344 | execute . . . .  in
> >> org.apache.shiro.subject.support.DelegatingSubject
> >> |   272 | doFilterInternal in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |    81 | doFilter . . . . in
> >> org.apache.shiro.web.servlet.OncePerRequestFilter
> >> |    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
> >> |   886 | runTask . . . .  in
> >> java.util.concurrent.ThreadPoolExecutor$Worker
> >> |   908 | run              in     ''
> >> ^   662 | run . . . . . .  in java.lang.Thread
> >>
> >> Caused by ConcurrentModificationException: null
> >> ->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >> |   392 | next             in java.util.LinkedHashMap$EntryIterator
> >> |   391 | next . . . . . . in     ''
> >> |   199 | value            in grails.converters.JSON
> >> |   162 | convertAnother . in     ''
> >> |   199 | value            in     ''
> >> |   134 | render . . . . . in     ''
> >> |   2826 | valueOf          in java.lang.String
> >> |    99 | doCall . . . . . in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
> >> |   420 | doCall           in
> >> org.grails.plugin.resource.ResourceTagLib$_closure7
> >> |   102 | run . . . . . .  in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
> >> |    24 | doCall           in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
> >> |    27 | run . . . . . .  in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
> >> |   359 | executeChain     in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |   275 | call . . . . . . in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter$1
> >> |    90 | doCall           in
> >> org.apache.shiro.subject.support.SubjectCallable
> >> |    83 | call . . . . . . in     ''
> >> |   344 | execute          in
> >> org.apache.shiro.subject.support.DelegatingSubject
> >> |   272 | doFilterInternal in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |    81 | doFilter         in
> >> org.apache.shiro.web.servlet.OncePerRequestFilter
> >> |    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
> >> |   886 | runTask          in
> >> java.util.concurrent.ThreadPoolExecutor$Worker
> >> |   908 | run . . . . . .  in     ''
> >> ^   662 | run              in java.lang.Thread
> >>
> >>
> >> Any idea on this issue?
> >>
> >> Thanks in advance,
> >>
> >> Rodrigo.
> >>
> >> Em 14-02-2012 15:05, Graeme Rocher escreveu:
> >>>
> >>> Hi all,
> >>>
> >>> We're pleased to announce the release of Grails 2.0.1. Further
> >>> information below:
> >>>
> >>> Release Notes: http://grails.org/2.0.1+Release+Notes
> >>> Download: http://grails.org/Download
> >>>
> >>> This release contains around 80 bug fixes and improvements since
> >>> Grails 2.0 was released, hopefully improving the ability for folks to
> >>> upgrade from 1.x
> >>>
> >>> Enjoy
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>   http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> >
> >
> >
> >
>
>
>
> --
> Graeme Rocher
> Grails Project Lead
> SpringSource - A Division of VMware
> http://www.springsource.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

furtivechris
In reply to this post by Graeme Rocher
Thx for new release.
When will 2.0.1 artifacts appear in Grails Artifactory repo? (http://repo.grails.org)

I'm trying to diagnose some issues with the grails gradle plugin and would like to see if 2.0.1 changes anything.
Cheers,
Chris.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
In reply to this post by Graeme Rocher
Graeme, I guess you didn't read all the thread. I don't blame you as it
is a big one.

But actually I'm forced to use JsonBuilder because using Grails "as
JSON" or "encodeAsJSON" throws ConcurrentModificationException for some
of my domain instances.

I'm not arguing that that the inability of converting maps with null
keys to JSON is an issue with Groovy. This could be only a design
decision. That was never the issue.

I really shouldn't be generating maps with null keys. The issue was the
bad "Null key for a Map not allowed" message that doesn't describe the
error properly.

But anyway, even after removing the null keys from all maps, I still get
ConcurrentModificationException in Grails.

That is the issue I'm actually reporting.

Em 15-02-2012 05:40, Graeme Rocher escreveu:

> Since you're using the JsonBuilder from Groovy this would be an issue
> in Groovy 1.8.6
>
> Cheers
>
> On Tue, Feb 14, 2012 at 10:41 PM, Rodrigo Rosenfeld Rosas
> <[hidden email]>  wrote:
>> Ok, part of the issue is fixed after getting this full stacktrace.
>>
>> After looking at the code for JsonOutput, I could understand what the
>> message meaned.
>>
>> The message is "Null key for a Map not allowed". Here is the relevant code:
>>
>> static String toJson(Map m) {
>>          "{" + m.collect { k, v ->
>>                  if (k == null) {
>>                      throw new IllegalArgumentException('Null key for a Map
>> not allowed')
>>                  }
>>                  toJson(k.toString()) + ':' + toJson(v)
>>          }.join(',') + "}"
>>      }
>>
>> The message should be "Maps with null keys can't be converted to JSON".
>>
>> Then I've written this method for identifying where in my code the null key
>> was being generated:
>>
>>   private detectNull(m, top = true) {
>>      m.each {k, v ->
>>        if (top) println k
>>        if (k == null) println "Value for null: ${v}"
>>        if (v instanceof Map) detectNull(v, false)
>>      }
>>    }
>>
>> After finding out where it was being generated and fixing the issue, new
>> JsonBuilder(map).toString() was working.
>>
>> I'm currently using it in my controller because "(map as JSON).toString()"
>> or "map.encodeAsJSON()" still yields to ConcurrentModificationException.
>>
>> But I'm too tired for keep investigating this today...
>>
>>
>>
>> Em 14-02-2012 19:18, Rodrigo Rosenfeld Rosas escreveu:
>>
>> Grails is really messing with my stacktraces. I could finally get a complete
>> one after clearing my stacktrace.log file and restarting Grails:
>>
>> 2012-02-14 19:07:53,885 [http-bio-8081-exec-1] ERROR StackTrace  - Full
>> Stack Trace:
>> java.lang.IllegalArgumentException: Null key for a Map not allowed
>>      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>      at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>      at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>      at
>> com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
>>      at
>> org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
>>      at
>> org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
>>      at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:144)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>      at
>> com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
>>      at
>> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>>      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>>      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
>>      at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
>>      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
>>      at groovy.lang.Closure.call(Closure.java:412)
>>      at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
>>      at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
>>      at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
>>      at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
>>      at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>>      at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>      at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>>      at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
>>      at groovy.json.JsonOutput$toJson.callStatic(Unknown Source)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
>>      at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:146)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>      at
>> com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
>>      at
>> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>>      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>>      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
>>      at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
>>      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
>>      at groovy.lang.Closure.call(Closure.java:412)
>>      at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
>>      at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
>>      at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
>>      at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
>>      at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>>      at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>>      at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
>>      at groovy.json.JsonOutput$toJson.call(Unknown Source)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>>      at groovy.json.JsonBuilder.toString(JsonBuilder.groovy:242)
>>      at groovy.json.JsonBuilder$toString.call(Unknown Source)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
>>      at
>> matterhorn.CustomerController.transactionDetails(CustomerController.groovy:205)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>      at
>> com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:67)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:330)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:211)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:177)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:116)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
>>      at
>> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>>      at
>> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:325)
>>      at
>> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
>>      at
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
>>      at
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
>>      at
>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>>      at
>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
>>      at
>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
>>      at
>> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:311)
>>      at
>> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:276)
>>      at
>> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:267)
>>      at
>> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:209)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:200)
>>      at
>> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:151)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at javax.servlet.FilterChain$doFilter.call(Unknown Source)
>>      at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>>      at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
>>      at
>> org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
>>      at
>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
>>      at
>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>>      at
>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>>      at
>> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
>>      at
>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
>>      at
>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
>>      at
>> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>>      at
>> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>>      at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>      at
>> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>>      at
>> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>      at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>      at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
>>      at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
>>      at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>>      at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>>      at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>      at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>>      at
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
>>      at
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
>>      at
>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
>>      at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>      at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>      at java.lang.Thread.run(Thread.java:662)
>> 2012-02-14 19:07:53,888 [http-bio-8081-exec-1] ERROR StackTrace  - Full
>> Stack Trace:
>> java.lang.IllegalArgumentException: Null key for a Map not allowed
>>      at myapp.MyController.show(MyController.groovy:205)
>>      at
>> org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
>>      at
>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
>>      at
>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
>>      at
>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
>>      at
>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
>>      at
>> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
>>      at
>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
>>      at
>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
>>      at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>      at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>      at java.lang.Thread.run(Thread.java:662)
>>
>>
>> The line that triggers the issue is:
>>
>>   println new groovy.json.JsonBuilder(myMap).toString()
>>
>> The issue is also raised with (myMap as JSON).toString() or
>> myMap.encodeAsJSON()
>>
>> Does it help? The error message doesn't make sense to me: "Null key for a
>> Map not allowed"
>>
>> Please, help me! My deadline was last week, but Grails is making it
>> difficult for me to get it done :(
>>
>> Working with Grails is too frustrating for me... :( I face a new bug every
>> day and every upgrade is painful :(
>>
>> I hope I can keep my job but my employers are not developers and they don't
>> understand how it is possible for me to find new bugs in my web framework
>> every day.
>>
>> Since I work from home, I guess they suspect I'm lying about all those
>> bugs... :(
>>
>> Rodrigo.
>>
>> Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
>>
>> The full stacktrace taken from target/stacktrace.log is more useful I guess:
>>
>>
>> 2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full
>> Stack Trace:
>> java.util.ConcurrentModificationException
>>      at
>> java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
>>      at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
>>      at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
>>      at grails.converters.JSON.value(JSON.java:199)
>>      at grails.converters.JSON.convertAnother(JSON.java:162)
>>      at grails.converters.JSON.value(JSON.java:199)
>>      at grails.converters.JSON.render(JSON.java:134)
>>
>>
>> Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
>>
>> Forget about the resources plugin, I found the real culprit, although I have
>> no idea what is causing the exception.
>>
>> The (map as JSON) was converted to a String inside the view.
>>
>> I forced the conversion in the controller, and the relevant stacktrace is:
>>
>> ->>  373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> |   392 | next             in java.util.LinkedHashMap$EntryIterator
>> |   391 | next . . . . . . in     ''
>> |   199 | value            in grails.converters.JSON
>>
>>
>> This happens either on (map as JSON).toString() or map.encodeAsJSON().
>>
>> But it doesn't happen to all maps (they are different for each domain
>> instance being viewed).
>>
>> Any ideas?
>>
>> Thanks in advance,
>> Rodrigo.
>>
>> Em 14-02-2012 17:41, Gavin Yue escreveu:
>>
>> what is resource plugin version?
>>
>>
>> On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas
>> <[hidden email]>  wrote:
>>> I'm experiencing some issues after the 2.0.1 release.
>>>
>>> In a view I'm getting ConcurrentModificationException from the Resources
>>> plugin.
>>>
>>> It doesn't happen for all records sent to the view, but only a few of
>>> them... Have no idea why it is happening and I can't create an example
>>> application reproducing the issue.
>>>
>>> Here is the stacktrace:
>>>
>>>
>>> | Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR
>>> errors.GrailsExceptionResolver  - ConcurrentModificationException occurred
>>> when processing request: [GET] /myapp/mycontroller/view - parameters:
>>> id: 842
>>> Stacktrace follows:
>>> Message: Error processing GroovyPageView: Error executing tag<g:render>:
>>> Error executing tag<r:script>: java.util.ConcurrentModificationException
>>>    Line | Method
>>> ->>     8 | executeChain     in /grails-app/views/mycontroller/view.gsp
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>
>>> Caused by GrailsTagException: Error executing tag<g:render>: Error
>>> executing tag<r:script>: java.util.ConcurrentModificationException
>>> ->>     8 | doCall           in /grails-app/views/mycontroller/view.gsp
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>
>>> Caused by GrailsTagException: Error executing tag<r:script>:
>>> java.util.ConcurrentModificationException
>>> ->>  181 | run              in
>>> /grails-app/views/mydomain/_commonTemplates.gsp
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>>
>>> Caused by UnhandledException: java.util.ConcurrentModificationException
>>> ->>  2826 | valueOf          in java.lang.String
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>> |    99 | doCall           in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
>>> |   420 | doCall . . . . . in
>>> org.grails.plugin.resource.ResourceTagLib$_closure7
>>> |   102 | run              in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
>>> |    24 | doCall . . . . . in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
>>> |    27 | run              in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
>>> |   359 | executeChain . . in
>>> org.apache.shiro.web.servlet.AbstractShiroFilter
>>> |   275 | call             in
>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1
>>> |    90 | doCall . . . . . in
>>> org.apache.shiro.subject.support.SubjectCallable
>>> |    83 | call             in     ''
>>> |   344 | execute . . . .  in
>>> org.apache.shiro.subject.support.DelegatingSubject
>>> |   272 | doFilterInternal in
>>> org.apache.shiro.web.servlet.AbstractShiroFilter
>>> |    81 | doFilter . . . . in
>>> org.apache.shiro.web.servlet.OncePerRequestFilter
>>> |    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
>>> |   886 | runTask . . . .  in
>>> java.util.concurrent.ThreadPoolExecutor$Worker
>>> |   908 | run              in     ''
>>> ^   662 | run . . . . . .  in java.lang.Thread
>>>
>>> Caused by ConcurrentModificationException: null
>>> ->>  373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>> |   392 | next             in java.util.LinkedHashMap$EntryIterator
>>> |   391 | next . . . . . . in     ''
>>> |   199 | value            in grails.converters.JSON
>>> |   162 | convertAnother . in     ''
>>> |   199 | value            in     ''
>>> |   134 | render . . . . . in     ''
>>> |   2826 | valueOf          in java.lang.String
>>> |    99 | doCall . . . . . in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
>>> |   420 | doCall           in
>>> org.grails.plugin.resource.ResourceTagLib$_closure7
>>> |   102 | run . . . . . .  in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
>>> |    24 | doCall           in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
>>> |    27 | run . . . . . .  in
>>> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
>>> |   359 | executeChain     in
>>> org.apache.shiro.web.servlet.AbstractShiroFilter
>>> |   275 | call . . . . . . in
>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1
>>> |    90 | doCall           in
>>> org.apache.shiro.subject.support.SubjectCallable
>>> |    83 | call . . . . . . in     ''
>>> |   344 | execute          in
>>> org.apache.shiro.subject.support.DelegatingSubject
>>> |   272 | doFilterInternal in
>>> org.apache.shiro.web.servlet.AbstractShiroFilter
>>> |    81 | doFilter         in
>>> org.apache.shiro.web.servlet.OncePerRequestFilter
>>> |    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
>>> |   886 | runTask          in
>>> java.util.concurrent.ThreadPoolExecutor$Worker
>>> |   908 | run . . . . . .  in     ''
>>> ^   662 | run              in java.lang.Thread
>>>
>>>
>>> Any idea on this issue?
>>>
>>> Thanks in advance,
>>>
>>> Rodrigo.
>>>
>>> Em 14-02-2012 15:05, Graeme Rocher escreveu:
>>>> Hi all,
>>>>
>>>> We're pleased to announce the release of Grails 2.0.1. Further
>>>> information below:
>>>>
>>>> Release Notes: http://grails.org/2.0.1+Release+Notes
>>>> Download: http://grails.org/Download
>>>>
>>>> This release contains around 80 bug fixes and improvements since
>>>> Grails 2.0 was released, hopefully improving the ability for folks to
>>>> upgrade from 1.x
>>>>
>>>> Enjoy
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released - ConcurrentModificationException in views

rosenfeld
In reply to this post by wwwclaes
I've just created this one:

http://jira.codehaus.org/browse/GROOVY-5307

Em 15-02-2012 06:39, Claes Svensson escreveu:
I just stumbled upon this...


...so I'm informing you in case it is of relevance. Really don't know myself :-)

/Claes

> From: [hidden email]
> Date: Wed, 15 Feb 2012 08:40:32 +0100
> To: [hidden email]
> Subject: Re: [grails-user] Grails 2.0.1 Released - ConcurrentModificationException in views
>
> Since you're using the JsonBuilder from Groovy this would be an issue
> in Groovy 1.8.6
>
> Cheers
>
> On Tue, Feb 14, 2012 at 10:41 PM, Rodrigo Rosenfeld Rosas
> [hidden email] wrote:
> > Ok, part of the issue is fixed after getting this full stacktrace.
> >
> > After looking at the code for JsonOutput, I could understand what the
> > message meaned.
> >
> > The message is "Null key for a Map not allowed". Here is the relevant code:
> >
> > static String toJson(Map m) {
> >         "{" + m.collect { k, v ->
> >                 if (k == null) {
> >                     throw new IllegalArgumentException('Null key for a Map
> > not allowed')
> >                 }
> >                 toJson(k.toString()) + ':' + toJson(v)
> >         }.join(',') + "}"
> >     }
> >
> > The message should be "Maps with null keys can't be converted to JSON".
> >
> > Then I've written this method for identifying where in my code the null key
> > was being generated:
> >
> >  private detectNull(m, top = true) {
> >     m.each {k, v ->
> >       if (top) println k
> >       if (k == null) println "Value for null: ${v}"
> >       if (v instanceof Map) detectNull(v, false)
> >     }
> >   }
> >
> > After finding out where it was being generated and fixing the issue, new
> > JsonBuilder(map).toString() was working.
> >
> > I'm currently using it in my controller because "(map as JSON).toString()"
> > or "map.encodeAsJSON()" still yields to ConcurrentModificationException.
> >
> > But I'm too tired for keep investigating this today...
> >
> >
> >
> > Em 14-02-2012 19:18, Rodrigo Rosenfeld Rosas escreveu:
> >
> > Grails is really messing with my stacktraces. I could finally get a complete
> > one after clearing my stacktrace.log file and restarting Grails:
> >
> > 2012-02-14 19:07:53,885 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> > Stack Trace:
> > java.lang.IllegalArgumentException: Null key for a Map not allowed
> >     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> >     at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> >     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:963)
> >     at
> > org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
> >     at
> > org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
> >     at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:144)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
> >     at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> >     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
> >     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
> >     at groovy.lang.Closure.call(Closure.java:412)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
> >     at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> >     at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
> >     at groovy.json.JsonOutput$toJson.callStatic(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:165)
> >     at groovy.json.JsonOutput$_toJson_closure2.doCall(JsonOutput.groovy:146)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
> >     at
> > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> >     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
> >     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
> >     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
> >     at groovy.lang.Closure.call(Closure.java:412)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3578)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2316)
> >     at
> > org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2333)
> >     at org.codehaus.groovy.runtime.dgm$83.invoke(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
> >     at
> > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> >     at groovy.json.JsonOutput.toJson(JsonOutput.groovy:142)
> >     at groovy.json.JsonOutput$toJson.call(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> >     at groovy.json.JsonBuilder.toString(JsonBuilder.groovy:242)
> >     at groovy.json.JsonBuilder$toString.call(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
> >     at
> > matterhorn.CustomerController.transactionDetails(CustomerController.groovy:205)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >     at java.lang.reflect.Method.invoke(Method.java:597)
> >     at
> > com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:67)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:330)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:211)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:177)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:116)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
> >     at
> > org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
> >     at
> > org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:325)
> >     at
> > org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
> >     at
> > org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
> >     at
> > org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
> >     at
> > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
> >     at
> > org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:311)
> >     at
> > org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:276)
> >     at
> > org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:267)
> >     at
> > org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:209)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:200)
> >     at
> > org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:151)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at javax.servlet.FilterChain$doFilter.call(Unknown Source)
> >     at
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
> >     at
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
> >     at
> > org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> >     at
> > org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
> >     at
> > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> >     at
> > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
> >     at
> > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >     at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> >     at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> >     at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> >     at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> >     at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> >     at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> >     at
> > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
> >     at
> > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
> >     at
> > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >     at java.lang.Thread.run(Thread.java:662)
> > 2012-02-14 19:07:53,888 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> > Stack Trace:
> > java.lang.IllegalArgumentException: Null key for a Map not allowed
> >     at myapp.MyController.show(MyController.groovy:205)
> >     at
> > org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> >     at
> > org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> >     at
> > org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
> >     at
> > org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
> >     at
> > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >     at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >     at java.lang.Thread.run(Thread.java:662)
> >
> >
> > The line that triggers the issue is:
> >
> >  println new groovy.json.JsonBuilder(myMap).toString()
> >
> > The issue is also raised with (myMap as JSON).toString() or
> > myMap.encodeAsJSON()
> >
> > Does it help? The error message doesn't make sense to me: "Null key for a
> > Map not allowed"
> >
> > Please, help me! My deadline was last week, but Grails is making it
> > difficult for me to get it done :(
> >
> > Working with Grails is too frustrating for me... :( I face a new bug every
> > day and every upgrade is painful :(
> >
> > I hope I can keep my job but my employers are not developers and they don't
> > understand how it is possible for me to find new bugs in my web framework
> > every day.
> >
> > Since I work from home, I guess they suspect I'm lying about all those
> > bugs... :(
> >
> > Rodrigo.
> >
> > Em 14-02-2012 18:32, Rodrigo Rosenfeld Rosas escreveu:
> >
> > The full stacktrace taken from target/stacktrace.log is more useful I guess:
> >
> >
> > 2012-02-14 18:07:11,171 [http-bio-8081-exec-1] ERROR StackTrace  - Full
> > Stack Trace:
> > java.util.ConcurrentModificationException
> >     at
> > java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:373)
> >     at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:392)
> >     at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:391)
> >     at grails.converters.JSON.value(JSON.java:199)
> >     at grails.converters.JSON.convertAnother(JSON.java:162)
> >     at grails.converters.JSON.value(JSON.java:199)
> >     at grails.converters.JSON.render(JSON.java:134)
> >
> >
> > Em 14-02-2012 18:19, Rodrigo Rosenfeld Rosas escreveu:
> >
> > Forget about the resources plugin, I found the real culprit, although I have
> > no idea what is causing the exception.
> >
> > The (map as JSON) was converted to a String inside the view.
> >
> > I forced the conversion in the controller, and the relevant stacktrace is:
> >
> > ->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > |   392 | next             in java.util.LinkedHashMap$EntryIterator
> > |   391 | next . . . . . . in     ''
> > |   199 | value            in grails.converters.JSON
> >
> >
> > This happens either on (map as JSON).toString() or map.encodeAsJSON().
> >
> > But it doesn't happen to all maps (they are different for each domain
> > instance being viewed).
> >
> > Any ideas?
> >
> > Thanks in advance,
> > Rodrigo.
> >
> > Em 14-02-2012 17:41, Gavin Yue escreveu:
> >
> > what is resource plugin version?
> >
> >
> > On Tue, Feb 14, 2012 at 2:35 PM, Rodrigo Rosenfeld Rosas
> > [hidden email] wrote:
> >>
> >> I'm experiencing some issues after the 2.0.1 release.
> >>
> >> In a view I'm getting ConcurrentModificationException from the Resources
> >> plugin.
> >>
> >> It doesn't happen for all records sent to the view, but only a few of
> >> them... Have no idea why it is happening and I can't create an example
> >> application reproducing the issue.
> >>
> >> Here is the stacktrace:
> >>
> >>
> >> | Error 2012-02-14 17:28:25,597 [http-bio-8081-exec-9] ERROR
> >> errors.GrailsExceptionResolver  - ConcurrentModificationException occurred
> >> when processing request: [GET] /myapp/mycontroller/view - parameters:
> >> id: 842
> >> Stacktrace follows:
> >> Message: Error processing GroovyPageView: Error executing tag <g:render>:
> >> Error executing tag <r:script>: java.util.ConcurrentModificationException
> >>   Line | Method
> >> ->>   8 | executeChain     in /grails-app/views/mycontroller/view.gsp
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>
> >> Caused by GrailsTagException: Error executing tag <g:render>: Error
> >> executing tag <r:script>: java.util.ConcurrentModificationException
> >> ->>   8 | doCall           in /grails-app/views/mycontroller/view.gsp
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>
> >> Caused by GrailsTagException: Error executing tag <r:script>:
> >> java.util.ConcurrentModificationException
> >> ->> 181 | run              in
> >> /grails-app/views/mydomain/_commonTemplates.gsp
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >>
> >> Caused by UnhandledException: java.util.ConcurrentModificationException
> >> ->> 2826 | valueOf          in java.lang.String
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >> |    99 | doCall           in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
> >> |   420 | doCall . . . . . in
> >> org.grails.plugin.resource.ResourceTagLib$_closure7
> >> |   102 | run              in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
> >> |    24 | doCall . . . . . in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
> >> |    27 | run              in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
> >> |   359 | executeChain . . in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |   275 | call             in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter$1
> >> |    90 | doCall . . . . . in
> >> org.apache.shiro.subject.support.SubjectCallable
> >> |    83 | call             in     ''
> >> |   344 | execute . . . .  in
> >> org.apache.shiro.subject.support.DelegatingSubject
> >> |   272 | doFilterInternal in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |    81 | doFilter . . . . in
> >> org.apache.shiro.web.servlet.OncePerRequestFilter
> >> |    55 | doFilter         in org.apache.shiro.grails.SavedRequestFilter
> >> |   886 | runTask . . . .  in
> >> java.util.concurrent.ThreadPoolExecutor$Worker
> >> |   908 | run              in     ''
> >> ^   662 | run . . . . . .  in java.lang.Thread
> >>
> >> Caused by ConcurrentModificationException: null
> >> ->> 373 | nextEntry        in java.util.LinkedHashMap$LinkedHashIterator
> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >> |   392 | next             in java.util.LinkedHashMap$EntryIterator
> >> |   391 | next . . . . . . in     ''
> >> |   199 | value            in grails.converters.JSON
> >> |   162 | convertAnother . in     ''
> >> |   199 | value            in     ''
> >> |   134 | render . . . . . in     ''
> >> |   2826 | valueOf          in java.lang.String
> >> |    99 | doCall . . . . . in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp$_run_closure9
> >> |   420 | doCall           in
> >> org.grails.plugin.resource.ResourceTagLib$_closure7
> >> |   102 | run . . . . . .  in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mydomain__commonTemplates_gsp
> >> |    24 | doCall           in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp$_run_closure1
> >> |    27 | run . . . . . .  in
> >> home_rodrigo_ecore_src_myapp_grails_app_views_mycontroller_view_gsp
> >> |   359 | executeChain     in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |   275 | call . . . . . . in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter$1
> >> |    90 | doCall           in
> >> org.apache.shiro.subject.support.SubjectCallable
> >> |    83 | call . . . . . . in     ''
> >> |   344 | execute          in
> >> org.apache.shiro.subject.support.DelegatingSubject
> >> |   272 | doFilterInternal in
> >> org.apache.shiro.web.servlet.AbstractShiroFilter
> >> |    81 | doFilter         in
> >> org.apache.shiro.web.servlet.OncePerRequestFilter
> >> |    55 | doFilter . . . . in org.apache.shiro.grails.SavedRequestFilter
> >> |   886 | runTask          in
> >> java.util.concurrent.ThreadPoolExecutor$Worker
> >> |   908 | run . . . . . .  in     ''
> >> ^   662 | run              in java.lang.Thread
> >>
> >>
> >> Any idea on this issue?
> >>
> >> Thanks in advance,
> >>
> >> Rodrigo.
> >>
> >> Em 14-02-2012 15:05, Graeme Rocher escreveu:
> >>>
> >>> Hi all,
> >>>
> >>> We're pleased to announce the release of Grails 2.0.1. Further
> >>> information below:
> >>>
> >>> Release Notes: http://grails.org/2.0.1+Release+Notes
> >>> Download: http://grails.org/Download
> >>>
> >>> This release contains around 80 bug fixes and improvements since
> >>> Grails 2.0 was released, hopefully improving the ability for folks to
> >>> upgrade from 1.x
> >>>
> >>> Enjoy
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>   http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> >
> >
> >
> >
>
>
>
> --
> Graeme Rocher
> Grails Project Lead
> SpringSource - A Division of VMware
> http://www.springsource.com
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

Graeme Rocher
Administrator
In reply to this post by furtivechris
They're available now

Cheers

On Wed, Feb 15, 2012 at 11:58 AM, furtivechris <[hidden email]> wrote:

> Thx for new release.
> When will 2.0.1 artifacts appear in Grails Artifactory repo?
> (http://repo.grails.org)
>
> I'm trying to diagnose some issues with the grails gradle plugin and would
> like to see if 2.0.1 changes anything.
> Cheers,
> Chris.
>
> -----
> Chris.
> http://squadpoint.com
> http://fabgirlfitness.com
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-0-1-Released-tp4387687p4390053.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

furtivechris
Strange, I can't see them through the artifactory web front end, and getting following trying to build:
                ::::::::::::::::::::::::::::::::::::::::::::::
                ::          UNRESOLVED DEPENDENCIES         ::
                ::::::::::::::::::::::::::::::::::::::::::::::
                :: org.grails#grails-crud;2.0.1: not found
                :: org.grails#grails-dependencies;2.0.1: not found
                :: org.grails#grails-resources;2.0.1: not found
                ::::::::::::::::::::::::::::::::::::::::::::::
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

Graeme Rocher
Administrator
Sorry, ran the wrong command in the build (uploadArchives instead of
uploadPublished). Please try now

Thanks

On Wed, Feb 15, 2012 at 12:29 PM, furtivechris <[hidden email]> wrote:

> Strange, I can't see them through the artifactory web front end, and getting
> following trying to build:
>                ::::::::::::::::::::::::::::::::::::::::::::::
>                ::          UNRESOLVED DEPENDENCIES         ::
>                ::::::::::::::::::::::::::::::::::::::::::::::
>                :: org.grails#grails-crud;2.0.1: not found
>                :: org.grails#grails-dependencies;2.0.1: not found
>                :: org.grails#grails-resources;2.0.1: not found
>                ::::::::::::::::::::::::::::::::::::::::::::::
>
>
> -----
> Chris.
> http://squadpoint.com
> http://fabgirlfitness.com
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-0-1-Released-tp4387687p4390114.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails 2.0.1 Released

furtivechris
That fixed crud and resources, but its still complaining about grails-dependencies (not sure if this is just a construct for consolidating other dependencies and whether its still needed for 2.0.1...?)
                ::::::::::::::::::::::::::::::::::::::::::::::
                ::          UNRESOLVED DEPENDENCIES         ::
                ::::::::::::::::::::::::::::::::::::::::::::::
                :: org.grails#grails-dependencies;2.0.1: not found
                ::::::::::::::::::::::::::::::::::::::::::::::
 
Graeme Rocher-4 wrote
Sorry, ran the wrong command in the build (uploadArchives instead of
uploadPublished). Please try now

Thanks

On Wed, Feb 15, 2012 at 12:29 PM, furtivechris <[hidden email]> wrote:
> Strange, I can't see them through the artifactory web front end, and getting
> following trying to build:
>                ::::::::::::::::::::::::::::::::::::::::::::::
>                ::          UNRESOLVED DEPENDENCIES         ::
>                ::::::::::::::::::::::::::::::::::::::::::::::
>                :: org.grails#grails-crud;2.0.1: not found
>                :: org.grails#grails-dependencies;2.0.1: not found
>                :: org.grails#grails-resources;2.0.1: not found
>                ::::::::::::::::::::::::::::::::::::::::::::::
>
>
> -----
> Chris.
> http://squadpoint.com
> http://fabgirlfitness.com
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-2-0-1-Released-tp4387687p4390114.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
12
Loading...