Skip to main content
Known Participant
June 15, 2010
Question

cfclocation hell

  • June 15, 2010
  • 1 reply
  • 2201 views

The ORM which did work fine when everything was in the same directory gives this error

Could not find the ColdFusion component or interface ORM.Artist.

when I moved the Artist.cfc to its own folder at C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\ORM\cfc

I am using this in the application.cfc

<cfcomponent

n

output="false">

<cfset this.name = "arty"> <cfset this.ormenabled = "true">

<cfset this.datasource = "cfartgallery">

<cfset this.ormsettings.logSQL = "true">

<cfset this.cfclocation="/ORM/cfc">

</cfcomponent>

I have also tried <cfset this.cfclocation="ORM.cfc">

I tried using script notation in the application.cfc, creating a mapping in admin, every kind or dot, backslash and forward slash I could think of.

No joy. Any help greatly appreciated. This is the Artist.cfc -- stolen straight

<cfcomponent output="false" persistent="true" table="Artist" hint="Hint.">

<cfproperty name="artistid" type="numeric" validate="integer" setter="false" hint="Hint"

persistent="true" fieldtype="id" column="id" ormtype="integer" generator="identity" length="10"/>

<cfproperty name="firstname" type="string">

<cfproperty name="lastname" type="string">

<cfproperty name="address" type="string">

<cfproperty name="city" type="string">

<cfproperty name="state" type="string">

<cfproperty name="postalcode" type="string">

<cfproperty name="email" type="string" validate="email">

<cfproperty name="phone" type="string" validate="telephone">

<cfproperty name="fax" type="string" validate="telephone">

<cfproperty name="thepassword" type="string">

</cfcomponent>

This topic has been closed for replies.

1 reply

Inspiring
June 15, 2010

Try using either a full filesystem path, or lose the leading slash (provided your orm dir is in your CF root dir).  Full file system path has always worked for me, and in googling around just now, I see other people have used a relative path rather than an absolute one.

--

Adam

Known Participant
June 15, 2010


Still burning...

With the complete path I just get a different error message.

Could not find  the ColdFusion component or interface  C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\ORM\Artist.cfc.

I have been playing with the this.cfclocation property.

It seems that no matter what I type in there -- even nonsence -- the property is alwats ignored and CF looks for the cfc in ORM directory not ORM/cfc.

As soon as I move Artist.cfc back to ORM directory everyhting works fine no matter what is in the cfclocation property.

http://localhost:8300/ORM/list.cfm works fine.

Thanks for the response.

Inspiring
June 15, 2010

Oh.  Just noticed something you said... it's this.ormsettings.cfclocation, not this.cfclocation.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSED380324-6CBE-47cb-9E5E-26B66ACA9E81.html

--

Adam