gdsflex 0.8.5 plugin - SpringValidationException converter doesn't work for me

68 views
Skip to first unread message

Oleksandr Barabanov

unread,
Oct 14, 2011, 10:18:32 AM10/14/11
to gran...@googlegroups.com
Hi,
I've been struggling with this problem over last 2-3 days, but it never worrks for me :(( I need your help Guys !

It's a common situation. I need to handle server-side validation errors in my Flex app. The worst thing is, that I was using this for ages (one of my previous projects uses gdsflex 0.7.2 and everything was ok) - but now I can't make it work :((

I'm on Grails 1.3.7 + gdsflex 0.8.5 (plus spring-security plugins installed), and on Flex 4.5.1.
Here is my service:
import org.granite.tide.annotations.TideEnabled
import org.granite.tide.spring.SpringValidationException


@TideEnabled
class TournamentCreatorService {

    static transactional = true

   
    def create(Tournament entity) {
        
        log.trace "parameter: $entity"
        
        assert entity != null
        
        // 'validation first' approach:
        if( !entity.validate() )
        {
            //entity.errors.each {
            log.error "-----------------------------------------------------------------------"
            log.error "VALIDATION ERRORS:"
            entity.errors.allErrors.each {
                log.error "$it"
            }
            log.error "-----------------------------------------------------------------------"

            // specific exception must be thrown, in order GDS Tide converts it properly
            throw new SpringValidationException( entity.errors );
        }
        def result = entity.save( validate: false, flush: true )
        log.debug "SAVED: ${result}"
        return result
    }
}
 Then, here's what's in the server-side console:
2011-10-14 15:55:55,620 [http-8080-1] TRACE tournami.TournamentCreatorService  - parameter: com.tournami.Tournament : null
2011-10-14 15:55:55,905 [http-8080-1] ERROR tournami.TournamentCreatorService  - -----------------------------------------------------------------------
2011-10-14 15:55:55,905 [http-8080-1] ERROR tournami.TournamentCreatorService  - VALIDATION ERRORS:
2011-10-14 15:55:55,928 [http-8080-1] ERROR tournami.TournamentCreatorService  - Field error in object 'com.tournami.Tournament' on field 'callForEntryDurationDays': rejected value [null]; codes [com.tournami.Tournament.callForEntryDurationDays.nullable.error.com.tournami.Tournament.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.error.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.error.java.lang.Integer,com.tournami.Tournament.callForEntryDurationDays.nullable.error,tournament.callForEntryDurationDays.nullable.error.com.tournami.Tournament.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.error.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.error.java.lang.Integer,tournament.callForEntryDurationDays.nullable.error,com.tournami.Tournament.callForEntryDurationDays.nullable.com.tournami.Tournament.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.java.lang.Integer,com.tournami.Tournament.callForEntryDurationDays.nullable,tournament.callForEntryDurationDays.nullable.com.tournami.Tournament.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.java.lang.Integer,tournament.callForEntryDurationDays.nullable,nullable.com.tournami.Tournament.callForEntryDurationDays,nullable.callForEntryDurationDays,nullable.java.lang.Integer,nullable]; arguments [callForEntryDurationDays,class com.tournami.Tournament]; default message [Поле [{0}] класса [{1}] не может иметь значение null]
2011-10-14 15:55:55,928 [http-8080-1] ERROR tournami.TournamentCreatorService  - Field error in object 'com.tournami.Tournament' on field 'callForEntryMessage': rejected value [null]; codes [com.tournami.Tournament.callForEntryMessage.nullable.error.com.tournami.Tournament.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.error.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.error.java.lang.String,com.tournami.Tournament.callForEntryMessage.nullable.error,tournament.callForEntryMessage.nullable.error.com.tournami.Tournament.callForEntryMessage,tournament.callForEntryMessage.nullable.error.callForEntryMessage,tournament.callForEntryMessage.nullable.error.java.lang.String,tournament.callForEntryMessage.nullable.error,com.tournami.Tournament.callForEntryMessage.nullable.com.tournami.Tournament.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.java.lang.String,com.tournami.Tournament.callForEntryMessage.nullable,tournament.callForEntryMessage.nullable.com.tournami.Tournament.callForEntryMessage,tournament.callForEntryMessage.nullable.callForEntryMessage,tournament.callForEntryMessage.nullable.java.lang.String,tournament.callForEntryMessage.nullable,nullable.com.tournami.Tournament.callForEntryMessage,nullable.callForEntryMessage,nullable.java.lang.String,nullable]; arguments [callForEntryMessage,class com.tournami.Tournament]; default message [Поле [{0}] класса [{1}] не может иметь значение null]
2011-10-14 15:55:55,929 [http-8080-1] ERROR tournami.TournamentCreatorService  - -----------------------------------------------------------------------
2011-10-14 15:55:56,288 [http-8080-1] ERROR service.DefaultServiceExceptionHandler  - Could not process remoting message: flex.messaging.messages.RemotingMessage {
  source = null
  operation = invokeComponent
  remoteUsername = null
  remotePassword = null
  correlationId = null
  destination = spring
  headers = {DSId=4760CAB9-8955-4B60-8739-862DDF661E9D, DSEndpoint=my-graniteamf}
  messageId = 53EDFA7B-B6EC-99B0-5D3F-0280CB4D5766
  timestamp = 0
  clientId = null
  timeToLive = 0
  body = [tournamentCreatorService, null, create, [Ljava.lang.Object;@11c73d3, org.granite.tide.invocation.InvocationCall{
    listeners: []
    updates: []
    results: []
}]
}
java.lang.reflect.UndeclaredThrowableException
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$24eea611.create(<generated>)
    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterChain(UrlMappingsFilter.java:287)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:205)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:245)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:134)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal(GrailsReloadServletFilter.java:104)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:112)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    at org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:40)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:65)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)
Caused by: org.granite.tide.spring.SpringValidationException
    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 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:52)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198)
    at com.tournami.TournamentCreatorService.create(TournamentCreatorService.groovy:33)
    at com.tournami.TournamentCreatorService$$FastClassByCGLIB$$e8dd14c.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
    ... 81 more

Then, what's in Flex trace console:
TEST: tournament creation
CREATE: started
-- re-register listener for event: invalid
[object TournamentCreateCommand].execute():
CREATE: fault
FAULT: [RPC Fault faultString="" faultCode="Validation.Failed" faultDetail="
- destination: spring
- method: public final java.lang.Object com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$24eea611.create(com.tournami.Tournament)
- exception: java.lang.reflect.UndeclaredThrowableException
org.granite.messaging.service.ServiceException
    at org.granite.tide.spring.SpringValidationExceptionConverter.convert(SpringValidationExceptionConverter.java:54)
    at org.granite.messaging.service.ExtendedServiceExceptionHandler.getServiceException(ExtendedServiceExceptionHandler.java:98)
    at org.granite.messaging.service.AbstractServiceExceptionHandler.getServiceException(AbstractServiceExceptionHandler.java:46)
    at org.granite.messaging.service.DefaultServiceExceptionHandler.handleInvocationException(DefaultServiceExceptionHandler.java:64)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:173)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterChain(UrlMappingsFilter.java:287)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:205)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:245)
    at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:134)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal(GrailsReloadServletFilter.java:104)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:112)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    at org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:40)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:65)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    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:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)
Caused by: org.granite.tide.spring.SpringValidationException
    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 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:52)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198)
    at com.tournami.TournamentCreatorService.create(TournamentCreatorService.groovy:33)
    at com.tournami.TournamentCreatorService$$FastClassByCGLIB$$e8dd14c.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$24eea611.create(<generated>)
    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    ... 72 more
"]
VALIDATION: failed

I'm registering:
ctx.addEventListener(TideValidatorEvent.INVALID, handlerValidation);

