Skip to main content
New Participant
April 20, 2021
Answered

DirectoryWatcher Event Gateway not finding my cfc

  • April 20, 2021
  • 2 replies
  • 356 views

I am trying to create my first event gateway.  For now, I just want to log when a file is put into a specified directory.  It seems it should be simple, but I keep getting an error in the eventgateway log:

Error","Thread-339","04/20/21","17:11:33","","Error invoking CFC for gateway videowatcher: Could not find the ColdFusion component or interface image. {GATEWAYTYPE={FileWatcher},CFCMETHOD={onAdd},DATA={{LASTMODIFIED={Tue Apr 20 17:11:24 CDT 2021},FILENAME={C:\home\safetyforward.com\wwwroot\safety\present\connectionsCameraTesting\uploads\drop98.webm},TYPE={ADD}}},GATEWAYID={videowatcher},ORIGINATORID={},CFCPATH={C:/ColdFusion2021/cfusion/gateway/cfc/examples/videowatcher.cfc}}. Ensure that the name is correct and that the component or interface exists."

 

My gateway name is videowatcher.  When i put a file in the directory I'm watching the gateway is firing, but it can't seem to find the videowatcher.cfc.  This despite when I create the event watcher in CF Admin I browse the server to the the videowatcher.cfc file and the event watcher updates correctly.  I think it is finding and using my .cfg file or elese it would not know what directory to watch and fire.

 

I'm stumped.  It should be simple but I can't figure it out.  Any ideas?

 

Thanks

    This topic has been closed for replies.
    Correct answer klemke

    The CFC was found ok. The actual error was a bad method in the CFC. 

    2 replies

    BKBK
    Braniac
    April 25, 2021

    Any joy yet, @klemke ?

    klemkeAuthorCorrect answer
    New Participant
    April 25, 2021

    The CFC was found ok. The actual error was a bad method in the CFC. 

    BKBK
    Braniac
    April 21, 2021

    The error suggests that a path value is wrong. Quite likely that of the directory.

     

    Copy the file drop98.webm back to the directory. Then do a test: launch the following code as the page test.cfm and see what it says

     

     

    <cfoutput>	
    	File exists in DirWatcher directory: #fileExists("C:\home\safetyforward.com\wwwroot\safety\present\connectionsCameraTesting\uploads\drop98.webm")# <br>
    	DirWatcher Listener CFC exists:#fileExists("C:/ColdFusion2021/cfusion/gateway/cfc/examples/videowatcher.cfc")#	
    </cfoutput>