2 Replies Latest reply on Nov 24, 2009 2:29 AM by Chris Gee

    Manually applying mappings

    Chris Gee

      Hi there,

       

      We have a rather complex CF application that we have engineered over the course of 8 years! For a long time we have been using a standard eclipse project to hold our code.

       

      I've been using CFBuilder for a month or so now and much prefering it to the CFEclipse plugin. Perhaps I was most excited about the intellisence for CFC's.

       

      However we store our CFC's outside the wwwroot and use mappings to access them. And therefore the intellisence doesn't appear to work

       

      My dev machine is setup with CF8 Multi-instance running where I run 5 CF instances. I have added all the server instances but get the following messages:

       

      [DevAdmin]:(11/23 at 05:54:02) Server is available. Getting server settings from Server

      [DevAdmin]:Error(11/23 at 05:54:03) Unable to fetch server mappings.

      [DevAdmin]:Error(11/23 at 05:54:03) Unable to get the log directory.

       

      If I understand correctly, these messages have been flagged as being 'harmless'.

       

      So I'm in the process of trying to convert the Eclipse project to a CFBuilder project. It seems fairly straight forward by amending the .project file to include:

       

      <natures>

      <nature>com.adobe.ide.coldfusion.projectNature</nature>

      </natures>

       

      Also there is a settings.xml file which looks like:

       

      <?xml version="1.0" encoding="UTF-8" ?>
      <ResourceDetails>
      <ServerName>DevAdmin</ServerName>
      <LauncherName></LauncherName>
      <ExternalBrowser></ExternalBrowser>
      <Mappings>
      </Mappings>
      <VariableMappings>
      </VariableMappings>
      </ResourceDetails>

       

      I've been desporately trying to find the schema to populate the mappings node but I cannot find this anywhere. Can anyone show me an example of what this should look like?

       

      Or any other solution to getting the intellisence working on the CFC's?

       

      FYI: It works fine when using a CFC relatively, but we fully qualify the namespace hence the need for the mapping.

       

      All help would be greatly appreciated.

       

      Thanks in advance.


      Chris

        • 1. Re: Manually applying mappings
          Kiran Sakhare Level 1

          Hi Chris

           

          The error your getting is harmless " [DevAdmin]:Error(11/23 at 05:54:03) Unable to fetch server mappings. ". But for some reason CFB unable to fetch the mappings from server. Make sure you enabled the RDS settings at the server end and provided Rds details in CFB server dialog.

           

          Until CFB knows the server mappings it will not be able to resolve the CFC names for those mappings. If still your not able to make CFB fetch your mappings information, you manually edit the Server setting files with your mapping details.

           

          You can find you server setting file in {workspace}/.metadata\.plugins\com.adobe.ide.coldfusion.server/Servers.xml

           

          There is XML block you will find for your server,add the mapping name and location into  <AdminMappings></AdminMappings>.

           

            <AdminMappings>
          -    <Mapping>
                 <Name>/gateway</Name>
                 <Location>C:\ColdFusion9\gateway\cfc</Location>
          </Mapping>
          </AdminMappings>

          And restart the CFB. Now by attaching the server to the project (project -> properties -> ColdFusion Server Settings -> Server).  You should be able to see the CFCs in the mappings defined in the server.

          Thanks
          Kiran Sakhare
          • 2. Re: Manually applying mappings
            Chris Gee Level 1

            Hi Kiran,

             

            That was spot on, just what I was looking for. Thanks for the pointer.

             

            Do you have any clues about how to check the RDS issues? This would obviously be the ideal solution.

             

            It appears to talk to the CFAdmin using the RDS views such as RDS Dataview and RDS Fileview. Also the 'Service Browser' will work too, which would indicate to me that it's (generally speaking) working.

             

            Thanks again

            Chris