installation error (vm environment)

1 view
Skip to first unread message

judah....@gmail.com

unread,
Sep 3, 2008, 6:24:55 PM9/3/08
to onTap Framework
I figured I would finally give onTap a try and ran into an issue that
I suspect may have to do with my dev environment.

I'm running Win2K3 in a VM (using VMWare) along with CF 8 and SQL
Server 2005. I have a shared folder set up to map to a folder on my
host OS (Win XP Pro). CF doesn't like to play well with networked
drives so you have to reference the folder via UNC naming. So CF sees
the location of this folder as \\.host\Shared Folders\web_projects
\wwwroot\_default_\

I unzipped the 3.2 version of onTap and dropped it in that folder and
when I first hit it using http://vm/ontap I get the following error:

Could not find the ColdFusion Component or Interface host.Shared
Folders.web_projects.wwwroot._default_.ontap._tap._cfc.fileformat.resourcebundle.
Ensure that the name is correct and that the component or interface
exists.

The error occurred in \\.host\Shared Folders\web_projects\wwwroot
\_default_\ontap\tap.cfc: line 240
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\_libraries\core\getobject.cfm: line 29
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\fileman.cfc: line 28
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\fileman.cfc: line 69
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\fileman.cfc: line 35
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\_customtags\translate.cfm: line 44
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\_application\100_i18n.cfm: line 3
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\_tap\_prerequest.cfm: line 7
Called from \\.host\Shared Folders\web_projects\wwwroot\_default_\ontap
\Application.cfc: line 180

238 : <cfargument name="path" type="string" required="true">
239 : <cfargument name="type" type="string" required="false"
default="component" hint="component or webservice">
240 : <cfreturn CreateObject(type,REReplaceNoCase(path,"\.cfc
$",""))>
241 : </cffunction>
242 :


I went and looked and resourcebundle.cfc does exist and I can open it
just fine. I'm guessing that is an issue with CreateObject or the path
expansion because I'm using files on a UNC directory. Any thoughts on
the best way to get this working (besides changing my dev
environment? :) )

Thanks,
Judah

Isaac Dealey

unread,
Sep 4, 2008, 10:19:21 PM9/4/08
to onta...@googlegroups.com
> I figured I would finally give onTap a try and ran into an issue that
> I suspect may have to do with my dev environment.

Hi Judah, thanks for giving it a spin. :)

I would bet that yes the problems you're having are related to the UNC
path. In the /_tap/ directory there's a path.cfc which is created once
for each request and responsible for setting some path information about
the environment.

Within that component, #this.root# is the application root directory
(the /ontap/ directory in the archive), and #this.domain_relative# is
supposed to be the portion of the file path between the web root and the
application root. So in the case of an application at http://vm/ontap
the value of #this.domain_relative# should be "/ontap".

I'd be willing to bet one or more of those values either aren't what
they're supposed to be. Although it may still not work properly even if
they are correct because other parts of the system may not know how to
handle the UNC path. I honestly don't know, because I've never used it
in that environment. I don know there are a number of parts of the
system that use java.io.File.getCanonicalPath() in order to normalize
file paths. That may return the UNC path, but it may also return a file
path on that machine starting with the drive, again I don't know.

Anyway, I hope that information helps. Let me know if you have any other
questions. And of course, if you're able to make it work with the UNC
path, absolutely let me know so I can include your mods in the public
distribution. :)


--
[ ike ] founder - onTap framework

phone: 781.769.0723

http://on.tapogee.com


Judah McAuley

unread,
Sep 5, 2008, 3:11:03 PM9/5/08
to onta...@googlegroups.com
I've poked around a little bit, might have more time this weekend, but
in the getDomainRelative function of path.cfc I'm wondering why you
don't use GetContextRoot() If what you want to return is the relative
path from webroot, I'd think that that function would do it for you.
Perhaps there is something funky about it that I'm not aware of?

Thanks,
Judah

Judah McAuley

unread,
Sep 5, 2008, 3:24:51 PM9/5/08
to onta...@googlegroups.com
Also, just so you know, I did a little test on getCanonicalPath() and
it correctly returns a UNC path:

<cffunction name="init" access="public" output="false">
<cfargument name="file" type="string" required="true" />
<cfset var fso = CreateObject("java","java.io.File") />
<cfset variables.file = fso.init(arguments.file).getCanonicalPath() />
</cffunction>
<cfscript>
init(expandpath("/ontap/_tap/localman.cfc"));
</cfscript>
<cfoutput>
#variables.file#
</cfoutput>

That outputs: \\.host\Shared
Folders\web_projects\wwwroot\_default_\ontap\_tap\localman.cfc

Isaac Dealey

unread,
Sep 5, 2008, 3:58:27 PM9/5/08
to onta...@googlegroups.com
> I've poked around a little bit, might have more time this weekend, but
> in the getDomainRelative function of path.cfc I'm wondering why you
> don't use GetContextRoot() If what you want to return is the relative
> path from webroot, I'd think that that function would do it for you.
> Perhaps there is something funky about it that I'm not aware of?

Ya know... I just never noticed that function... :)

Started doing this little dance with figuring out those paths on CF5 and
have stuck with it... I'd have to test getContextRoot() to see how well
it works.

Since I've never used it, I couldn't say whether there would be any
issues with for example my Apache install where I've got several "sites"
on my notebook at different depths. So for example the virtual host
"localhost" is at c:\apache\htdocs\ but then "ontap" is at
\htdocs\tap\ontap\ "df" is at \htdocs\tap\datafaucet\ and "demo" is at
\htdocs\demo\. But they all use the same CF instance, just different
virtual hosts in Apache.

If it works across at least as many configurations as the code I have,
then I'm all for swapping it out. :)

Thanks Judah, really appreciate your help. :)

Reply all
Reply to author
Forward
0 new messages