Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-23-2011, 11:04 AM   #1
Registered User
 
Join Date: May 2011
Posts: 1
Default ByteArray

Hi Friends,
I am getting this error when sending ByteArray from ActionScript to java class.
Please tell me the solution to this.

16:41:17,801 INFO [STDOUT] [BlazeDS]05/23/2011 16:41:17.801 [INFO] Channel endpoint my-amf received request.
16:41:18,266 INFO [STDOUT] [BlazeDS]05/23/2011 16:41:18.266 [ERROR] 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.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.MessageBrokerServlet.service(Messag eBrokerServlet.java:353)
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.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)
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:235)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstab lishmentValve.process(SecurityContextEstablishment Valve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstab lishmentValve.invoke(SecurityContextEstablishmentV alve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionV alve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
16:41:18,266 INFO [STDOUT] [BlazeDS]05/23/2011 16:41:18.266 [DEBUG] Deserializing AMF/HTTP request
kiran.gk22@gmail.com is offline   Reply With Quote
Old 05-23-2011, 07:38 PM   #2
wvxvw
Holosuit User
 
wvxvw's Avatar
 
Join Date: Oct 2006
Location: Tel Aviv
Posts: 4,301
Send a message via ICQ to wvxvw
Default

> Creation validation for class '[B' failed.
This line makes me think you are not sending an AMF object. Looks like a beginning of a class name written to string, something like: [Boolean] for example.
__________________
The .NET open source editor for Flash and web developers
*This would be my contribution to the project*
couchsurfing if you need it
wvxvw is offline   Reply With Quote
Old 02-09-2012, 01:01 PM   #3
karandes
Registered User
 
Join Date: Feb 2012
Posts: 2
Default Have you found the reason and solution?

I am facing the same issue.
Have you found the reason and solution?

If yes, Please let me know, That will be a great help.
karandes is offline   Reply With Quote
Old 02-10-2012, 01:03 PM   #4
karandes
Registered User
 
Join Date: Feb 2012
Posts: 2
Default

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!
karandes is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:41 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.