Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Cfthread Error, Cannot Find File "taglib.cftId"

Guest
Mar 22, 2012 Mar 22, 2012

I am using several threads within a ColdFusion request to create PDF files.  When I run the code on my ColdFusion developers edition environment, it works just fine.  However, when I attempt to run it on another environment, I always get the same error:

An error occurred when performing a file operation read on file MYAPPDIRECTORY\WebRoot\WEB-INF\cftags\META-INF\taglib.cftld. The cause of this exception was: java.io.FileNotFoundException: MYAPPDIRECTORY\WebRoot\WEB-INF\cftags\META-INF\taglib.cftld (The system cannot find the path specified).

The issue is of course that ColdFusion is looking in the incorrect directory.  I researched the issue and found the mention of a ColdFusion bug, but I am curious if anybody else has run into a similar issue and if they found a workaround/solution.

4.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2012 Mar 23, 2012

In my opinion, taglib.cftld is a sysytem file. I can imagine why ColdFusion complains. Shouldn't the path be {CF_INSTALLATION_DIR}\wwwroot\WEB-INF\cftags\META-INF\taglib.cftld instead of MYAPPDIRECTORY\WebRoot\WEB-INF\cftags\META-INF\taglib.cftld?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 23, 2012 Mar 23, 2012

Yes, it should, but it "changes" within the thread.  See http://www.elliottsprehn.com/cfbugs/bugs/83835#votes.

If you run

getPageContext().getServletContext().getRealPath("/WEB-INF")

from outside a ColdFusion <cfthread> and then run it within the <cfthread>, the returned filepath changes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2012 Mar 24, 2012

What's your ColdFusion version/build? Since the taglib.cftld issue has been registered as a bug. I would my advise you to install the appropriate hot fix.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 26, 2012 Mar 26, 2012

ColdFusion 9.0.1.274733.  Does ColdFusion has a hot fix "site" to download current hot fixes?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2012 Mar 26, 2012

Here is the hot fix for ColdFusion 9.0.1. Since hot fixes are cumulative, you need only install the most recent(in this case, hot fix 2). However, I am sorry I cannot tell whether your build (9.0.1.274733) is older or newer than hot fix 2. I suspect older. You'll have to verify this elsewhere before making any changes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 19, 2012 Nov 19, 2012

I have the same error...on a multiserver setup with jrun...

C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\redirect:\index.cfm\\WEB-INF\cftags\META-INF\taglib.cftld. The cause of this exception was: java.io.FileNotFoundException:

anybody knows if this bug is fixed?     I have 9,0,1,274733

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2012 Apr 30, 2012

Right before I run threads, I create the following component and run the one function on it.  It's a nice little work around.

component extends="com.adobe.coldfusion.base"

{

    public function cacheScriptObjects()

    {

        local.tags = ["CFFTP","CFHTTP","CFMAIL","CFPDF","CFQUERY","CFPOP","CFIMAP","CFFEED","CFLDAP"];

        for(local.tag in local.tags)

        {

            getSupportedTagAttributes(local.tag);

        }

    }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 03, 2013 Jun 03, 2013

Zach's trick worked for me in CF 9.0.1 Developer Ed.

There is no bug id 83835 in Adobe's new bugbase (https://bugbase.adobe.com/).  Did this get fixed yet?  How about in CF 10?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 27, 2014 Mar 27, 2014
LATEST

The bug ref in the new bugbase is https://bugbase.adobe.com/index.cfm?event=bug&id=3041891

And, no, Adobe have decided they have better things to do than fix this.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2012 Dec 11, 2012

This bug does not seem to be fixed, but Zack1590's workaround will solve the problem. 

The issue is that getSupportedTagAttributes cannot find the correct path for /WEB-INF as getRealPath does not work inside the cfthread. Luckily the results of getSupportedTagAttributes are cached in server memory. This means that if the tags are called from outside a cfthread first they will then work fine inside the cfthread. By making sure all the custom tags are called before entering the cfthread Zack1590 is able to avoid this error.

More info: http://www.danielgaspar.com/blog/2012/12/taglib-cftld-the-system-cannot-find-the-path-specified/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources