factory.cfc having trouble finding resources

22 views
Skip to first unread message

James Eisenlohr

unread,
Jan 21, 2012, 9:58:58 PM1/21/12
to taffy...@googlegroups.com
Using Railo 3.3.1. Factory.cfc is erroring out on line 41:

<cfset this.beans[local.beanName] = createObject("component", "resources." & local.beanName) />

The error says it cannot find the resource...

When I output the arguments.beanPath, it gave me the correct path to the resources:

/Library/Railo/tomcat/webapps/ROOT/experiments.com/api/v1//resources

Yes, it had 2 forward slashes before the folder resources, so I modified api.cfc to give me the correct path:

/Library/Railo/tomcat/webapps/ROOT/experiments.com/api/v1/resources/

Still the resources weren't being found, so I dumped what cfdirectory was finding on line 36 of factory.cfc and it finds both of my cfcs, CustomRepresentationClass.cfc and pingCollection.cfc.

Trying to understand how the method loadBeansFromPath can instantiate (locate) my resources in the following line? Should arguments.beanPath be used?

<cfset this.beans[local.beanName] = createObject("component", "resources." & local.beanName) />

Would appreciate any suggestions! Thank you!


AJ Mercer

unread,
Jan 21, 2012, 10:28:17 PM1/21/12
to taffy...@googlegroups.com
what version of taffy are you using?

There is a Railo branch
and a 1.1 which I *think* has the Railo mods

James Eisenlohr

unread,
Jan 21, 2012, 10:48:48 PM1/21/12
to taffy...@googlegroups.com

Using latest 1.1rc. Downloaded today.

James Eisenlohr

unread,
Jan 21, 2012, 10:49:34 PM1/21/12
to taffy...@googlegroups.com

Oh Gotcha... will tty that one out... wasn't using Railo version. Thanks!

On Jan 21, 2012 9:28 PM, "AJ Mercer" <ajme...@gmail.com> wrote:

James Eisenlohr

unread,
Jan 21, 2012, 11:48:54 PM1/21/12
to taffy...@googlegroups.com
Thank you, AJ! Used the 1.1-rc branch and it works!

AJ Mercer

unread,
Jan 21, 2012, 11:57:28 PM1/21/12
to taffy...@googlegroups.com
Adam, can you please advise with version of Taffy will support Railo (and openBD)?

James Eisenlohr

unread,
Jan 22, 2012, 12:33:39 AM1/22/12
to taffy...@googlegroups.com
Well, I tried using both the 1.1-rc and the Railo branches. I was able to get past the error I had earlier (currently using Railo branch). I can see this line of code was updated within factory.cfc:

<cfset this.beans[local.beanName] = createObject("component", arguments.resourcesPath & "." & local.beanName) />

However, even though my resources now show up in the dashboard, when I try the mock client, I keep getting a 404 error saying the requested resource was not found? The path looks correct?

/api/v1/index.cfm/artists

Suggestions?

Thanks!

AJ Mercer

unread,
Jan 22, 2012, 1:11:57 AM1/22/12
to taffy...@googlegroups.com
check out this mail thread

you need to edit the Tomcat web.xml to pass /api/v1/index.cfm to Railo

Adam Tuttle

unread,
Jan 22, 2012, 7:49:43 AM1/22/12
to taffy...@googlegroups.com
AJ, the ultimate goal is for "all" ("the only") version of Taffy to support Railo. It seems that the changes currently in the Railo branch may be all that is necessary (from a code standpoint). If that's the case, perhaps it is time to merge that branch back into 1.1rc1.

There will definitely need to be documentation about the configuration differences on Tomcat. I'll add that to my to-do list. :)

James, if you run across _any_ other issues with running Taffy on Railo, please do report them here.

Adam
Reply all
Reply to author
Forward
0 new messages