5 Replies Latest reply: Jan 23, 2013 6:11 PM by 983647 RSS

    How to test File Adapter from EM Console

    740621
      Hi All,

      I have one issue with File Adapter where I am trying to implement a simple BPEL process. Below are the steps;

      1. I have created an empty BPEL process and then add a read file adapter to the left side which will read from a file aa.txt which is present in D:\work folder. File is having data like XXXX,YYYY,ZZZZ. (I have used Native builder for schema generation)
      2. Then I have added Write file adapter on the right side which will write to an other file bb.txt.

      Then I have rebuild and deploy this on weblogic SOA server but on the EM console I am not able to test it as Test button is disabled. Then how to test this scenario? Also I tried testing by placing a new file aa1.txt in the same directory with some content. Logically it should be picked up and then write it to the bb.txt but it is not happening.

      Can anyone please help me in this as how to troubleshoot it.

      Thanks
      RJ
        • 1. Re: How to test File Adapter from EM Console
          983647
          You will not be able to test this from the EM, as the instance is created by polling into the targer directory for matching files. Looks like there is mismatch in the file names you want to pick and the file name in the target directory, check that and it will solve your problem.

          If you have issues in resolving it, post your read_file.jca file contents, will take a look into it.
          --
          Mark the posting appropiately, as "helpful", "correct answer", if your issue is solved.
          • 2. Re: How to test File Adapter from EM Console
            740621
            Thanks for the reply.

            So if i understood correctly it means that we cannot test it using EM console as we have read adapter on the left side because of which we have not exposed it as SOAP service. When we put any file in the D:\XXX then automatically read adapter will pick that up and create one instance in the EM console and then write adapter will write it into the destination file?

            But in our case no instance is getting created in the EM console even when I am copying a file to the directory. Below is the read_file.jca

            <adapter-config name="Read" adapter="File Adapter" wsdlLocation="Read.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">

            <connection-factory location="eis/FileAdapter" UIincludeWildcard="rj*.txt"/>
            <endpoint-activation portType="Read_ptt" operation="Read">
            <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
            <property name="DeleteFile" value="false"/>
            <property name="MinimumAge" value="0"/>
            <property name="PhysicalDirectory" value="D:\mywork"/>
            <property name="Recursive" value="true"/>
            <property name="PollingFrequency" value="60"/>
            <property name="IncludeFiles" value="rj.*\.txt"/>
            <property name="UseHeaders" value="false"/>
            </activation-spec>
            </endpoint-activation>

            </adapter-config>

            Please help as why it is not getting picked up?

            Regards
            RJ
            • 3. Re: How to test File Adapter from EM Console
              740621
              Also when we troubleshoot at the soa diagnostic log we came to know the below error is the rootcause. But we have checked the path is correct as well as we have given all the read write permissions to TestBPEL folder. But still it is not working and giving this error.

              Invalid Input Directory.
              Invalid Input Directory.
              The value specified for the input (Physical/Logical)Directory activation parameter has an invalid value "D:\mywork\TestBPEL".
              Ensure that the following conditions are satisfied for the input directory :
              1) It exists and is a directory (not a file). and
              2) It is readable (file read permissions). and
              3) If activation parameter "DeleteFile" is set to "true" then the directory should also have granted write permissions. and
              4) If using a logical name, then ensure that the mapping from logical name<->physical directory is correctly specified in the deployment descriptor.

              Please help in rectifying the problem

              Thanks
              RJ
              • 4. Re: How to test File Adapter from EM Console
                vladodias
                Hi,

                The folder has to be in the same server as soa_server is running... Also try to change the path in the jca to "D:/mywork/TestBPEL"...

                Hope this helps...

                Cheers,
                Vlad
                • 5. Re: How to test File Adapter from EM Console
                  983647
                  I have two queries for you:

                  1)
                  <property name="PhysicalDirectory" value="D:\mywork"/>
                  your Jca file says that the directory for incoming files is "D:\mywork", but your in your error log you are showing that physical directory is ""D:\mywork\TestBPEL".
                  The value specified for the input (Physical/Logical)Directory activation parameter has an invalid value "D:\mywork\TestBPEL".
                  Do you have 2 BPELs reading from these two different directoy ???

                  2) Are these directories you are working with present in your local environment where your Jdeveloper is running
                  or
                  Are they present on the server on which the SOA server is running???

                  Also provide with the name of the files(with extensions), you have in your directory that you are polling.

                  --
                  Mark the posting appropiately, as "helpful", "correct answer", if your issue is solved.