private function handlerValidation(event:TideValidatorEvent):void
- but that handlerValidation never being called. Hence, I have no access to TideValidatorEvent.invalidValues and can't do what I've been doing before (well it's pretty the same like it described under DOC/6.+Data+Validation ), like:
            private function handlerValidation(event:TideValidatorEvent):void
            {
                trace("handlerValidation(): event:", event);
               
                var message:String = "";
                message += "Properties which are not valid:";
                message += "\n";
                message += "\n";
               
                for each (var iv:Object in event.invalidValues)//invalidValues)
                {
                    var invalidValue:InvalidValue = iv as InvalidValue;
                   
                    //message += "object: " + invalidValue.bean;
                    message += "property: [" + invalidValue.path + "] ";
                    message += "\n";
                    message += "value: [" + invalidValue.value + "] ";
                    message += "\n";
                    message += "description: " + invalidValue.message;
                    message += "\n";
                    //message += "\n";
                }
                //ErrorPopupBase.show( "VALIDATION ERROR:\n\n" + message, this, "CREATE Style");
                Alert.show( message, "Validation Errors" );
}
That's a problem. Can somebody explain me what's has changed since previous plugin's version ? Or, is this again a bug similar to one (http://www.graniteds.org/jira/browse/GDSFLEX-20) I reported last year ? Something missed under the hood ?

Please advise.
Thanks in advance !

Oleksandr Barabanov

unread,
Oct 14, 2011, 11:30:10 AM10/14/11
to gran...@googlegroups.com
If it helps, here is the log with:
debug   'org.granite.messaging.service',
            'org.granite.messaging.amf.process'

I dunno, but why there is configured:
2011-10-14 18:03:57,393 [http-8080-1] DEBUG service.ServiceFactory  - << Returning factory: org.granite.tide.spring.SpringServiceFactory@745955 {
  serviceExceptionHandler: org.granite.messaging.service.ExtendedServiceExceptionHandler@951520
}

but then service.DefaultServiceExceptionHandler reports an ERROR ? Should it be like that ? Instead of configured ExtendedServiceExceptionHandler ?

Log:
 
2011-10-14 18:03:55,407 [http-8080-1] DEBUG process.AMF0MessageProcessor  - >> Processing AMF0 request:
org.granite.messaging.amf.AMF0Message {
  version = 3
  headers = []
  bodies = [
    org.granite.messaging.amf.AMF0Body {
      target = null
      serviceName = null
      serviceMethodName = null
      response = /1
      type = ARRAY
      value = [
        flex.messaging.messages.CommandMessage {
          messageRefType: null
          operation: CLIENT_PING
          correlationId =
          destination =
          headers = {DSMessagingVersion=1, DSId=nil}
          messageId = C2126DBA-75CD-C42A-E9DB-02F5FC6751B3

          timestamp = 0
          clientId = null
          timeToLive = 0
          body = {}
        }
      ]
    }
  ]
}
2011-10-14 18:03:55,407 [http-8080-1] DEBUG process.AMF0MessageProcessor  - >> Processing AMF3 request:
flex.messaging.messages.CommandMessage {
  messageRefType: null
  operation: CLIENT_PING
  correlationId =
  destination =
  headers = {DSMessagingVersion=1, DSId=nil}
  messageId = C2126DBA-75CD-C42A-E9DB-02F5FC6751B3

  timestamp = 0
  clientId = null
  timeToLive = 0
  body = {}
}
2011-10-14 18:03:55,409 [http-8080-1] DEBUG process.AMF3MessageProcessor  - >> Processing AMF3 request:
flex.messaging.messages.CommandMessage {
  messageRefType: null
  operation: CLIENT_PING
  correlationId =
  destination =
  headers = {DSMessagingVersion=1, DSId=nil}
  messageId = C2126DBA-75CD-C42A-E9DB-02F5FC6751B3

  timestamp = 0
  clientId = null
  timeToLive = 0
  body = {}
}
2011-10-14 18:03:55,409 [http-8080-1] DEBUG process.AMF3MessageProcessor  - << Returning AMF3 response:
flex.messaging.messages.AcknowledgeMessage {
  correlationId = C2126DBA-75CD-C42A-E9DB-02F5FC6751B3
  destination = null
  headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01}
  messageId = 21F99D55-7FAE-420F-8806-6116B7E82D9F
  timestamp = 1318604635409
  clientId = 6D234543-D6A5-4337-B92A-DDBF66055862
  timeToLive = 0
  body = null
}
2011-10-14 18:03:55,410 [http-8080-1] DEBUG process.AMF0MessageProcessor  - << Got AMF3 response:
flex.messaging.messages.AcknowledgeMessage {
  correlationId = C2126DBA-75CD-C42A-E9DB-02F5FC6751B3
  destination = null
  headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01}
  messageId = 21F99D55-7FAE-420F-8806-6116B7E82D9F
  timestamp = 1318604635409
  clientId = 6D234543-D6A5-4337-B92A-DDBF66055862
  timeToLive = 0
  body = null
}
2011-10-14 18:03:55,410 [http-8080-1] DEBUG process.AMF0MessageProcessor  - << Returning AMF0 response:
org.granite.messaging.amf.AMF0Message {
  version = 3
  headers = []
  bodies = [
    org.granite.messaging.amf.AMF0Body {
      target = /1/onResult
      serviceName = null
      serviceMethodName = null
      response =
      type = AMF3_OBJECT
      value = flex.messaging.messages.AcknowledgeMessage {
        correlationId = C2126DBA-75CD-C42A-E9DB-02F5FC6751B3
        destination = null
        headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01}
        messageId = 21F99D55-7FAE-420F-8806-6116B7E82D9F
        timestamp = 1318604635409
        clientId = 6D234543-D6A5-4337-B92A-DDBF66055862
        timeToLive = 0
        body = null
      }
    }
  ]
}
2011-10-14 18:03:55,499 [http-8080-1] DEBUG process.AMF0MessageProcessor  - >> Processing AMF0 request:
org.granite.messaging.amf.AMF0Message {
  version = 3
  headers = []
  bodies = [
    org.granite.messaging.amf.AMF0Body {
      target = null
      serviceName = null
      serviceMethodName = null
      response = /2
      type = ARRAY
      value = [

        flex.messaging.messages.RemotingMessage {
          source = null
          operation = invokeComponent
          remoteUsername = null
          remotePassword = null
          correlationId = null
          destination = spring
          headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01, DSEndpoint=my-graniteamf}
          messageId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6

          timestamp = 0
          clientId = null
          timeToLive = 0
          body = [tournamentCreatorService, null, create, [Ljava.lang.Object;@18f5e80, org.granite.tide.invocation.InvocationCall{
    listeners: []
    updates: []
    results: []
}]
        }
      ]
    }
  ]
}
2011-10-14 18:03:55,500 [http-8080-1] DEBUG process.AMF0MessageProcessor  - >> Processing AMF3 request:

flex.messaging.messages.RemotingMessage {
  source = null
  operation = invokeComponent
  remoteUsername = null
  remotePassword = null
  correlationId = null
  destination = spring
  headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01, DSEndpoint=my-graniteamf}
  messageId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6

  timestamp = 0
  clientId = null
  timeToLive = 0
  body = [tournamentCreatorService, null, create, [Ljava.lang.Object;@18f5e80, org.granite.tide.invocation.InvocationCall{
    listeners: []
    updates: []
    results: []
}]
}
2011-10-14 18:03:55,500 [http-8080-1] DEBUG process.AMF3MessageProcessor  - >> Processing AMF3 request:

flex.messaging.messages.RemotingMessage {
  source = null
  operation = invokeComponent
  remoteUsername = null
  remotePassword = null
  correlationId = null
  destination = spring
  headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01, DSEndpoint=my-graniteamf}
  messageId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6

  timestamp = 0
  clientId = null
  timeToLive = 0
  body = [tournamentCreatorService, null, create, [Ljava.lang.Object;@18f5e80, org.granite.tide.invocation.InvocationCall{
    listeners: []
    updates: []
    results: []
}]
}
2011-10-14 18:03:55,500 [http-8080-1] DEBUG service.ServiceFactory  - >> Finding factoryId for messageType: "flex.messaging.messages.RemotingMessage" and destinationId: "spring"
2011-10-14 18:03:55,501 [http-8080-1] DEBUG service.ServiceFactory  - >> Found factoryId: "tideSpringFactory"
2011-10-14 18:03:55,502 [http-8080-1] DEBUG service.ServiceFactory  - >> No cached factory for: "tideSpringFactory"
2011-10-14 18:03:57,377 [http-8080-1] DEBUG service.ServiceFactory  - >> Configuring factory with: <root>
  <service-exception-handler>org.granite.messaging.service.ExtendedServiceExceptionHandler</service-exception-handler>
</root>

