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

cfclocation hell

New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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>

TOPICS
Advanced techniques

Views

2.0K

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 ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied


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.

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
LEGEND ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

Thanks.

I had it correct originally and then mistyped it along the way but it still does not work as

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

or

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

or

<cfset this.ormsetting.cfclocation ="\ORM\cfc">

-----------------------------------------------------------------------------------------------------

<cfcomponent output="false">       
    <cfset this.name = "arty">
    <cfset this.ormenabled = "true">
    <cfset this.datasource = "cfartgallery">
    <cfset this.ormsettings.logSQL = "true">
    <cfset this.ormsetting.cfclocation ="ORM.cfc">
</cfcomponent>

Thanks 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
LEGEND ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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

or

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

or

<cfset this.ormsetting.cfclocation ="\ORM\cfc">

It's ormsettings

Just in case that's a typo, did you try - as I suggested - a full path:

<cfset this.ormsettings.cfclocation = "C:\path\to\where\the\file\is\ORM\cfc">

?

--

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

Yes. I did try the full path when you first suggested that.

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
LEGEND ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

This is beginning to be like pulling teeth.

Did you see the bit I mentioned about it being this.ormsettings, not this.ormsetting?

--

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

Yes I did and changed that typo.

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

The full path + ormsettingS worked.

Thank you.

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

The full path + changing ormsetting to ormsettingS worked.

C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\ORM\cfc

Thank you for your help.

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
LEGEND ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

NP.

I don't think the docs for cfclocation are particularly clean, to be honest.  And with no examples to go on, they're not very helpful.

Glad you got it sorted out though.

--

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
New Here ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

LATEST

Yes. Thanks 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