5 Replies Latest reply on Jun 21, 2006 10:58 PM by kruse

    cfc does not work

    kruse Level 1
      when I try to call a cfc I get an error:

      conponent.cfm
      <cfobject component="TellTime" name="tellTimeObj">
      <cfinvoke component="#tellTimeObj#" method="getLocalTime"returnvariable="localTime" >

      TellTime.cfc
      <cfcomponent>
      <cffunction name="getLocalTime">
      <cfreturn now()>
      </cffunction>
      </cfcomponent>


      I get the error :
      The web site you are accessing has experienced an unexpected error.
      Please contact the website administrator.

      If I run the code on another ser it works!??

      What is wrong?
        • 1. Re: cfc does not work
          BKBK Adobe Community Professional & MVP
          I added returntype="date", and the following worked

          component.cfm
          ==============
          <cfobject component="TellTime" name="tellTimeObj">
          <cfinvoke component="#tellTimeObj#" method="getLocalTime" returnvariable="localTime">
          Time: <cfoutput>#localTime#</cfoutput>

          tellTime.cfc
          ==========
          <cfcomponent>
          <cffunction name="getLocalTime" returntype="date">
          <cfreturn now()>
          </cffunction>
          </cfcomponent>

          • 2. cfc does not work
            kruse Level 1
            The code did already work on another server. Even without the returntype.

            The problem is that the invocation of a cfc (any cfc) results in an error.


            The web site you are accessing has experienced an unexpected error.
            Please contact the website administrator.

            The following information is meant for the website developer for debugging purposes.

            Error Occurred While Processing Request
            The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
            Null Pointers are another name for undefined values.

            The error occurred in C:\Applications\Certification\Components.cfm: line 19

            18 :
            19 : <cfobject component="TellTime" name="tellTimeObj">


            I guess that this has something to do with my coldfusion server (not the code).

            Server: 7,0,1,116466
            • 3. Re: cfc does not work
              BKBK Adobe Community Professional & MVP
              The problem is that the invocation of a cfc (any cfc) results in an error.
              ...I guess that this has something to do with my coldfusion server (not the code).

              That indeed seems to be the case. Odd. A java problem perhaps? I'll have a look.

              • 4. Re: cfc does not work
                BKBK Adobe Community Professional & MVP
                C:\Applications\Certification\
                Just noticed something. This is a peculiar path for the web root. Why do you use it? Where are Coldfusion's system directories bin, lib, cfide, etc?



                • 5. Re: cfc does not work
                  kruse Level 1
                  The coldfusion files is of cause located in c:\coldfusionMX7\

                  But I think that I may have found out what the problem is.

                  I did try to reinstall the coldfusion server but it failed to install the connectors with the IIS. It seams that the problem is that the port 51011 is blocked.
                  I can’t unblock this port myself because it is blocked centrally. I now have requested to get my port unblocked again. Then I hope that it will work again.