2011-10-14 18:03:57,392 [http-8080-1] DEBUG service.ServiceFactory  - << Configuring factory done: org.granite.tide.spring.SpringServiceFactory@745955 {
  serviceExceptionHandler: org.granite.messaging.service.ExtendedServiceExceptionHandler@951520
}
2011-10-14 18:03:57,393 [http-8080-1] DEBUG service.ServiceFactory  - << Returning factory: org.granite.tide.spring.SpringServiceFactory@745955 {
  serviceExceptionHandler: org.granite.messaging.service.ExtendedServiceExceptionHandler@951520
}
2011-10-14 18:03:57,563 [http-8080-1] DEBUG service.ServiceInvoker  - >> Trying to find method: "create"[com.tournami.Tournament : null] in class com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a
2011-10-14 18:03:57,565 [http-8080-1] DEBUG service.ServiceInvoker  - >> Invoking method: public final java.lang.Object com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(com.tournami.Tournament) with
2011-10-14 18:03:57,771 [http-8080-1] TRACE tournami.TournamentCreatorService  - parameter: com.tournami.Tournament : null
2011-10-14 18:03:58,073 [http-8080-1] ERROR tournami.TournamentCreatorService  - -----------------------------------------------------------------------
2011-10-14 18:03:58,074 [http-8080-1] ERROR tournami.TournamentCreatorService  - VALIDATION ERRORS:
2011-10-14 18:03:58,119 [http-8080-1] ERROR tournami.TournamentCreatorService  - Field error in object 'com.tournami.Tournament' on field 'callForEntryDurationDays': rejected value [null]; codes [com.tournami.Tournament.callForEntryDurationDays.nullable.error.com.tournami.Tournament.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.error.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.error.java.lang.Integer,com.tournami.Tournament.callForEntryDurationDays.nullable.error,tournament.callForEntryDurationDays.nullable.error.com.tournami.Tournament.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.error.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.error.java.lang.Integer,tournament.callForEntryDurationDays.nullable.error,com.tournami.Tournament.callForEntryDurationDays.nullable.com.tournami.Tournament.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.callForEntryDurationDays,com.tournami.Tournament.callForEntryDurationDays.nullable.java.lang.Integer,com.tournami.Tournament.callForEntryDurationDays.nullable,tournament.callForEntryDurationDays.nullable.com.tournami.Tournament.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.callForEntryDurationDays,tournament.callForEntryDurationDays.nullable.java.lang.Integer,tournament.callForEntryDurationDays.nullable,nullable.com.tournami.Tournament.callForEntryDurationDays,nullable.callForEntryDurationDays,nullable.java.lang.Integer,nullable]; arguments [callForEntryDurationDays,class com.tournami.Tournament]; default message [Поле [{0}] класса [{1}] не может иметь значение null]
2011-10-14 18:03:58,120 [http-8080-1] ERROR tournami.TournamentCreatorService  - Field error in object 'com.tournami.Tournament' on field 'callForEntryMessage': rejected value [null]; codes [com.tournami.Tournament.callForEntryMessage.nullable.error.com.tournami.Tournament.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.error.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.error.java.lang.String,com.tournami.Tournament.callForEntryMessage.nullable.error,tournament.callForEntryMessage.nullable.error.com.tournami.Tournament.callForEntryMessage,tournament.callForEntryMessage.nullable.error.callForEntryMessage,tournament.callForEntryMessage.nullable.error.java.lang.String,tournament.callForEntryMessage.nullable.error,com.tournami.Tournament.callForEntryMessage.nullable.com.tournami.Tournament.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.callForEntryMessage,com.tournami.Tournament.callForEntryMessage.nullable.java.lang.String,com.tournami.Tournament.callForEntryMessage.nullable,tournament.callForEntryMessage.nullable.com.tournami.Tournament.callForEntryMessage,tournament.callForEntryMessage.nullable.callForEntryMessage,tournament.callForEntryMessage.nullable.java.lang.String,tournament.callForEntryMessage.nullable,nullable.com.tournami.Tournament.callForEntryMessage,nullable.callForEntryMessage,nullable.java.lang.String,nullable]; arguments [callForEntryMessage,class com.tournami.Tournament]; default message [Поле [{0}] класса [{1}] не может иметь значение null]
2011-10-14 18:03:58,120 [http-8080-1] ERROR tournami.TournamentCreatorService  - -----------------------------------------------------------------------
2011-10-14 18:03:58,447 [http-8080-1] ERROR service.DefaultServiceExceptionHandler  - Could not process remoting message: flex.messaging.messages.RemotingMessage {

  source = null
  operation = invokeComponent
  remoteUsername = null
  remotePassword = null
  correlationId = null
  destination = spring
  headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01, DSEndpoint=my-graniteamf}
  messageId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6

  timestamp = 0
  clientId = null
  timeToLive = 0
  body = [tournamentCreatorService, null, create, [Ljava.lang.Object;@18f5e80, org.granite.tide.invocation.InvocationCall{
    listeners: []
    updates: []
    results: []
}]
}
java.lang.reflect.UndeclaredThrowableException
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(<generated>)

    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2011-10-14 18:03:58,460 [http-8080-1] DEBUG process.AMF3MessageProcessor  - Could not process remoting message: flex.messaging.messages.RemotingMessage {

  source = null
  operation = invokeComponent
  remoteUsername = null
  remotePassword = null
  correlationId = null
  destination = spring
  headers = {DSId=F6EB905C-193B-43E4-A91F-B4722A731B01, DSEndpoint=my-graniteamf}
  messageId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6

  timestamp = 0
  clientId = null
  timeToLive = 0
  body = [tournamentCreatorService, null, create, [Ljava.lang.Object;@18f5e80, org.granite.tide.invocation.InvocationCall{
    listeners: []
    updates: []
    results: []
}]

}
org.granite.messaging.service.ServiceException
    at org.granite.tide.spring.SpringValidationExceptionConverter.convert(SpringValidationExceptionConverter.java:54)
    at org.granite.messaging.service.ExtendedServiceExceptionHandler.getServiceException(ExtendedServiceExceptionHandler.java:98)
    at org.granite.messaging.service.AbstractServiceExceptionHandler.getServiceException(AbstractServiceExceptionHandler.java:46)
    at org.granite.messaging.service.DefaultServiceExceptionHandler.handleInvocationException(DefaultServiceExceptionHandler.java:64)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:173)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterChain(UrlMappingsFilter.java:287)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:205)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(<generated>)

    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    ... 72 more
