CF9 ORM Problem

2 views
Skip to first unread message

Pavan

unread,
Sep 12, 2010, 11:04:23 PM9/12/10
to ColdFusion User Group - New Zealand
Hi Guys,

I have a question. I am getting this error when trying to use the CF9
built in ORM. I have tried several different combinations of code
without success:

"ORM is not configured for the current application"

Does anyone have any clues or suggestions?

All basic setting have been done including database creation and
population, datasource creation in cfadmin and the cfcs are all done
as required. Is there something I am missing?

The platform is CF9 on linux, with apache.

Thanx already.

Damen Hansen

unread,
Sep 13, 2010, 5:56:58 PM9/13/10
to cfugau...@googlegroups.com
Is it possible you have an errant ORMReload() somewhere that's getting 
hit in a different request?  or hidden somewhere, where it is being reset and requested simultaneously?
Damen


--
You received this message because you are subscribed to the Google Groups "ColdFusion User Group - New Zealand" group.
To post to this group, send email to cfugau...@googlegroups.com.
To unsubscribe from this group, send email to cfugauckland...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfugauckland?hl=en.


Pavan

unread,
Sep 14, 2010, 7:33:50 PM9/14/10
to ColdFusion User Group - New Zealand
Hi Damen, Thanx for you reply. With help from Liam Donaldson (thanx
bro), I found out that the main problem was the location of the orm
definitions. it should look something like this in Application.cfc
(pretty basic).

<cfset this.name = "myorm1">
<cfset this.datasource = "mydatasource">
<cfset this.ormenabled = "true">
<cfset this.ormsettings = { dialect="MySQL", cfclocation="/ormfolder",
flushAtRequestEnd=true } />

This set of codes should live outside the onApplicationStart function.
It's best to keep the orm cfcs in a separate folder specified in the
"cfclocation" variable for the orm settings. Otherwise Coldfusion
decends all the directories and starts looking through all the cfcs
for orm codes and database table links.

Correct me if I am wrong here. Another minor thing, but worth noting
for those who install cf with all default settings, is to set a non
zero value for the max and default timeout values for Application
variables in the cf administrator under Server Settings > Memory
Variables. I am yet to confirm this. But i ran into the issue when I
installed CF9 and tried to use ORM codes without any tweaks in the cf
admin. It kept on giving me the above mentioned error message until i
set some value in the administrator.

On Sep 14, 9:56 am, Damen Hansen <damen.han...@gmail.com> wrote:
> Is it possible you have an errant ORMReload() somewhere that's getting
> hit in a different request?  or hidden somewhere, where it is being reset
> and requested simultaneously?
> Damen
>
> On 13 September 2010 15:04, Pavan <pava...@gmail.com> wrote:
>
> > Hi Guys,
>
> > I have a question. I am getting this error when trying to use the CF9
> > built in ORM. I have tried several different combinations of code
> > without success:
>
> > "ORM is not configured for the current application"
>
> > Does anyone have any clues or suggestions?
>
> > All basic setting have been done including database creation and
> > population, datasource creation in cfadmin and the cfcs are all done
> > as required. Is there something I am missing?
>
> > The platform is CF9 on linux, with apache.
>
> > Thanx already.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ColdFusion User Group - New Zealand" group.
> > To post to this group, send email to cfugau...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cfugauckland...@googlegroups.com<cfugauckland%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages