6 Replies Latest reply on Oct 25, 2007 7:03 PM by larksys

    error invoking cfc: internal server error

    larksys Level 1
      I can't be the only one on earth with this error/problem. I have 2 pieces of code that are essentially the same. One works and one produces the error "error invoking cfc....:internal server error".
        • 1. Re: error invoking cfc: internal server error
          Level 7
          > I can't be the only one on earth with this error/problem. I have 2 pieces of code that are essentially the same. One works and one produces the error "error invoking cfc....:internal server error".

          "Essentially the same" or "the same"?

          It's hard to tell, based only on your description, which is a bit light
          weight.

          Any chance of posting both the calling code and the relevant parts of the
          CFC?

          What CF version are you on (both environments).

          What is different between the two environments?

          --
          Adam
          • 2. Re: error invoking cfc: internal server error
            Daverms Level 3
            Hi,

            Try putting '?cfdebug' in your URL and see what the debug log window says.

            • 3. Re: error invoking cfc: internal server error
              larksys Level 1
              10/15/2007 07:50:13 PM

              Reply | Quote | Top | Bottom | Edit

              I'm a little frustrated with CF8 and the new Spry functions. I'm trying to convert my old autosuggests to the cfinput and binding with a function in a cfc. I'm trying to follow the examples but getting the following error;

              Error invoking CFC /components/tsijobads cfc. Internal server error (enable debugging .......)

              The code is;

              <cffunction name="getCompanies" access="remote" returntype="array" output="false" description="Returns submission titles">
              <cfargument name="term" type="string" required="true">
              <cfset var CnameQry = "">
              <cfquery name="CnameQry" datasource="AS400" dbtype="ODBC" maxrows="50">
              SELECT rtrim(ltrim(csnam1)) as cname, rtrim(ltrim(csstat)) as state, rtrim(ltrim(cscity)) as city, csrec## as companyid
              FROM cstatic
              WHERE UPPER(csnam1) LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="#ucase(left(arguments.term,255))#%">
              order by csnam1,cscity
              </cfquery>
              <!--- Build result array --->
              <cfset Carray = listotarray(CnameAry.csnam1)>

              <cfreturn Carray>

              </cffunction>



              <cfinput name="sfCname#counter#" id="sfCname#counter#" autosuggest="cfc:400comps.tsijobads.getCompanies({cfautosuggestvalue})" maxResultsDisplay="50">
              • 4. Re: error invoking cfc: internal server error
                larksys Level 1
                10/16/2007 02:38:54 AM

                Reply | Quote | Top | Bottom

                larksys wrote:

                > Error invoking CFC /components/tsijobads cfc. Internal server error (enable
                > debugging .......)

                > <cfinput name="sfCname#counter#" id="sfCname#counter#"
                > autosuggest="cfc:400comps.tsijobads.getCompanies({cfautosuggestvalue})"
                > maxResultsDisplay="50">
                >

                your error says your cfc is in /components/tsijobads
                your cfinput bind says it is in 400comps.tsijobads

                either on of them is a typo or you are trying to use a mapped cf folder,
                which is not allowed with ajax calls.

                --

                Azadi Saryev
                Sabai-dee.com
                http://www.sabai-dee.com
                • 5. Re: error invoking cfc: internal server error
                  larksys Level 1
                  10/16/2007 03:50:57 PM

                  Reply | Quote | Top | Bottom | Edit

                  This code works;

                  <cfinput name="sfCname#counter#" id="sfCname#counter#" size="40" autosuggest="cfc:400comps.tsijobads.getCompanies({cfautosuggestvalue})" maxResultsDisplay="50">

                  <cffunction name="getCompanies" access="remote" returntype="string">
                  <cfargument name="term" type="any" required="false" default="">
                  <cfset var CnameQry = "">
                  <cfquery name="CnameQry" datasource="AS400" dbtype="ODBC" maxrows="50">
                  SELECT rtrim(ltrim(csnam1)) as cname, rtrim(ltrim(csstat)) as state, rtrim(ltrim(cscity)) as city, csrec## as companyid
                  FROM cstatic
                  WHERE UPPER(csnam1) LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="#ucase(left(arguments.term,255))#%">
                  order by csnam1,cscity
                  </cfquery>
                  <cfreturn ValueList(CnameQry.cname)>
                  </cffunction>

                  ------------------------------------------------------------------------------------------ ---------
                  This code does not;

                  <cfinput type="text" name="sfiname#counter#" id="sfiname#counter#" autosuggest="cfc:400comps.tsijobads.getIndividualsH({cfautosuggestvalue})" maxResultsDisplay="50">

                  <cffunction name="getIndividualsH" access="remote" returntype="string">
                  <cfargument name="term" type="any" required="false" default="">
                  <cfset var IndivQry = "">
                  <cfquery name="IndivQry" datasource="AS400" dbtype="ODBC" maxrows="50">
                  SELECT rtrim(ltrim(isfnam)) as FNAME, rtrim(ltrim(islnam)) as LNAME, rtrim(ltrim(istitl)) as ITITLE, iswfon as WPHONE, isrec## as RECNUM
                  FROM istatic
                  WHERE UPPER(islnam) LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="#ucase(left(arguments.term,255))#%">
                  ORDER by islnam,isfnam
                  </cfquery>
                  <cfreturn ValueList(IndivQry.isfnam)>
                  </cffunction>

                  ------------------------------------------------------------------------------------------ ----------
                  I don't think the mapped folder is the problem. I solved part of the problem by changing the function output type to "string" and returning a list. Some of the examples and cfml ref are just plain wrong. Hard to believe, huh.

                  I just noticed that I have a type of "text" on one cfinput and not the other. I just tested it without "text" and it didn't make a difference
                  • 6. Re: error invoking cfc: internal server error
                    larksys Level 1
                    10/17/2007 03:56:56 PM

                    Reply | Quote | Top | Bottom | Edit

                    Started from scratch using cfinput and autosuggest. It works fine. I just can't find the error in the above code.