Announcement Announcement Module
Collapse
No announcement yet.
SerializationException while sending Flex->ByteArray to Java->byte[] Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SerializationException while sending Flex->ByteArray to Java->byte[]

    Hi,
    I am getting an error: "Creation validation for class '[B' failed."
    At the time of sending data through remoting from flex to java.

    We have a Dto on flex side which contains property "public var logo:ByteArray;",
    And the corresponding java side property for the Dto is "public byte[] logo;".

    While transferring this dto from flex to java, blazeDS fails and below log is displayed on the blazeDS side.

    Any pointers to the cause and the solution will be a great help.

    Thanks in advance.
    Karandes

    (Same log is attached)
    Log:------


    [BlazeDS]Serializing AMF/HTTP response
    Version: 3
    (Message #0 targetURI=/1/onResult, responseURI=)
    (Externalizable Object #0 'DSK')
    (Object #1)
    DSMessagingVersion = 1.0
    DSId = "4C5DF8B4-9918-12A2-68F7-ECE9576CC80F"
    1.328734836905E12
    (Byte Array #2, Length 16)
    (Byte Array #3, Length 16)
    (Byte Array #4, Length 16)

    [BlazeDS]Creation validation for class '[B' failed.
    flex.messaging.io.SerializationException: Creation validation for class '[B' failed.
    at flex.messaging.util.ClassUtil.validateCreation(Cla ssUtil.java:347)
    at flex.messaging.io.amf.Amf3Input.readByteArray(Amf3 Input.java:507)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Am f3Input.java:213)
    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.SecureAMFEndpoint$$Enhanc erByCGLIB$$56725b41.service(<generated>)
    at org.springframework.flex.servlet.MessageBrokerHand lerAdapter.handle(MessageBrokerHandlerAdapter.java :109)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:560)
    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: 368)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:109)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:97)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:100)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:78)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:35)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.authentication.http://www.BasicAuthenticationFilter...lter.java:177)
    at com.vmware.vshield.vsm.security.utils.VsmBasicAuth enticationFilter.doFilter(VsmBasicAuthenticationFi lter.java:68)
    at com.vmware.vshield.vsm.security.utils.VsmSSOBasicA uthenticationFilter.doFilter(VsmSSOBasicAuthentica tionFilter.java:104)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:187)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 380)
    at org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:105)
    .
    .
    .

    [BlazeDS]Deserializing AMF/HTTP request
    Version: 3
    (Message #0 targetURI=null, responseURI=/2)
    (Array #0)
    [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
    source = null
    operation = "applyLayoutConfiguration"
    headers = (Object #1)
    DSRemoteCredentialsCharset = null
    DSEndpoint = "secure_amf_channel"
    DSRemoteCredentials = ""
    DSId = "4C5DF8B4-9918-12A2-68F7-ECE9576CC80F"
    messageId = "DF162076-65B9-4E9A-32F9-5DA388FC63A0"
    destination = "LayoutConfigurationFacade"
    timestamp = 0
    timeToLive = 0
    body = (Array #2)
    [0] = (Typed Object #3 'com.vmware.vshield.edge.sslvpn.dto.LayoutConfigur ationDto')
    rowAlternativeColor = "000000"
    logoUri = null
    logoExtention = "png"
    logo =
    [BlazeDS]Serializing AMF/HTTP response
    Version: 3
    (Message #0 targetURI=/2/onStatus, responseURI=)
    (Typed Object #0 'flex.messaging.messages.ErrorMessage')
    headers = (Object #1)
    rootCause = null
    body = null
    correlationId = null
    faultDetail = null
    faultString = "Creation validation for class '[B' failed."
    clientId = null
    timeToLive = 0.0
    destination = null
    timestamp = 1.328734836964E12
    extendedData = null
    faultCode = "Client.Message.Encoding"
    messageId = "4C5DF944-A409-A4DA-EB2D-5D00246EF874"

  • #2
    Didn't found the Reason of the problem!
    So instead of "ByteArray" used plain "String" and converted byteArray to sting using Base64Encoder.encodeBytes();

    Hope this will help some one!

    Comment

    Working...
    X