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

Moving a CF/Flex app from CF7 to CF9

Community Beginner ,
Jun 17, 2010 Jun 17, 2010

I should start by saying that I know nothing about Flex, or Flash, so am probably missing something very basic.

I have inherited an application on a CF7 server which has to be migrated to a CF9 server. It uses Flex extensively. Both servers are Windows and IIS (though slightly different versions - I can look up details if it's relevant).

Migration strategy has been "default installation of eveyrthing, copy it all across, try it out and hope that it works." This has mostly been successful: I had to alter a lot of CFCs from access="public" to access="remote", and  a non-default “Enable Remote Adobe LiveCycle Data Management access” in CF ADmin, but I have one niggling problem.

The first time (and only the first time) a user tries to use the app, they get an error:

Fault[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error Invalid URL url: 'http:// (my url) /flex2gateway/'"]

If they refresh, this message goes away.

I could in theory tell them to hit refresh, as everything works fine after that, but it's not exactly a clean solution, and in any case, I'd like to understand what's going on. I've found a few descriptions of people with similar problems, but not quite the same, and too many of them refer to editing configuration files that I can't even find.

Any hints? It may well be something veyr basic and obviosu, because as I say, I know nothing of Flex.

2.3K
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
Community Beginner ,
Jun 22, 2010 Jun 22, 2010

You are not alone. I am experiencing the same issue. I was able to resolve this

once, by reinstalling Flex Builder, but unfortunately can't narrow down what actually fixed the issue. I think the fix actually had something do with setting up the FB project again rather than Flex Builder itself. I will let you know how to resolve if I discover a fix for it, and i'll hope you might do the same.

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
Community Beginner ,
Jun 23, 2010 Jun 23, 2010

"Setting up the FB project"? I don't even know what that means.... I'll go and find out what this is, and maybe do it.

Did I mention that I know NOTHING about Flex?

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
Community Beginner ,
Jun 23, 2010 Jun 23, 2010

JaneUK,

Sorry for the shorthand. FB means Flex Builder (IDE). But, since our applications work flawlessley once refreshed, I am inclined to believe that we are experiencing some sort of other problem. I am going to be looking into the IIS/Coldfusion configuration and try it from other browsers as well. I will keep you posted.

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
Community Beginner ,
Jun 23, 2010 Jun 23, 2010

I'm starting to wonder if there's some sort of initialisation that's happening in slightly the wrong order. If it's deciding that "flex2gateway" is an invalid URL, and then deciding that it isn't, where does it find it, how, and why? And why does the refresh fix it?

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
Community Beginner ,
Jun 23, 2010 Jun 23, 2010

I agree with the initialization possibility and my questions mirror yours. I have identified a few things:

1. Error only shows when a new (fresh) browser window visits the application's address.

2. Error does not show when page is refreshed or application address has already been accessed within that particular browser window. (e.g. - Application ---> Google.com ---> Application)

3. Error does not show if new (fresh) browser window visits http://localhost/flex2gateway/ prior to visiting the application address.

These points lead me to believe there is an issue with the flexgateway initialization and for some reason it needs to be accessed by the browser prior to initializing the application. Hopefully these hints will help anyone that browses across our thread here and could offer us a solution. In the meantime I will continue to persue a solution.

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
Community Beginner ,
Jun 24, 2010 Jun 24, 2010

Re-checking, I agree with all your test results above, and would add that "window" means precisely that: extra tabs within the same window are treated as the same window, second and third windows from the same browser open at the same time are treated as different sessions. Which is as we'd expect.

Also, I get the same results in MSIE and in Firefox - again, no surprise.

One possible rather ugly work-around, for me, would be a hidden frame that accesses flex2gateway. This has the potential for timing issues, so isn't a general solution, but in my case the first screen the user sees is a login screen, and the message doesn't appear until they fill in username and password and then press the "login" button.

Edit to add: yes, this works.

Index.html, just after the code that embeds the Flash:

<!--- A nasty hack to get round an initialisation problem --->
<iframe name="flex2gateway" src="flex2gateway" frameborder="0" scrolling="no" width="22" height="0"></iframe>

I'd rather understand, and correct, the underlying problem, though.

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
Community Beginner ,
Jun 24, 2010 Jun 24, 2010

JaneUK,

Glad to hear you got yours working. I am about to apply the workaround to my application. I suspect this will work for mine as well. But you are right. I would also like to identify the underlying reason that is causing this to happen and will continue seeking an answer. Here is another other point:

The code above in JaneUK's strangely fantastic workaround should be applied to the application's HTML wrapper (a simple HTML page that embed's the application's .swf file). I am currently encountering this issue during the development of my application which will require me to apply the fix to the HTML wrapper created by Flex Builder, and then uncheck the option to "Generate HTML wrapper" under the Flex Compiler tab in the Project Properties to prevent Flex Builder from over-writing a new HTML wrapper which I suspect would also over-write the fix.

My webserver is also IIS. There is a chance this could be causing problems somewhere.

Update: JaneUK's fix also worked for me.

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 ,
Jan 30, 2012 Jan 30, 2012
LATEST

Hi all,

It's 2012 and I'm just encountering this issue. I'm moving a Flex app from CF 7 to CF 9. I haven't recompiled – just changed my data connection info in my CFC's. Any new insights into why this issue is occurring? I'd rather not use the workaround suggested by JaneUK (thank you btw).

Thanks.

Novian

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
Community Beginner ,
Jun 23, 2010 Jun 23, 2010

Something here that might be relevant, though it doesn't involve a solution

http://flexoop.com/2008/08/flex2gateway-frustrations/

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