You have something in your class that the serialization layer is having a problem with. Make sure in your class you don't have any static final fields. This will cause a problem because the serialization layer going from java to flex sends these fields across, when you send the object back to java it blows up trying to set those fields.
-----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of allister_dickson Sent: Friday, February 24, 2006 12:16 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Remote Objects in Flex 1.5 Problem I am integrating a Flex frontend with a J2EE backend using Cairngorm Framework and RemoteObjects. I am able to successfully retrieve information from my java services, but when they are sent back after changes are made to the Java Service doesn't always recognise them as the correct type of Object, therefore causing a cast exception. After turning on debugging and logging in both the flex client and Java Server I have found the following things. 1) The flex server interprets the objects correctly when passing back the results. All the Typed objects are as expected see log below as an example: [0] = (Typed Object #1 'au.com.myplan.domain.financial.FinancialDefaultCategory') financialCategoryType = (Typed Object #5 'au.com.myplan.domain.financial.FinancialCategoryType') defaultAccountingTypeId = null selected = true _remoteClass = "au.com.myplan.domain.financial.FinancialCategoryType" description = "" isNested = true new = true name = "Budget Income" id = 1.0 accountingTypeId = null _remoteClass = "au.com.myplan.domain.financial.FinancialDefaultCategory" new = true name = "Dividends" subDefaultCategories = (Array #6) id = 43.0 2) When the object is viewed in the flex debugger only the associated object financialCategoryType has _remoteClass set and the parent object (FinancialDefaultCategory). 3) After changes are made and sent back to the Java Service the log only shows that it only understands the associated object and not the parent. [0] = (Object #6) id = 43.0 subDefaultCategories = (Array #7) name = "Dividends Changed" new = false accountingTypeId = null financialCategoryType = (Typed Object #8 'au.com.myplan.domain.financial.FinancialCategoryType') defaultAccountingTypeId = null selected = false _remoteClass = "au.com.myplan.domain.financial.FinancialCategoryType" description = "" isNested = false new = false name = "Budget Income" id = 1.0 parentFinancialDefaultCategory = null selected = true 4) When the Java Service receives the object it is of type ASObject. I have read and followed any examples I can find on the net, but I haven't found a way of forcing the Flex client to associate the objects recieved as the correct Action Script Class. The java log messages give the impression that it is configured correctly but when the object is in the flex client the _remoteClass is not set for the parent object. I have made sure that the ActionScript Classes have been register correctly (public static var regClass = Object.registerClass ("au.com.myplan.domain.financial.FinancialDefaultCategory",au.com.myp lan.domain.financial.FinancialDefaultCategory);). Any help resolving this problem would be appreciated. Regards, Allister -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/