Issue with CF9 - MG mixing up controllers from different sites

1 view
Skip to first unread message

Ryan Stille

unread,
Jan 15, 2010, 10:18:37 PM1/15/10
to model-glue
I'm having a weird issue. I run a couple sites on my workstation,
using Apache. I installed CF9 alongside my already installed CF8, and
changed Apache to use CF9. If I start up CF9 then hit either site,
that site works fine. But the 2nd site I go to never works, I get odd
errors referencing services that don't and shouldn't exist on that
site.

I finally figured out that when I go to the 2nd site, its using the
main controller from the first site. Both sites have a main
controller located at /controller/Contoller.cfc, and it seems
ColdFusion is getting confused.

When I change Apache back to using CF8, everything works ok. So its
either an issue with CF9 or my installation of CF9. I've checked a
couple things - "Trusted cache", "Save class files", and "Cache web
server paths" are all turned off. I've also stopped the server,
deleted all the files from the cfclasses directory, and restarted.

I've been working on this all day, I'm pretty much out of ideas. Any
suggestions?

Thanks,
-Ryan

Zac Spitzer

unread,
Jan 15, 2010, 10:25:14 PM1/15/10
to model...@googlegroups.com
are you using different application names in application.cfc/cfm ?

2010/1/16 Ryan Stille <ryan....@gmail.com>:

> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to model...@googlegroups.com
> To unsubscribe from this group, send email to
> model-glue+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>

--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168

Ryan Stille

unread,
Jan 15, 2010, 10:27:29 PM1/15/10
to model-glue
I just double checked - yes they are different.

Bob Silverberg

unread,
Jan 15, 2010, 11:16:40 PM1/15/10
to model...@googlegroups.com
Is it possible that your install of CF9 somehow has an admin mapping of /Controller?  Sounds like some sort of mapping issue.

--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

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



--
Bob Silverberg
www.silverwareconsulting.com

Hands-on ColdFusion ORM Training @ cf.Objective() 2010
www.ColdFusionOrmTraining.com/


Ryan Stille

unread,
Jan 15, 2010, 11:26:36 PM1/15/10
to model-glue
That is what it seems like. I checked the mappings, they are setup
the exact same way as CF8. I only have a couple mappings, one for
ColdSpring, one for ModelGlue, one for my components.

-Ryan

On Jan 15, 10:16 pm, Bob Silverberg <bob.silverb...@gmail.com> wrote:
> Is it possible that your install of CF9 somehow has an admin mapping of
> /Controller?  Sounds like some sort of mapping issue.
>
>
>
>
>
> On Fri, Jan 15, 2010 at 10:27 PM, Ryan Stille <ryan.sti...@gmail.com> wrote:
> > I just double checked - yes they are different.
>
> > On Jan 15, 9:25 pm, Zac Spitzer <zac.spit...@gmail.com> wrote:
> > > are you using different application names in application.cfc/cfm ?
>
> > --
> > Model-Glue Sites:
> > Home Page:http://www.model-glue.com
> > Documentation:http://docs.model-glue.com
> > Bug Tracker:http://bugs.model-glue.com
> > Blog:http://www.model-glue.com/blog
>
> > You received this message because you are subscribed to the Google
> > Groups "model-glue" group.
> > To post to this group, send email to model...@googlegroups.com
> > To unsubscribe from this group, send email to

> > model-glue+...@googlegroups.com<model-glue%2Bunsubscribe@googlegrou ps.com>

Sean Corfield

unread,
Jan 16, 2010, 2:44:34 AM1/16/10
to model...@googlegroups.com
CF9 has added some more caching to speed up CFC instantiation so I
suspect you're running foul of that. There's multi-web / multi-site
setting and there's a CFC path cache setting, I believe (sorry for
being vague, I don't run CF9 so I'm going off memory of early builds
that I had access to).

Sean

Chris Blackwell

unread,
Jan 16, 2010, 3:31:49 AM1/16/10
to model...@googlegroups.com
clear both your template and cfc cache. I've found CF9's caching to be
over agressive even with all the cache options turned off, but that
usually cures the problem for me.

-Chris

Ryan Stille

unread,
Jan 16, 2010, 1:44:39 PM1/16/10
to model-glue
Chris what directories are those? I cleared the cfclasses directory.

-Ryan

On Jan 16, 2:31 am, Chris Blackwell <ch...@team193.com> wrote:
> clear both your template and cfc cache. I've found CF9's caching to be
> over agressive even with all the cache options turned off, but that
> usually cures the problem for me.
>
> -Chris
>
>
>
> On Saturday, January 16, 2010, Sean Corfield <seancorfi...@gmail.com> wrote:
> > CF9 has added some more caching to speed up CFC instantiation so I
> > suspect you're running foul of that. There's  multi-web / multi-site
> > setting and there's a CFC path cache setting, I believe (sorry for
> > being vague, I don't run CF9 so I'm going off memory of early builds
> > that I had access to).
>
> > Sean
>

Ezra Parker

unread,
Jan 16, 2010, 3:38:56 PM1/16/10
to model...@googlegroups.com
Hi Ryan,

Chris is referring to the "Clear Template Cache Now" and "Clear
Component Cache Now" controls on the Server Settings > Caching page of
the CF Admin.

I did some experimenting, and was able to reproduce this problem with
a couple of simple test cases (if anyone is interested in trying this
out, email me off-list and I'll send them over). I set up two new MG
sites from the app template, and configured them both to run under
virtual hosts by changing all the paths so that the apps would run
directly in the webroot. I then added a different model component for
each, naming them Service1 and Service2, and wired one into each of
the two controllers using the "beans" attribute on the cfcomponent
tag.

At least in the scenario I set up, the the problem arose when enabling
the "Component cache" option in the admin -- when this was enabled,
the first site to initialize worked fine, and the second blew up, as
the controller from the first site was being used, and it was
referencing a CFC that did not exist in the CS bean factory for that
site. Disabling this setting resolved the issue, and both sites were
able to spin up. I didn't see you mention that you had disabled the
component cache, so I am presuming that will resolve the problem for
you.

It does occur to me, however, that this problem may well arise on
production sites (when more than one site is present on a server)
where it may be desirable for the component cache to be enabled. In
this case I would recommend a strategy of setting up a mapping for the
site, and using this mapping in all the MG paths. For example, instead
of referencing your controller as:

<controller id="Controller" type="controller.Controller">

Set up a mapping ("mysite", in this example), and use this instead:

<controller id="Controller" type="mysite.controller.Controller">

HTH,

--
Ezra Parker

> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to model...@googlegroups.com
> To unsubscribe from this group, send email to
> model-glue+...@googlegroups.com

Ryan Stille

unread,
Jan 16, 2010, 7:22:45 PM1/16/10
to model-glue
Chris & Ezra, thank you. Turning off the Component Cache did fix the
problem. I guess that must be new in CF9, I wasn't aware of it and
for some reason I didn't even see it when I was looking on the Caching
page. I guess I skimmed through there too fast.

In my opinion Adobe should have turned it off by default, if its going
to cause issues like this.

Thanks again,
-Ryan

Reply all
Reply to author
Forward
0 new messages