I’m using BlazeDS to remote some Java objects that I’m consuming in a Flex application. I’m getting a type coercion error with one of my classes that I can’t for the life of me figure out. I have other classes that are working fine using the same data types, and I’ve gone over my mapping a dozen times. I’m following all of the necessary conventions for getters and setters as far as I know…
Anyhow, my question is: how can I debug this problem? Running the Flex app in debug mode spits out some generic errors to the console that don’t really help much (TypeError: Error #1034: Type Coercion failed: cannot convert Object@5d1d809 to valueObjects.SomeClass.).
I’m new to this whole AMF / Flex + Java thing, so any tips would be greatly appreciated.
These are two of the tools I use when working with BlazeDS, AMF, etc.:
Turn on the logging for BlazeDS. Within
WEB-INF/conf/services-conf.xml, lower the debugging level to ‘debug‘ like in the below snippit. The output, which is fairly detailed, will appear in{tomcat-home}/logs/localhost.yyyy-mm-dd.log<
target class="flex.messaging.log.ConsoleTarget" level="debug">