Leftbower
Rookie
Joined: 02/09/09
Posts: 13 |
Collisions between apps
03/11/10 11:28 AM
I am in process of converting a couple of apps over to Coldbox (using the latest "M4" release", on Win 7 Pro IIS7.5 and CF9 dev boxes).
I am getting collisions between the 2 apps. When I try to load up the second app after the first app has been loaded - even if a separate browser - I can see that the cb controller's 'invoker' method is calling a cfc method from the first app's directory.
Both apps' Application.cfc file are using the getCurrent Template Path method for the this.name setting. I even went so far as to prefix each with a unique app name (e.g. this.name="App1_"&getCurrentTemplatePath()......) but this did nothing.
Reinitializing the framework does nothing, only a restart of CF will allow me to start up app2 properly (making app1 inoperable in the process).
For what it's worth, my directory structure is as follows:
Coldbox (mapped in CF Admin as "/coldbox": C:\inetpub\wwwroot\coldbox_3.0.0.M4
App1: C:\inetpub\wwwroot\app1
App2: C:\inetpub\wwwroot\app2
Please help? Andy
|
|
Link | Top | Bottom
|
lmajano
Veteran Master
Joined: 01/29/05
Posts: 1209 |
RE: Collisions between apps
03/11/10 1:15 PM
Andy,
Thjat is weird as what drives the application scope is the Application.cfc with the this.name fproperty. Luis Majano
|
|
Link | Top | Bottom
|
Leftbower
Rookie
Joined: 02/09/09
Posts: 13 |
RE: Collisions between apps
03/11/10 1:46 PM
I know... it is happening on 3 dev machines:
1 -- Win 7 Pro 64-bit, 32-bit CF9 2 -- same 3 --- Win 7 Pro 32-bit, CF9
all use M4 release of CB, mapped in CF Admin as "coldbox"
I also use my hosts file to give each site a name (e.g. "www.app1.com" ---> 127.0.0.1, "www.app2.com" ---> 127.0.0.1) and each bound to proper Host Name in IIS.
I tried using http://localhost/app1/ and got this error: "Error creating bean: app1model.user.userBean" (notice the "." is missing after the app1)
I have this in ModelMappings.cfm: addModelMapping(path="user.userBean");
so perhaps all related to same thing?
Where do I start looking here?
|
|
Link | Top | Bottom
|
Leftbower
Rookie
Joined: 02/09/09
Posts: 13 |
RE: Collisions between apps
03/11/10 6:36 PM
I put individual copies of CB into each of the apps directories and now it works fine without any collisions (obviously, I suppose!)
However, it only works when using the name in my hosts file (i.e. 'www.app1.com') I get a CB error when trying to browse to it via http://localhost/app1/
An error occured while Parsing an XML document. Content is not allowed in prolog. The error occurred in C:\inetpub\wwwroot\app1\coldbox\system\web\loader\FrameworkLoader.cfc: line 70 Called from C:\inetpub\wwwroot\app1\coldbox\system\web\Controller.cfc: line 43 Called from C:\inetpub\wwwroot\app1\coldbox\system\Coldbox.cfc: line 69 Called from C:\inetpub\wwwroot\app1\coldbox\system\Coldbox.cfc: line 92 Called from C:\inetpub\wwwroot\app1\Application.cfc: line 52 68 : 69 : // Parse settings 70 : fwXML = xmlParse(instance.FrameworkConfigFile); 71 : 72 : //Get SettingNodes From Config
|
|
Link | Top | Bottom
|