Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF9.0.1 and Flex4 Remoting Issue

New Here ,
Oct 11, 2010 Oct 11, 2010

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

TOPICS
Flash integration
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 11, 2010 Oct 11, 2010

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2010 Oct 12, 2010

Hi Paul,

We turned on mappings in the services-config.xml.

Cheers,

Mark

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 12, 2010 Oct 12, 2010

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2010 Oct 12, 2010

Hi Paul,

As it turns out it was a bit of a strange one.

We had a coldfusion mapping called flexCom.

  • If we called a CFC from flex and passed a string or an integer as an argument, it all was OK.
  • If we called a CFC from Flex and passed an Object (VO) then we got the error.

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 12, 2010 Oct 12, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 12, 2010 Oct 12, 2010
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources