Announcement Announcement Module
Collapse
No announcement yet.
Upgrading to 1.5.2 causes deserialization issues Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrading to 1.5.2 causes deserialization issues

    We have a spring-flex-blazeds web app working fine using spring 3.0.5.release and spring-flex 1.0.3.release. We have many actionscript ArrayCollections that get deserialized into java.util.Set.

    We're trying to upgrade to spring 3.1.1.release and spring-flex 1.5.2.release, and now, a non-empty ArrayCollection fails to deserialize to a Set. Did something change that needs to be configured?

    Here is the full stack trace. Why would the spring-beans CustomCollectionEditor returning an ArrayList instead of a Set?

    [BlazeDS]Error deserializing client message.
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'flex.messaging.io.ArrayCollection' to required type 'java.util.Set' for property 'addresses'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [flex.messaging.io.ArrayCollection] to required type [java.util.Set] for property 'addresses': PropertyEditor [org.springframework.beans.propertyeditors.CustomCo llectionEditor] returned inappropriate value of type [java.util.ArrayList]
    at org.springframework.beans.BeanWrapperImpl.convertI fNecessary(BeanWrapperImpl.java:490)
    at org.springframework.beans.BeanWrapperImpl.convertF orProperty(BeanWrapperImpl.java:516)
    at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:1119)
    at org.springframework.beans.BeanWrapperImpl.setPrope rtyValue(BeanWrapperImpl.java:904)
    at org.springframework.flex.core.io.SpringPropertyPro xy.setValue(SpringPropertyProxy.java:182)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(A mf3Input.java:438)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Am f3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Inp ut.java:130)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(A mf3Input.java:437)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Am f3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Inp ut.java:130)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(A mf3Input.java:437)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Am f3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Inp ut.java:130)
    at flex.messaging.io.amf.Amf3Input.readArray(Amf3Inpu t.java:358)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Am f3Input.java:156)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Inp ut.java:130)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(A mf3Input.java:437)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Am f3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Inp ut.java:130)
    at flex.messaging.io.amf.Amf0Input.readObjectValue(Am f0Input.java:123)
    at flex.messaging.io.amf.Amf0Input.readArrayValue(Amf 0Input.java:359)
    at flex.messaging.io.amf.Amf0Input.readObjectValue(Am f0Input.java:127)
    at flex.messaging.io.amf.Amf0Input.readObject(Amf0Inp ut.java:94)
    at flex.messaging.io.amf.AmfMessageDeserializer.readO bject(AmfMessageDeserializer.java:227)
    at flex.messaging.io.amf.AmfMessageDeserializer.readB ody(AmfMessageDeserializer.java:206)
    at flex.messaging.io.amf.AmfMessageDeserializer.readM essage(AmfMessageDeserializer.java:126)
    at flex.messaging.endpoints.amf.SerializationFilter.i nvoke(SerializationFilter.java:145)
    at flex.messaging.endpoints.BaseHTTPEndpoint.service( BaseHTTPEndpoint.java:291)
    at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCG LIB$$7304d5db.service(<generated>)
    at org.springframework.flex.servlet.MessageBrokerHand lerAdapter.handle(MessageBrokerHandlerAdapter.java :109)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:923)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:789)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 311)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:116)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:101)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:45)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:167)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.saml.metadata.Metadat aGeneratorFilter.doFilter(MetadataGeneratorFilter. java:70)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:173)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.orm.hibernate3.support.OpenSes sionInViewFilter.doFilterInternal(OpenSessionInVie wFilter.java:198)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(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.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:454)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [flex.messaging.io.ArrayCollection] to required type [java.util.Set] for property 'addresses': PropertyEditor [org.springframework.beans.propertyeditors.CustomCo llectionEditor] returned inappropriate value of type [java.util.ArrayList]
    at org.springframework.beans.TypeConverterDelegate.co nvertIfNecessary(TypeConverterDelegate.java:237)
    at org.springframework.beans.BeanWrapperImpl.convertI fNecessary(BeanWrapperImpl.java:470)
    ... 77 more

  • #2
    Solved.
    This was a NullPointerException in the hashCode method of the object in the Set, somehow manifesting itself as a deserialization issue.

    Comment

    Working...
    X