2011-10-14 18:03:58,463 [http-8080-1] DEBUG process.AMF3MessageProcessor  - << Returning AMF3 response:
flex.messaging.messages.ErrorMessage {
  faultCode = Validation.Failed
  faultDetail =
- destination: spring
- method: public final java.lang.Object com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(com.tournami.Tournament)

- exception: java.lang.reflect.UndeclaredThrowableException
org.granite.messaging.service.ServiceException
    at org.granite.tide.spring.SpringValidationExceptionConverter.convert(SpringValidationExceptionConverter.java:54)
    at org.granite.messaging.service.ExtendedServiceExceptionHandler.getServiceException(ExtendedServiceExceptionHandler.java:98)
    at org.granite.messaging.service.AbstractServiceExceptionHandler.getServiceException(AbstractServiceExceptionHandler.java:46)
    at org.granite.messaging.service.DefaultServiceExceptionHandler.handleInvocationException(DefaultServiceExceptionHandler.java:64)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:173)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterChain(UrlMappingsFilter.java:287)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:205)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(<generated>)

    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    ... 72 more

  faultString = null
  rootCause = org.granite.tide.spring.SpringValidationException
  extendedData = {invalidValues=[Lorg.granite.tide.validators.InvalidValue;@1a63f4c}
  correlationId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6
  destination = null
  headers = {}
  messageId = 065CF978-55E7-4607-9795-278ED4C43087
  timestamp = 1318604638462
  clientId = 315DEA1A-C73D-453C-9142-4FD4EFF695D3
  timeToLive = 0
  body = null
}
2011-10-14 18:03:58,465 [http-8080-1] DEBUG process.AMF0MessageProcessor  - << Got AMF3 response:
flex.messaging.messages.ErrorMessage {
  faultCode = Validation.Failed
  faultDetail =
- destination: spring
- method: public final java.lang.Object com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(com.tournami.Tournament)

- exception: java.lang.reflect.UndeclaredThrowableException
org.granite.messaging.service.ServiceException
    at org.granite.tide.spring.SpringValidationExceptionConverter.convert(SpringValidationExceptionConverter.java:54)
    at org.granite.messaging.service.ExtendedServiceExceptionHandler.getServiceException(ExtendedServiceExceptionHandler.java:98)
    at org.granite.messaging.service.AbstractServiceExceptionHandler.getServiceException(AbstractServiceExceptionHandler.java:46)
    at org.granite.messaging.service.DefaultServiceExceptionHandler.handleInvocationException(DefaultServiceExceptionHandler.java:64)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:173)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterChain(UrlMappingsFilter.java:287)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:205)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(<generated>)

    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    ... 72 more

  faultString = null
  rootCause = org.granite.tide.spring.SpringValidationException
  extendedData = {invalidValues=[Lorg.granite.tide.validators.InvalidValue;@1a63f4c}
  correlationId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6
  destination = null
  headers = {org.granite.sessionId=025FC9FC7246B1424ECD9CE01AE51C5A}
  messageId = 065CF978-55E7-4607-9795-278ED4C43087
  timestamp = 1318604638462
  clientId = 315DEA1A-C73D-453C-9142-4FD4EFF695D3
  timeToLive = 0
  body = null
}
2011-10-14 18:03:58,466 [http-8080-1] DEBUG process.AMF0MessageProcessor  - << Returning AMF0 response:
org.granite.messaging.amf.AMF0Message {
  version = 3
  headers = []
  bodies = [
    org.granite.messaging.amf.AMF0Body {
      target = /2/onStatus
      serviceName = null
      serviceMethodName = null
      response =
      type = AMF3_OBJECT
      value = flex.messaging.messages.ErrorMessage {
        faultCode = Validation.Failed
        faultDetail =
- destination: spring
- method: public final java.lang.Object com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(com.tournami.Tournament)

- exception: java.lang.reflect.UndeclaredThrowableException
org.granite.messaging.service.ServiceException
    at org.granite.tide.spring.SpringValidationExceptionConverter.convert(SpringValidationExceptionConverter.java:54)
    at org.granite.messaging.service.ExtendedServiceExceptionHandler.getServiceException(ExtendedServiceExceptionHandler.java:98)
    at org.granite.messaging.service.AbstractServiceExceptionHandler.getServiceException(AbstractServiceExceptionHandler.java:46)
    at org.granite.messaging.service.DefaultServiceExceptionHandler.handleInvocationException(DefaultServiceExceptionHandler.java:64)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:173)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage(AMF3MessageProcessor.java:136)
    at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:59)
    at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
    at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterChain(UrlMappingsFilter.java:287)
    at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:205)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.tournami.TournamentCreatorService$$EnhancerByCGLIB$$5a872d4a.create(<generated>)

    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 org.granite.messaging.service.ServiceInvocationContext.invoke(ServiceInvocationContext.java:71)
    at org.granite.spring.security.AbstractSpringSecurity3Interceptor.invoke(AbstractSpringSecurity3Interceptor.java:34)
    at org.granite.spring.security.SpringSecurity3Service.authorize(SpringSecurity3Service.java:201)
    at org.granite.messaging.service.ServiceInvoker.invoke(ServiceInvoker.java:144)
    ... 72 more

        faultString = null
        rootCause = org.granite.tide.spring.SpringValidationException
        extendedData = {invalidValues=[Lorg.granite.tide.validators.InvalidValue;@1a63f4c}
        correlationId = F5FF832F-A2E8-9029-6217-02F5FC4FBCB6
        destination = null
        headers = {org.granite.sessionId=025FC9FC7246B1424ECD9CE01AE51C5A}
        messageId = 065CF978-55E7-4607-9795-278ED4C43087
        timestamp = 1318604638462
        clientId = 315DEA1A-C73D-453C-9142-4FD4EFF695D3
        timeToLive = 0
        body = null
      }
    }
  ]
}


Oleksandr Barabanov

unread,
Oct 14, 2011, 11:59:42 AM10/14/11
to gran...@googlegroups.com
Can it have the same roots with another problem I faced: https://groups.google.com/forum/#!topic/graniteds/VCSLoZMGjNE ??

Maybe something broken (dependencies, configuration) coming along during plugin's setup ? Or some incompability issue ?
As I mentioned above, the project has been upgared to Grails 1.3.7 from 1.3.6. But the validation problem had place in 1.3.6 yet. And, regarding 'grails mxmlc' command - I merely never tried it until now.. I use Flash Builder and run my Flex app against Grails-based server app, so I just got curious and tried 'grails mxmlc'and saw this error.

Oleksandr Barabanov

unread,
Oct 27, 2011, 12:50:44 PM10/27/11
to gran...@googlegroups.com
ok this is gonna to be fixed in official gdsflex 0.9.0 release which is scheduled on tomorrow, Oct 28th 2011.
But, following William's advice I was able to get it fixed righ now by using  granite-flex45.swc & granite-essentials.swc from latest today's build (http://www.graniteds.org/bamboo/browse/GDSCP-GDSCPN-92/artifact) and latest gdsflex plugin's version taken from https://svn.codehaus.org/grails-plugins/grails-gdsflex/trunk

So, now Tide dipatches validation event again, and everything works exactly as expected and described at: http://www.graniteds.org/confluence/display/DOC/6.+Data+Validation / Client Propagation for Server Validation Errors

Cheers,
Oleksandr.
Reply all
Reply to author
Forward
0 new messages