Question : [BlazeDS]Unknown AMF type '17'. flex.messaging.io.UnknownTypeException: Unknown AMF type '17'.

I have created a module in flex 3.2 for file upload using flash player v10 (file.load()) which is working fine.....
But the previous applications that were created do not work and give me the following error....This has begun since i changed the compiler settings for the flash player ver to 10.0.0 from 9....


ERROR MESSAGE:

[BlazeDS]Unknown AMF type '17'.
flex.messaging.io.UnknownTypeException: Unknown AMF type '17'.
      at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:219)
      at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
      at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:473)
      at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:153)
      at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
      at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:371)
      at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:157)
      at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
      at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:473)
      at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:153)
      at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:132)
      at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:135)
      at flex.messaging.io.amf.Amf0Input.readArrayValue(Amf0Input.java:326)
      at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:139)
      at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95)
      at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:226)
      at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:205)
      at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:125)
      at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:114)
      at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
      at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.citizen.framework.web.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:34)
      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:127)
      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:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)

Tried to change the Flex SDK to 4.0 gives the same error....
Need Help Urgent....
Thanks In Advance....

Answer : [BlazeDS]Unknown AMF type '17'. flex.messaging.io.UnknownTypeException: Unknown AMF type '17'.

Have a look at this: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_2.html or http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.html

It describes which types in Java are mapped to which ActionScript types. I guess the problem is with your Dictionary. Even if This is more closely related to the Java Map, BlazeDS uses an Object for mapping Java Maps. I couldn't find a mapping for Dictionary in the mapping-list. As in your code you are using String keys in your map, try the following code. I hope it helps.
1:
2:
3:
4:
5:
6:
7:
var parameters:Object= new Object();
parameters["fromdate"] =  fromdate.selectedDate;
parameters["todate"] = todate.selectedDate;
parameters["reportTo"] = "pdf";
												
reportDetailsVO.parameters = parameters;
reportManager.setReportDetails(reportDetailsVO);
Random Solutions  
 
programming4us programming4us