Marshallers are blowing up in 2.3.5 - anyone else?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Marshallers are blowing up in 2.3.5 - anyone else?

quad64bit
We have a pile of grails apps that constitute an API-driven system. Recently, we have been getting tons of errors involving object marshaling:

Error org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
...
Caused by: java.lang.IllegalAccessException: Class org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller can not access a member of class org.springframework.beans.GenericTypeAwarePropertyDescriptor with modifiers "public"

I have been unable to track down the cause, and reproducing it involves the most convoluted process which is different for every application having the error. For instance, if I make a read-only rest call (GET, json) to a resource in the browser or rest client, everything is peachy. But if I then call the same service from within another grails application, suddenly, it starts throwing tons of the above errors.

To make things even more strange, once I have called the service from the other application and produced the error, the original (working) rest call from browser/client now also fails... until I restart the app. It's like the bad call is corrupting something in memory. I realize the description is super vague, and I've spent the better part of 12 hours trying to create a simplified example test case without success.

The only thing I've managed to figure out, is that if I remove the custom marshallers I've implemented, then the problem completely goes away. Adding to my frustration is that I have been unable to reproduce the problem in a clean project - custom marshallers and all.

I just want to know if anyone else as been having any similar issues.
Here is an example stack trace:

| Error org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:66)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:34)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.ArrayMarshaller.marshalObject(ArrayMarshaller.java:41)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.ArrayMarshaller.marshalObject(ArrayMarshaller.java:30)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:50)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:34)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:67)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:39)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:67)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:39)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:41)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:30)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:67)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:39)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.ProxyUnwrappingMarshaller.marshalObject(ProxyUnwrappingMarshaller.java:48)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:41)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:30)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.convertAnother(JSON.java:161)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.MapMarshaller.marshalObject(MapMarshaller.java:45)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.MapMarshaller.marshalObject(MapMarshaller.java:30)
| Error at grails.converters.JSON.value(JSON.java:201)
| Error at grails.converters.JSON.render(JSON.java:133)
| Error at org.grails.plugins.web.rest.render.json.DefaultJsonRenderer.renderJson(DefaultJsonRenderer.groovy:116)
| Error at org.grails.plugins.web.rest.render.json.DefaultJsonRenderer.renderJson(DefaultJsonRenderer.groovy:110)
| Error at org.grails.plugins.web.rest.render.json.DefaultJsonRenderer.render(DefaultJsonRenderer.groovy:91)
| Error at org.grails.plugins.web.rest.api.ControllersRestApi.respond(ControllersRestApi.groovy:160)
| Error at org.grails.plugins.web.rest.api.ControllersRestApi.respond(ControllersRestApi.groovy)
| Error at tagcloud.TagController$$EOVQCZVw.respond(TagController.groovy)
| Error at tagcloud.TagController$$DOVQCZVw.respond(Unknown Source)
| Error at tagcloud.TagController.respond(TagController.groovy)
| Error at tagcloud.TagController$respond.callCurrent(Unknown Source)
| Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
| Error at tagcloud.TagController$$EOVQCZVw.$tt__getTagsForSyndicationId(TagController.groovy:185)
| Error at tagcloud.TagController$$DOVQCZVw.$tt__getTagsForSyndicationId(Unknown Source)
| Error at tagcloud.TagController.$tt__getTagsForSyndicationId(TagController.groovy)
| Error at tagcloud.TagController$_getTagsForSyndicationId_closure12$$EOVQCZVw.doCall(TagController.groovy)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:606)
| Error at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:122)
| Error at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1283)
| Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
| Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
| Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
| Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
| Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
| Error at groovy.lang.Closure.call(Closure.java:411)
| Error at tagcloud.TagController$_getTagsForSyndicationId_closure12.call(TagController.groovy)
| Error at groovy.lang.Closure.call(Closure.java:427)
| Error at tagcloud.TagController$_getTagsForSyndicationId_closure12.call(TagController.groovy)
| Error at org.codehaus.groovy.grails.orm.support.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:60)
| Error at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
| Error at org.codehaus.groovy.grails.orm.support.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:57)
| Error at tagcloud.TagController$$EOVQCZVw.getTagsForSyndicationId(TagController.groovy)
| Error at tagcloud.TagController$$DOVQCZVw.getTagsForSyndicationId(Unknown Source)
| Error at tagcloud.TagController.getTagsForSyndicationId(TagController.groovy)
| Error at tagcloud.TagController$$EOVQCZVw.getTagsForSyndicationId(TagController.groovy)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:606)
| Error at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:122)
| Error at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1283)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:150)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:357)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:234)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:200)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:121)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
| Error at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
| Error at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:348)
| Error at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
| Error at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
| Error at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
| Error at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
| Error at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
| Error at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)
| Error at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
| Error at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
| Error at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
| Error at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
| Error at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
| Error at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
| Error at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:330)
| Error at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:295)
| Error at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:286)
| Error at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:217)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.executeFilterChainWithWrappedResponse(GrailsPageFilter.java:233)
| Error at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:208)
| Error at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:153)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at javax.servlet.FilterChain$doFilter$0.call(Unknown Source)
| Error at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:45)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
| Error at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
| Error at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
| Error at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
| Error at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
| Error at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
| Error at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
| Error at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
| Error at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
| Error at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
| Error at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
| Error at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
| Error at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
| Error at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
| Error at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
| Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error at java.lang.Thread.run(Thread.java:744)
| Error Caused by: java.lang.IllegalAccessException: Class org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller can not access a member of class org.springframework.beans.GenericTypeAwarePropertyDescriptor with modifiers "public"
| Error at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:109)
| Error at org.springsource.loaded.jvm.JVM.ensureMemberAccess(JVM.java:103)
| Error at org.springsource.loaded.ri.ReflectiveInterceptor.asAccessibleMethod(ReflectiveInterceptor.java:534)
| Error at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
| Error at org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:48)
| Error ... 157 more

