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

cfc does not work

Guest
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

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?
TOPICS
Advanced techniques

Views

316

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
Community Expert ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

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>

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
Guest
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

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

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
Community Expert ,
Jun 20, 2006 Jun 20, 2006

Copy link to clipboard

Copied

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.

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
Community Expert ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

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?



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
Guest
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

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

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