20 Replies Latest reply on May 15, 2015 12:41 PM by itisdesign

    It used to work and now it doesn't

    LouieWarren Level 1

      I have an application that has worked flawlessly until today.  Now, without code changes, I get the following, or similar, any time I try to do anything in the application

       

      Detail: Ensure that the name is correct and that the component or interface exists.

              Message: Could not find the ColdFusion component or interface secure.common.getreqstatus.
              StackTrace: coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion component or interface secure.common.getreqstatus.

       

      I do not have access to CF Admin on this server and have to depend on a government SysAdmin.   Does something need to be restarted?   Is there a new version of CF?   I am currently running 10 on my development server (different) and assume the government machine is the same.  We sync'd up a few months ago and everything has worked fine until today.  Any help would be greatly appreciated.

        • 1. Re: It used to work and now it doesn't
          haxtbh Level 4

          Check the update version you are both running. CF10 was updated to Update 16 yesterday (ColdFusion 11 Update 5 and ColdFusion 10 Update 16 released — Adobe ColdFusion Blog). There could be bugs fixed / caused in the updates and if you are not on the same one you may see different results.

           

          As well as the usual stuff like making sure no one has moved files around, mappings haven't been changed / removed

          • 2. Re: It used to work and now it doesn't
            LouieWarren Level 1

            My Test and Production servers reside at a gov't installation and I can't touch them.  I've been assured by the SysAdmn that both servers are currently at CF 10 Update 16. The error was on the Test server; the SysAdmin says he has no errors  on that server and it has to be my application.  I have not changed any code specific to where the errors show up.   I get two; the one above, and this one: could not find the ColdFusion component or interface secure.POI.POIUtility.    I have checked the directories on my FTP site and on that server they are there...  however instead of secure.POI.POIUtility, the are listed as secure/POI/POIUtility.cfc

             

            This is the same code that works on Production, so to me, it means something in the environment has changed.  Since I have no access to CF Admin on the Test machine, what can I ask the SysAdmin to do to help fix this?

            • 3. Re: It used to work and now it doesn't
              itisdesign Most Valuable Participant

              Hi Louie,

               

              Does writeOutput(expandPath('secure')) output the un|expected path?

               

              Thanks!,

              -Aaron

              • 4. Re: It used to work and now it doesn't
                LouieWarren Level 1

                Not sure what you mean.  I'm normally an Oracle DBA and dabbled in CF to help developers in a small group.  That was my old job, the new one, they asked for a DBA but most of the work is CF, so I'm learning as I go.

                 

                Cause:

                        [struct]
                        Detail: Ensure that the name is correct and that the component or interface exists.
                        Message: Could not find the ColdFusion component or interface secure.common.getreqstatus.
                        StackTrace: coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion component or interface secure.common.getreqstatus.\\\

                That's what I get for the one.  It displayed this when the other error happened (since it's government, I've erased some fields that don't make a difference):

                • 5. Re: It used to work and now it doesn't
                  itisdesign Most Valuable Participant

                  Hi Louie,

                   

                  In short, expandPath() expands a path to its absolute system path (full details here: ExpandPath - ColdFusion, English documentation - Adobe Learning Resources).

                   

                  Example: On a Windows development server having the /CFIDE mapping available, writeOutput(expandPath('/CFIDE')) might display C:\ColdFusion10\cfusion\wwwroot\CFIDE.

                   

                  I was basically suggesting to run the following, on the line of code immediately preceding the POIUtility.cfc call, to see if CF is looking in the expected location for the "secure" directory:

                   

                  writeOutput(expandPath('secure'));

                  abort;

                   

                  Thanks!,

                  -Aaron

                  • 6. Re: It used to work and now it doesn't
                    LouieWarren Level 1

                    Thanx for the hand holding!   I feel so stupid sometimes...   this is beyond my knowledge, but with each hurdle it's becoming part of it.   Thanx again.  I will attempt this and see what I get.

                     

                    Update-

                    Just checked the code.  Here's what they have:

                     

                    <!--- read file --->

                    <cfset poi = createobject("component", "secure.POI.POIUtility").init()>

                    <cfset arrSheets = poi.ReadExcel(FilePath = ExpandPath('temp/' & filepath), HasHeaderRow = true)>

                     

                    I included what you suggested prior to the comment and nothing changed.

                    • 7. Re: It used to work and now it doesn't
                      mtnhomes Level 1

                      Errors on Scheduled task. Can confirm this behavior just started in the past two days with NO changes. I can take the same URL and run in in a browser locally or on the server and no error.

                      • 8. Re: It used to work and now it doesn't
                        LouieWarren Level 1

                        A little background on, at least, the Test database/application.

                         

                        The database resides on a VM server and is one of 50 others.  Someone other than the SysAdmin or DBA for that machine, moved something and it caused VM to run out of space.  My server, and the 50 others, were down for almost 24 hours.  It is my belief that when they did what they had to do to get things back up, someone messed up the directory structure.  I just don't know what to tell the SysAdmin or DBA to look for and possibly do to correct this issue.  Sadly, I've had to do this before; search for the solution and walk them through it.  I am currently at a standstill.  Thanx for all the pointers so far.

                        • 9. Re: It used to work and now it doesn't
                          mtnhomes Level 1

                          I dropped a copy of the "missing" CFC into every folder where the script

                          that called for it resided. Messy but effective. Doesn't require admin

                          access - just access to the files structure.

                          • 10. Re: It used to work and now it doesn't
                            LouieWarren Level 1

                            No more messy than what I inherited.   So, you're saying put the getrequeststatus.cfc where the cfm file calls the routine?   I'm a rookie at CF.  I don't see any other calls, but need to search more.  There is another one POIUtility that is called a bunch and is also giving me an error.  I may try that first and then see what comes up!  Thank you!

                             

                            I know why I come here now.  If you can't help me guide the gov't SysAdmin, you can help me work around it.  Thank you so much!

                            • 11. Re: It used to work and now it doesn't
                              LouieWarren Level 1

                              I just copied the getreqstatus.cfc file to the directory where the .cfm file that calls it resides.  No change.

                              • 12. Re: It used to work and now it doesn't
                                mtnhomes Level 1

                                does getrequeststatus.cfc call any other routines? I don't usually work

                                with CFCs and was happy to find a quick solution.

                                • 13. Re: It used to work and now it doesn't
                                  LouieWarren Level 1

                                  Not that I can find.

                                  • 14. Re: It used to work and now it doesn't
                                    itisdesign Most Valuable Participant

                                    Hi Louie,

                                     

                                    Sorry for the delay and no worries.  Above <!--- read file --->, could you place <cfdump var="#expandPath('secure')#" abort="true"> then hit the URL and see if the correct or incorrect absolute system path to the "secure" directory is displayed?

                                     

                                    Thanks!,
                                    -Aaron

                                    • 15. Re: It used to work and now it doesn't
                                      LouieWarren Level 1

                                      Here's the code

                                       

                                      <cfset tick = GetTickCount()>   

                                      <!----Get Original LIST--->

                                      <cfobject name="getreqstatus" component="secure.common.getreqstatus">

                                      <cfset O_List=getreqstatus.GET_O_FLAGLIST(DataSource=datasource)>

                                       

                                      Right before the cfobject tag?   I'm not very well versed in CF.  The customer requested a DBA with some CF experience.  I can do that.  They really NEED an experienced CF developer with some Oracle background.   I have had to use my Oracle knowledge very little since I came on board.

                                       

                                      UPDATE: 8 May 2015

                                      That's where I put it.  What is displayed is secure/Requirement/secure   it appears to be looking for the secure directory within the Requirement directory, which is the directory where the calling cfm file resides.  It needs to go back to the same secure where Requirement resides; secure/Requirement and secure/common are in the same "root".  I have not changed the code.  What could the CF Admin have done to change this?  Thanx.

                                       

                                      Ok...  I created a secure/common/ subdirectory in Requirement and it worked.  I've bypassed the problem, but cannot figure why it happened.   The SysAdmin screwed something up and I want to find it and have him fix it.

                                      I was also able to correct another error I had searching for the POIUtility, by adding the subdirectory secure/POI in the directory where the calling .cfm file resided.  Messy, but it worked.

                                      • 16. Re: It used to work and now it doesn't
                                        itisdesign Most Valuable Participant

                                        Hi Louie,

                                         

                                        Could you please also retry using: <cfdump var="#expandPath('/secure')#" abort="true"> (added "/" before "secure") and see what is displayed?

                                         

                                        Also, starting from the 'Requirement' directory, could you please traverse up the directory structure towards the site's root and see if there is an Application.cfc or Application.cfm file anywhere along that path?

                                         

                                        Thanks!,

                                        -Aaron

                                        • 17. Re: It used to work and now it doesn't
                                          LouieWarren Level 1

                                          C:\ColdFusion10\cfusion\bin\xxxx-Dev\secure

                                           

                                          Yes, there is an Application.cfc in the secure directory.

                                          • 18. Re: It used to work and now it doesn't
                                            itisdesign Most Valuable Participant

                                            Hi Louie,

                                             

                                            If that is not the desired path to the "secure" directory, and you want "secure" to point to the same directory that the Application.cfc file is in, then could you try adding the following to the Application.cfc file where its other THIS.x settings are defined?

                                             

                                            THIS.mappings["/secure"] = getDirectoryFromPath(getCurrentTemplatePath())

                                             

                                            And then could you see if <cfdump var="#expandPath('/secure')#" abort="true"> returns the desired path to the "secure" directory?

                                             

                                            Thanks!,

                                            -Aaron

                                            • 19. Re: It used to work and now it doesn't
                                              LouieWarren Level 1

                                              That is the correct directory to start looking for the procedures.   Earlier, I created a /secure/common directory within the calling routine's directory and that fixed the problem.  A sloppy way to fix it, but it fixed it. 

                                               

                                              The initial intent of this thread was to give me something to tell the government SysAdmin I have to deal with to do the CF Admin duties for me.  They had a VM failure (disk filled up) and the entire application was down for a day.  Not sure how they fixed it, but now the application throws the error telling me it can't find common routines (that reside in /secure/common).  The government SysAdmin tells me "everything is fine on his end and it must be my code".   I haven't changed anything in the code that effects how these routines are called, especially the Application.cfc.  Thank you all for sharing things with me.  I was able to figure out that copying the common directory as mentioned above fixed it.  Without your pointers, I'd still be searching.  Thank you again!

                                              • 20. Re: It used to work and now it doesn't
                                                itisdesign Most Valuable Participant

                                                Hi Louie,

                                                 

                                                Thanks for confirming that is the correct directory.  I agree cloning directories isn't the proper solution and would like to help identify what actually went wrong.  Perhaps a mapping was removed from CF Admin.  It's intriguing that expandPath('/secure') resolves to the proper directory but <cfobject name="getreqstatus" component="secure.common.getreqstatus"> throws an error that it can't find the getreqstatus.cfc that's located in secure's "common" subdirectory.

                                                 

                                                Just to be clear, is C:\ColdFusion10\cfusion\bin\xxxx-Dev the website's root directory?  And is there also an Application.cfc file at C:\ColdFusion10\cfusion\bin\xxxx-Dev\Application.cfc as well as the one at at C:\ColdFusion10\cfusion\bin\xxxx-Dev\secure\Application.cfc?

                                                 

                                                Could you create a file named bar.cfm w/ this code?

                                                 

                                                <cfscript>

                                                  writeOutput(expandPath("/secure"));//should return "C:\ColdFusion10\cfusion\bin\xxxx-Dev\secure"

                                                  writeOutput("<br>" & expandPath("/secure/common"));//should return "C:\ColdFusion10\cfusion\bin\xxxx-Dev\secure\common"

                                                  writeOutput("<br>" & expandPath("/secure/common/getreqstatus.cfc"));//should return "C:\ColdFusion10\cfusion\bin\xxxx-Dev\secure\common\getreqstatus.cfc"

                                                  writeOutput("<br>" & fileExists(expandPath("/secure/common/getreqstatus.cfc")));//should return "YES"

                                                  writeDump(var=new secure.common.getreqstatus(), format="text");//should return "[cfc1] component secure.common.getreqstatus"

                                                </cfscript>

                                                 

                                                Then could you place a copy of that file at C:\ColdFusion10\cfusion\bin\xxxx-Dev\bar.cfm and C:\ColdFusion10\cfusion\bin\xxxx-Dev\secure\bar.cfm, and then run both (so basically, www.yourdomain.com/bar.cfm and www.yourdomain.com/secure/bar.cfm) and see what is displayed?

                                                 

                                                Edit: Please rename or remove the cloned directories (i.e. the /secure/common within the calling routine's directory) before running the above.

                                                 

                                                Thanks!,

                                                -Aaron