And here is a very simple marshaller example I use, loaded from bootstrap:
class TagMappingMarshaller {

    TagMappingMarshaller(){
        JSON.registerObjectMarshaller(Tag){ Tag tag ->
            [
                    id: tag.id,
                    name: tag.name,
                    language: tag.language?.value
            ]
        }
    }
}

Thanks for any insight you can provide!
Reply | Threaded
Open this post in threaded view
|

Re: Marshallers are blowing up in 2.3.5 - anyone else?

Graeme Rocher-2
Might be a spring version conflict, otherwise please provide an
example in a JIRA issue

On Mon, Feb 10, 2014 at 1:58 AM, quad64bit <[hidden email]> wrote:

> We have a pile of grails apps that constitute an API-driven system. Recently,
> we have been getting tons of errors involving object marshaling:
>
> Error
> org.codehaus.groovy.grails.web.converters.exceptions.ConverterException:
> Error converting Bean with class
> org.springframework.beans.GenericTypeAwarePropertyDescriptor
> ...
> Caused by: java.lang.IllegalAccessException: Class
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller
> can not access a member of class
> org.springframework.beans.GenericTypeAwarePropertyDescriptor with modifiers
> "public"
>
> I have been unable to track down the cause, and reproducing it involves the
> most convoluted process which is different for every application having the
> error. For instance, if I make a read-only rest call (GET, json) to a
> resource in the browser or rest client, everything is peachy. But if I then
> call the same service from within another grails application, suddenly, it
> starts throwing tons of the above errors.
>
> To make things even more strange, once I have called the service from the
> other application and produced the error, the original (working) rest call
> from browser/client now also fails... until I restart the app. It's like the
> bad call is corrupting something in memory. I realize the description is
> super vague, and I've spent the better part of 12 hours trying to create a
> simplified example test case without success.
>
> The only thing I've managed to figure out, is that if I remove the custom
> marshallers I've implemented, then the problem completely goes away. Adding
> to my frustration is that I have been unable to reproduce the problem in a
> clean project - custom marshallers and all.
>
> I just want to know if anyone else as been having any similar issues.
> Here is an example stack trace:
>
> | Error
> org.codehaus.groovy.grails.web.converters.exceptions.ConverterException:
> Error converting Bean with class
> org.springframework.beans.GenericTypeAwarePropertyDescriptor
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:66)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:34)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.ArrayMarshaller.marshalObject(ArrayMarshaller.java:41)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.ArrayMarshaller.marshalObject(ArrayMarshaller.java:30)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:50)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:34)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:67)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:39)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:67)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:39)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:41)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:30)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:67)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GroovyBeanMarshaller.marshalObject(GroovyBeanMarshaller.java:39)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.ProxyUnwrappingMarshaller.marshalObject(ProxyUnwrappingMarshaller.java:48)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:41)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.CollectionMarshaller.marshalObject(CollectionMarshaller.java:30)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.convertAnother(JSON.java:161)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.MapMarshaller.marshalObject(MapMarshaller.java:45)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.MapMarshaller.marshalObject(MapMarshaller.java:30)
> | Error         at grails.converters.JSON.value(JSON.java:201)
> | Error         at grails.converters.JSON.render(JSON.java:133)
> | Error         at
> org.grails.plugins.web.rest.render.json.DefaultJsonRenderer.renderJson(DefaultJsonRenderer.groovy:116)
> | Error         at
> org.grails.plugins.web.rest.render.json.DefaultJsonRenderer.renderJson(DefaultJsonRenderer.groovy:110)
> | Error         at
> org.grails.plugins.web.rest.render.json.DefaultJsonRenderer.render(DefaultJsonRenderer.groovy:91)
> | Error         at
> org.grails.plugins.web.rest.api.ControllersRestApi.respond(ControllersRestApi.groovy:160)
> | Error         at
> org.grails.plugins.web.rest.api.ControllersRestApi.respond(ControllersRestApi.groovy)
> | Error         at tagcloud.TagController$$EOVQCZVw.respond(TagController.groovy)
> | Error         at tagcloud.TagController$$DOVQCZVw.respond(Unknown Source)
> | Error         at tagcloud.TagController.respond(TagController.groovy)
> | Error         at tagcloud.TagController$respond.callCurrent(Unknown Source)
> | Error         at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
> | Error         at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
> | Error         at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
> | Error         at
> tagcloud.TagController$$EOVQCZVw.$tt__getTagsForSyndicationId(TagController.groovy:185)
> | Error         at
> tagcloud.TagController$$DOVQCZVw.$tt__getTagsForSyndicationId(Unknown
> Source)
> | Error         at
> tagcloud.TagController.$tt__getTagsForSyndicationId(TagController.groovy)
> | Error         at
> tagcloud.TagController$_getTagsForSyndicationId_closure12$$EOVQCZVw.doCall(TagController.groovy)
> | Error         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> | Error         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> | Error         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> | Error         at java.lang.reflect.Method.invoke(Method.java:606)
> | Error         at
> org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:122)
> | Error         at
> org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1283)
> | Error         at
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> | Error         at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
> | Error         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
> | Error         at
> groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
> | Error         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
> | Error         at groovy.lang.Closure.call(Closure.java:411)
> | Error         at
> tagcloud.TagController$_getTagsForSyndicationId_closure12.call(TagController.groovy)
> | Error         at groovy.lang.Closure.call(Closure.java:427)
> | Error         at
> tagcloud.TagController$_getTagsForSyndicationId_closure12.call(TagController.groovy)
> | Error         at
> org.codehaus.groovy.grails.orm.support.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:60)
> | Error         at
> org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
> | Error         at
> org.codehaus.groovy.grails.orm.support.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:57)
> | Error         at
> tagcloud.TagController$$EOVQCZVw.getTagsForSyndicationId(TagController.groovy)
> | Error         at tagcloud.TagController$$DOVQCZVw.getTagsForSyndicationId(Unknown
> Source)
> | Error         at
> tagcloud.TagController.getTagsForSyndicationId(TagController.groovy)
> | Error         at
> tagcloud.TagController$$EOVQCZVw.getTagsForSyndicationId(TagController.groovy)
> | Error         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> | Error         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> | Error         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> | Error         at java.lang.reflect.Method.invoke(Method.java:606)
> | Error         at
> org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:122)
> | Error         at
> org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1283)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(MixedGrailsControllerHelper.java:150)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleAction(AbstractGrailsControllerHelper.java:357)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:234)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:200)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:121)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72)
> | Error         at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:348)
> | Error         at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
> | Error         at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
> | Error         at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
> | Error         at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> | Error         at
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
> | Error         at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)
> | Error         at
> grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
> | Error         at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
> | Error         at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
> | Error         at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
> | Error         at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
> | Error         at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
> | Error         at
> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:330)
> | Error         at
> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:295)
> | Error         at
> org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:286)
> | Error         at
> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:217)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.executeFilterChainWithWrappedResponse(GrailsPageFilter.java:233)
> | Error         at
> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:208)
> | Error         at
> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:153)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at javax.servlet.FilterChain$doFilter$0.call(Unknown Source)
> | Error         at
> org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:45)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> | Error         at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
> | Error         at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
> | Error         at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> | Error         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> | Error         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> | Error         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> | Error         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> | Error         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> | Error         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> | Error         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
> | Error         at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
> | Error         at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> | Error         at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
> | Error         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> | Error         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> | Error         at java.lang.Thread.run(Thread.java:744)
> | Error Caused by: java.lang.IllegalAccessException: Class
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller
> can not access a member of class
> org.springframework.beans.GenericTypeAwarePropertyDescriptor with modifiers
> "public"
> | Error         at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:109)
> | Error         at org.springsource.loaded.jvm.JVM.ensureMemberAccess(JVM.java:103)
> | Error         at
> org.springsource.loaded.ri.ReflectiveInterceptor.asAccessibleMethod(ReflectiveInterceptor.java:534)
> | Error         at
> org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
> | Error         at
> org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller.marshalObject(GenericJavaBeanMarshaller.java:48)
> | Error         ... 157 more
>
> And here is a very simple marshaller example I use, loaded from bootstrap:
> class TagMappingMarshaller {
>
>     TagMappingMarshaller(){
>         JSON.registerObjectMarshaller(Tag){ Tag tag ->
>             [
>                     id: tag.id,
>                     name: tag.name,
>                     language: tag.language?.value
>             ]
>         }
>     }
> }
>
> Thanks for any insight you can provide!
>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Marshallers-are-blowing-up-in-2-3-5-anyone-else-tp4653954.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

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Marshallers are blowing up in 2.3.5 - anyone else?

scsosna99
In reply to this post by quad64bit
I am seeing the same, on a new 2.3.5 app, no custom marshallers, it's working fine until I trigger an action and then suddenly I can't marshall it anymore, no idea why.
Reply | Threaded
Open this post in threaded view
|

Re: Marshallers are blowing up in 2.3.5 - anyone else?

doron
I have the same issue with a 2.3.7 app (no custom marshallers).
Everything works fine until I am issuing a rest call (using rest-client-builder:2.0.0), after that I am starting to get that exception trying to marshall a simple json.

2014-07-08 15:42:44,219 [http-bio-8080-exec-10] ERROR errors.GrailsExceptionResolver  - IllegalAccessException occurred when processing request: [GET] /EnvironMint-DesignTime/TopologyEditor - parameters:
topologyInstanceId: 1
Class org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller can not access a member of class org.springframework.beans.GenericTypeAwarePropertyDescriptor with modifiers "public". Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:javascript>: Error evaluating expression [graphStyles.encodeAsJSON()] on line [22]: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
    Line | Method
->>  530 | doFilter  in /grails-app/views/topologyEditor/index.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:render>: Error executing tag <g:javascript>: Error evaluating expression [graphStyles.encodeAsJSON()] on line [22]: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
->>  140 | doCall    in /grails-app/views/topologyEditor/index.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GrailsTagException: Error executing tag <g:javascript>: Error evaluating expression [graphStyles.encodeAsJSON()] on line [22]: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
->>    1 | run       in /grails-app/views/topologyEditor/_mxGraphExtensionsJS.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by GroovyPagesException: Error evaluating expression [graphStyles.encodeAsJSON()] on line [22]: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
->>   22 | doCall    in /grails-app/views/topologyEditor/_mxGraphExtensionsJS.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Caused by UnhandledException: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
->>   22 | doCall    in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor__mxGraphExtensionsJS_gsp$_run_closure1_closure15
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    460 | doCall    in org.grails.plugin.resource.ResourceTagLib$_closure7
|      1 | run . . . in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor__mxGraphExtensionsJS_gsp
|    140 | doCall    in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor_index_gsp$_run_closure2
|    142 | run . . . in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor_index_gsp
|    195 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter  in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter  in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter  in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . in java.lang.Thread

Caused by ConverterException: Error converting Bean with class org.springframework.beans.GenericTypeAwarePropertyDescriptor
->>  201 | value     in grails.converters.JSON
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    133 | render    in     ''
|     22 | doCall .  in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor__mxGraphExtensionsJS_gsp$_run_closure1_closure15
|    460 | doCall    in org.grails.plugin.resource.ResourceTagLib$_closure7
|      1 | run . . . in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor__mxGraphExtensionsJS_gsp
|    140 | doCall    in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor_index_gsp$_run_closure2
|    142 | run . . . in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor_index_gsp
|    195 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter  in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter  in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter  in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . in java.lang.Thread

Caused by IllegalAccessException: Class org.codehaus.groovy.grails.web.converters.marshaller.json.GenericJavaBeanMarshaller can not access a member of class org.springframework.beans.GenericTypeAwarePropertyDescriptor with modifiers "public"
->>  201 | value     in grails.converters.JSON
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    161 | convertAnother in     ''
|    201 | value . . in     ''
|    133 | render    in     ''
|     22 | doCall .  in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor__mxGraphExtensionsJS_gsp$_run_closure1_closure15
|    460 | doCall    in org.grails.plugin.resource.ResourceTagLib$_closure7
|      1 | run . . . in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor__mxGraphExtensionsJS_gsp
|    140 | doCall    in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor_index_gsp$_run_closure2
|    142 | run . . . in Users_doronmanor_Documents_dev_projects_multiple_mints_environmint_ui_EnvironMint_DesignTime_grails_app_views_topologyEditor_index_gsp
|    195 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter  in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter  in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter  in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . in java.lang.Thread
Reply | Threaded
Open this post in threaded view
|

