3 Replies Latest reply on Feb 10, 2008 1:03 AM by Ratsnackbar

    RDS - Flex 2 errors

    Leelongleaf
      Arrrgggg. This is driving me nuts. Using Win2K3 with all updates, IIS6, web xml file is not commented, server ports 80 and 8500 fail, tried using IP, reinstalled CF, DW and CF Admin will connect using RDS, password reset, java update. Nothing works and it's driving me insane, In the RDS cofiguration of Flex I get the "can't connect to RDS" error.

      I want to use Flex, I really do, but it shouldn't be this hard to configure using a Win2K3 and IIS6 setup.
        • 1. Re: RDS - Flex 2 errors
          ProjectedSurplus Level 1
          Hi, I had the same difficulties in a previous post last week (look for if you like) and received this answer which seems comprehensive -- but I have not put it into effect just yet (working with the localhost for now).

          Not sure if it helps (I'm a clueless noob at the moment) but getting there slowly. . . .

          ------------------------------------

          As it is on port 8300 it sounds like you performed a JRun install and used the built in ColdFusion web server. I would not recommend doing that. I would suggest installing Apache or configuring IIS. Then reinstall ColdFusion and chose to run the web server connector. That way you can have it running on the standard port 80. If you do not like IIS, Apache for Windows in version 2.2.6 also has OpenSSL built in if you wanted to test with SSL.

          When you get to the point where it asks you to choose the web root if it is not actually pointing to your wwwroot (htdocs for apache) directory make sure to point it there as this is where it will install your CFIDE directory and it is handy to have that in your web root rather then having to remap it later.

          Make sure that when it prompts you to set a password for the RDS that you do. You will need it for flex builder.

          Sounds like you have already figured out how to create a DSN so I will skip that. Just make sure that they validate.

          Once all that is done I suggest one other thing. Flex needs access to the services-config.xml file to compile. You will hear lots of advice about copying it over to your local system in a fake directory. I find it better to share out the directory it is in on the server and then point FlexBuilder to that directory. That path is C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml by default. But you will want to just share out the ColdFusion8 Folder itself.

          Then share out your webroot. For IIS I believe that is just c:\wwwroot. Just share the folder under the same name is fine.

          Make sure you can get to each of the folders over the network using their UNC paths. The reason for this will become clear later. Or at least less foggy.

          Once all that is done move to your Development workstation. Open a command prompt and make sure that you can ping your server by Name. IP addresses are ok but it is better to use the name in my opinion. If you do not have local DNS resolving names you can configure your systems Hosts file to point to that servers IP address for any given web URL you would like.

          On your workstation when you install flex builder make sure to choose to install the ColdFusion Extensions for FlexBuilder.

          Then open flex builder. I use Flex Builder 3 Beta 3 so if you are using version 2.01 your screens will differ.

          Click File > New > Flex Project

          Provide a project name. Anything is fine for now this is just a test.
          Example: mycoolnewflexsite

          Choose the default location for the workspace or choose another location. It does not really matter where you put the workspace. Just don't forget where you put it if you change it's default location. Your workspace is not the same as your WebRoot. The Work space is Flex's location where it keeps your configuration information about your projects and it's UN-Compiled source files.

          Choose ColdFusion for the server technology and Select ColdFusion Flash Remoting for this instance.
          Click next.

          On the next screen it is going to ask you which installation type. My install uses a standalone server. Sounds like yours is JRun which I believe means you have to choose Deployed to J2EE. You will want to look that up. Either way there is not too much difference in the screens.

          For the standalone these are the settings I use.

          UNCHECK the "Use default location for local ColdFusion server".
          In the field put in the UNC path to the shared ColdFusion8 Folder on our development server.
          Example: \\MyServerName\ColdFusion8

          This way FlexBuilder has access to that services-config.xml we were talking about through the UNC path. No need to copy it over to your workstation and you can keep it consistant amongst developers this way.

          Uncheck the Use built-in ColdFusion web server
          for the Web root use the shared webroot from your server you shared out above and the name of the root file for your sites folder inside that shared directory.
          Example: \\MyServerName\wwwroot\MyCoolNewFlexSite

          For the Root URL you will want the actual URL that you will be using to get to your website. http://www.mycoolnewflexsite.com (Again your DNS should be pointing to your local development servers ip address and not the real world web address for your site. If you do not have DNS running in your network then use your local workstations Hosts file to simulate the same thing.)

          Down below that will be a field called "Output folder". This is where flex is going to put the files that it Compiles. For this you will want to have the same exact path as the Web Root. It may already be in there with a debug folder attached to the end. I prefer to take off the debug folder and just make it exactly the same as my web root path.

          By using the UNC paths instead of local files this allows FlexBuilder to compile directly to the servers wwwroot directory you will be testing the files from. No need to transfer the compiled files this way. Might not make your network admin happy but you will have at least two weeks before your network admin can figure out where the extra traffic is coming from and then only if they are well above average. And trust me I know wherefore I speak about network admins. Odds are they will never figure it out and if they do it just gives you reason to have them install a gigabit switch and hook you up to the server at a faster pace. It's part of the work requirements RIGHT?!

          OK so after you have those paths in place click on validate configuration. You may get a warning about there already bing a bin directory but just ignore that and move on.
          click next.

          On the next screen for the main source folder I prefer to erase the default src it uses. That's up to you.

          For the main application mxml file just use whatever is there for now. You can always change it later.

          For the Output folder URL change it to the URL of your site. I.E. http://www.mycoolnewflexsite.com

          Then click finish.

          FlexBuilder will open up your applications main MXML file. To test if it is working you should be able to just add in a text line and click the compile button.

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
          <mx:Text id="hw" text="Hello World!" />
          </mx:Application>

          If all goes well it will pop open your browser to the URL from your development server with your compiled Hello World displayed. If you get that far you are almost home.

          Still a bit more though.

          So once this is cone click on Window > Preferences and then click the + next to ColdFusion and click RDS Configuration.

          In the RDS configuration highlight localhost and just click remove.
          Then click new button.
          For Description put in the Name of your development server.
          For the Host Name also put in the name of your development server
          For the port choose port 80 (Assuming you set up IIS or Apache as recommended.)

          Assuming you have not yet set up multiple users in ColdFusion Administrator then your User Name is going to be simply "admin".
          Put in your password you set up for the RDS password when you were installing ColdFusion Server.

          Click on Test Connection. If it tests out then you will have just completed your install. The Test Debugger will not work until you turn on Debugging in the ColdFusion server Administrator. I will let you figure that out on your own as I am getting tired of typing.

          I realize that's a lot but once you have done it 3 or 4 hundred times it becomes second nature.

          Hope that helped and did not muddy the waters. I realized as I was typing that this really is not a good explanation without pictures. Next time I do a development install I will have to take screen shots I guess.
          - Joe
          • 2. Re: RDS - Flex 2 errors
            Leelongleaf Level 1
            Well, that sorta worked. I still can't get the RDS Configuration to connect in the preferences section.
            • 3. Re: RDS - Flex 2 errors
              Ratsnackbar Level 2
              Hi! What's it saying when you try to connect to the RDS server.
              Most of the time when I had issues getting connected I found it was with my Network / Security setup.

              Just a few possibilities:

              If it is saying it simply cannot connect make sure that your Host Name is resolving. I.E. Ping it and see if it returns the correct ip address and 4 responces or not.

              Also attempt with the ip address if you have not already.

              Turn off any firewall you have on the server and workstation and try again. Might need to configure it.

              -Joe