Copy link to clipboard
Copied
We are trying to migrate our flex apps from CF8.0.1 to CF9.0.1 and we are getting an error that seems to be caused when trying to create a VO which is typed to a CFC that is in a directory below the webroot. This was working in CF8.0.1.
The UserVO.as has the following RemoteClass Attribute:
[RemoteClass(alias="flex.coms.CF9Testing.UserVO"")]
public class UserVO
This maps to a CFC with the following attributes:
<cfcomponent access="remote" output="false" alias="flex.coms.CF9Testing.UserVO">
The properties all bind correctly and the path is correct, but as soon as we try to pass an object from Flex to CFC we get the following error in the logs.
[BlazeDS]Cannot create class of type flex.coms.CF9Testing.UserVO'.
flex.messaging.MessageException: Cannot create class of type 'flex.coms.CF9Testing.UserVO'. Type 'flex.coms.CF9Testing.UserVO' not found.
If we remove the mappings and put a copy of the VO in the webroot, it works fine.
Can any one shed any light on what we are doing wrong?
Thanks,
Mark
Copy link to clipboard
Copied
On 10/11/2010 9:58 PM, Mark 1968 said:
If we remove the mappings and put a copy of the VO in the webroot, it works
fine.
uh did you remember to edit services-config.xml on the new server & turn on
mappings?
Copy link to clipboard
Copied
Hi Paul,
We turned on mappings in the services-config.xml.
Cheers,
Mark
Copy link to clipboard
Copied
On 10/12/2010 3:09 PM, Mark 1968 said:
We turned on mappings in the services-config.xml.
and it still can't find that CFC?
Copy link to clipboard
Copied
Hi Paul,
As it turns out it was a bit of a strange one.
We had a coldfusion mapping called flexCom.
We also tried a putting the path from the webroot, but that included a path that included a physical directory called flexApps and we got the same result. It was OK if we passed a simple value to the CFC, but errored if we passed a complex value.
So the only thing in common was the use of the word flex. So we changed the mapping to "fxCom" and it worked! So we can only assume that the use of a directory or mapping that includes the word "flex" causes a problem for serialization/deserialization. Unless you can come up with a different explanation of course.
Cheers,
Mark
Copy link to clipboard
Copied
Hi Mark,
Your observation is correct. There will be issues if the CFC starts with "flex.". The BlazeDS underneath would assume it as an internal BlazeDS Java class and would try to load it. So it is best to avoid using cfcs starting with "flex." in its fully qualified name.
Rakshith
Adobe ColdFusion Team
Copy link to clipboard
Copied
On 10/12/2010 4:27 PM, Mark 1968 said:
So the only thing in common was the use of the word flex. So we changed the
mapping to "fxCom" and it worked! So we can only assume that the use of a
directory or mapping that includes the word "flex" causes a problem for
serialization/deserialization. Unless you can come up with a different
explanation of course.
nope
nice catch. if you have a blog, defintely worth a posting. i'd have blown a
gasket trying to find that.