Re: Marshallers are blowing up in 2.3.5 - anyone else?

catlin
I was having the same issue using Rest Builder Client plugin and Grails 2.3.11, where after any RestBuilder action, custom JSON marshallers were being destroyed.  I managed to figure out what was going on (in my case) and hopefully in the rest of the above cases.  

The problem is in the RestBuilder constructor, in particular, the line:

if(ConvertersConfigurationHolder.getConverterConfiguration(JSON) instanceof DefaultConverterConfiguration) {
            // init manually
            new ConvertersConfigurationInitializer().initialize(new DefaultGrailsApplication())
        }

What it does is, checks to see if the JSON ConverterConfiguration is of a Default class type, and if it is, it reinitializes it.  Unfortunately, at least in Grails 2.3.11, when you register a custom JSON marshaller, Grails checks to see if the JSON ConverterConfiguration is NOT a Default class type, and if so, converts it to the Default class type.  Then, because the ConverterConfiguration is now a Default class type, then the RestBuilder constructor will reinitialize it, destroying any custom JSON marshallers that were registered.  A vicious cycle.  

This can also affect people who have not registered any custom marshallers, since, at least in my Grails 2.3.11, there are more JSON marshallers registered than are created by the default initialization (I'm assuming added by other plugins).  

The solution I am currently using for the time being, is, after registering the custom marshallers in Bootstrap.groovy, I make sure to pull out the JSON ConverterConfiguration object, and then put it back in as a ChainedConverterConfiguration class, so it will no longer be the Default class type:

DefaultConverterConfiguration<JSON> cfg = (DefaultConverterConfiguration<JSON>)ConvertersConfigurationHolder.getConverterConfiguration(JSON)
        ConvertersConfigurationHolder.setDefaultConfiguration(JSON.class, new ChainedConverterConfiguration<JSON>(cfg, cfg.proxyHandler));

This seems to preserves any custom JSON Marshallers, as well as any added from plugins, and ensures that the RestBuilder constructor will not try and reinitialize the JSON marshallers.  Don't know if it is the best solution, but if appears to work.
Reply | Threaded
Open this post in threaded view
|

Re: Marshallers are blowing up in 2.3.5 - anyone else?

tcrossland
Having the same issue with Grails 2.4.2.

Created https://jira.grails.org/browse/GRAILS-11801.
Reply | Threaded
Open this post in threaded view
|

Re: Marshallers are blowing up in 2.3.5 - anyone else?

Maix
Quick fix is to use bean instead of creating with new RestBuilder().
Put bean definition in resources.groovy and use Dependecy Injection:
restBuilder(grails.plugins.rest.client.RestBuilder)