FileWatcher Troubleshooting Options I have setup a Credential/Procedure/Program/File Watcher/Job to monitor a folder for new files, but it is not working.  I am trying to figure out what I can check to troubleshoot why this isn't working.  After scaling back the code to a bare minimum, here are somethings I have already done.


Verify that files are being created in the folder monitored - They are.
Verify that the procedure can be run by itself - It can.
Verify that the File Watcher shows up in DBA_Scheduler_File_Watchers and is enabled. - It does and is.
Verify that DBA_Scheduler_Job_Run_Details shows a successful execution - It does NOT show any entries for this job.
Check the alert log - Nothing interesting.
Check for other trace files - I am getting trace files mattching *_j000_*.trc, but they just have this: FILE_TRANSFER error is: with nothing after it.


Could someone explain what I am doing wrong or give me a way to troubleshoot this further?  Here is my test code:

--Create Credential.
BEGIN
    sys.dbms_scheduler.create_credential(
        username =&gt; 'oracle',
        password =&gt; 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        database_role =&gt; NULL,
        windows_domain =&gt; NULL,
        comments =&gt; NULL,
        credential_name =&gt; 'TestCredential'
    );
END;
/


CREATE TABLE FilesFound(FoundDate Date);


CREATE OR REPLACE PROCEDURE TestProcedure(iFileInfo In sys.scheduler_filewatcher_result) AS
BEGIN
   INSERT INTO FilesFound VALUES (sysdate);
   COMMIT;
END;
/


BEGIN
   DBMS_SCHEDULER.create_program(
      program_name =&gt; 'TestProgram',
      program_type =&gt; 'stored_procedure',
      program_action =&gt; 'TestProcedure',
      number_of_arguments =&gt; 1,
      enabled =&gt; False);
   DBMS_SCHEDULER.define_metadata_argument(
      program_name =&gt; 'TestProgram',
      metadata_attribute =&gt; 'event_message',
      argument_position =&gt; 1);
END;
/



BEGIN
dbms_scheduler.create_file_watcher(
   file_watcher_name =&gt; 'TestFileWatcher',
   directory_path =&gt; '/u01/test',
   file_name =&gt; '*.*',
   credential_name =&gt; 'TestCredential',
   destination =&gt; NULL,
   enabled =&gt; False);
END;
/


BEGIN
   dbms_scheduler.create_job(
   job_name =&gt; 'TestJob',
   program_name =&gt; 'TestProgram',
   event_condition =&gt; NULL,
   queue_spec =&gt; 'TestFileWatcher',
   auto_drop =&gt; False,
   enabled =&gt; False);

   --Enable Everything.
   dbms_scheduler.enable('TestProgram, TestFileWatcher, TestJob');
end;
/

--Set a one minute check interval.
BEGIN
  DBMS_SCHEDULER.set_attribute(
    'file_watcher_schedule',
    'repeat_interval',
    'freq=minutely; interval=1');
END;
/

--Create a file.
DECLARE
  vFile utl_file.file_type;
BEGIN
  EXECUTE IMMEDIATE 'create or replace directory TESTDIRECTORY as ''/u01/test''';
  vFile := utl_file.fopen('TESTDIRECTORY', 'TestFileWatcher.txt', 'w', NULL);
  utl_file.put_line(vFile, 'File has arrived '||SYSTIMESTAMP, TRUE);
  utl_file.fclose(vFile);
END;
/


--Delay to give time for file to appear.
BEGIN
   DBMS_LOCK.SLEEP(120);
END;
/

--Check the table.
BEGIN
   FOR vx IN (select count(*) ct from sys.FilesFound) LOOP
      If (vx.ct = 0) Then
         DBMS_Output.Put_Line('Failed - No File Watcher Activity.');
      Else
         DBMS_Output.Put_Line('Success - File Watcher Activity Found.');
      End If;
   END Loop;
END;
/

--Cleanup.
EXECUTE dbms_scheduler.drop_job(job_name =&gt; 'TestJob');
EXECUTE dbms_scheduler.drop_program(program_name =&gt; 'TestProgram');
EXECUTE dbms_scheduler.drop_file_watcher(file_watcher_name =&gt; 'TestFileWatcher');
EXECUTE DBMS_SCHEDULER.drop_credential(credential_name =&gt; 'TestCredential');
drop table FilesFound;
drop procedure TestProcedure;
drop directory TestDirectory;
To use file watchers, the database Java virtual machine (JVM) component must be installed.

Check whether java is installed : 

COMP_NAME                                          STATUS
-------------------------------------------------- -----------
Oracle Expression Filter                           VALID
Oracle Enterprise Manager                          VALID
Oracle Workspace Manager                           VALID
Oracle Database Catalog Views                      VALID
Oracle Database Packages and Types                 VALID
JServer JAVA Virtual Machine                       VALID
Oracle XDK                                         VALID
Oracle Database Java Packages                      VALID


8 rows selected.

SQL&gt; l
  1* select comp_name, status from dba_registry