2

I've used ModelGlue and ColdSpring for years on previous projects without issue. I'm building this new website using CF10 ModelGlue 3.2.

I've downloaded and installed the framework, built the site on my local development MacBook without issue, and attempted to deploy it into the client's environment... Bad news!

They use IIS, and at first glance appears to be served from their webroot, but through some IIS voodoo and '/' mapping in CFAdmin, they serve

http://b.company.com/ ---> D:\inetpub\wwwroot\a\b\index.cfm

After fiddling around to find a placement for the frameworks, I have the settled on:

D:\inetpub\wwwroot\a\b\coldspring
D:\inetpub\wwwroot\a\b\ModelGlue

in D:\inetpub\wwwroot\a\b\Application.cfc:

this.mappings['coldspring'] = expandPath('./coldspring/');
this.mappings['ModelGlue'] = expandPath('./ModelGlue/');

When I run it, I get a MG framework instantiation issue of the first bean it tries to grab out of ColdSpring (which changes periodically):

Could not find the ColdFusion component or interface D:\inetpub\wwwroot\ModelGlue\gesture\factory\TypeDefaultingMapBasedFactory.cfc.

However, the issue is actually coming from the parent bean (extends) failing to instantiate. Modifying the cfc slightly gives some diagnostics:

<cftry>
    <!--- original line below --->
    <cfset variables.beanInstance = createObject("component", getBeanClass()) />
    <cfcatch type="any">
        <cfdump var="#expandPath(".")#" />
        <cfdump var="#getBeanClass()#" />
        <cfdump var="#cfcatch#" />
        <cfabort>
    </cfcatch>
</cftry>

yields:

D:\inetpub\wwwroot\a\b 
ModelGlue.gesture.module.XMLModuleLoaderFactory     
{error report}  

Notice that CS successfully locates and instantiates D:\inetpub\wwwroot\a\b\ModelGlue\gesture\module\XMLModuleLoaderFactory, but looks in a different directory (D:\inetpub\wwwroot\ModelGlue) for its parent. (For those unfamiliar, XMLModuleLoaderFactory extends="ModelGlue.gesture.factory.TypeDefaultingMapBasedFactory" as part of its cfc definition.


I'm at my wit's end; I've tried every possible configuration change, moved the libraries around,etc and come up short. As an external developer, I can't change their web server, but I do have full control over the App.cfc and everything below. Does anyone have any ideas what's going wrong?

Any help would be appreciated.


UPDATE (possibly solved)

I rolled back the ModelGlue version to 3.1.299 and this seems to have solved my issues.

I also overrode the CFAdmin '/' mapping to point to my application path

Application.cfc:

this.mappings['coldspring'] = expandPath('./coldspring/');
this.mappings['ModelGlue'] = expandPath('./ModelGlue/');
this.mappings['/'] = expandPath('.');

I'm not really sure what was going wrong with MG 3.2, but 3.1.299 seems to have helped.

4

0 回答 0