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

error invoking cfc: internal server error

Explorer ,
Oct 22, 2007 Oct 22, 2007

Copy link to clipboard

Copied

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".
TOPICS
Advanced techniques

Views

872

Translate

Translate

Report

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
LEGEND ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

> 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

Votes

Translate

Translate

Report

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
Advocate ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

Hi,

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

Votes

Translate

Translate

Report

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
Explorer ,
Oct 25, 2007 Oct 25, 2007

Copy link to clipboard

Copied

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">

Votes

Translate

Translate

Report

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
Explorer ,
Oct 25, 2007 Oct 25, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Oct 25, 2007 Oct 25, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Oct 25, 2007 Oct 25, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

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
Documentation