0 Replies Latest reply: Feb 24, 2012 5:54 PM by user531037 RSS

    File Adapter giving Translation error while reading & moving pdf files

    user531037
      Hello Gurus,
      I am on SOA 10.1.3.4 and using BPEL for the below procedure.
      The requirement I have is to move pdf files from one local directory to another as soon as the pdf files land in source directory. So I used a file adapter (FileAdapter_1) to poll the file and read as an opaque schema. Then I copied the name and directory in a header variable and passed the header variable to another file adapter(FileAdapter_2) which moves the file from source to target directory. The jca operation for FileAdapter_2 is as follows:

      <jca:operation
      InteractionSpec="oracle.tip.adapter.file.outbound.FileIoInteractionSpec"
      SourcePhysicalDirectory="foo1"
      SourceFileName="bar1"
      TargetPhysicalDirectory="foo2"
      TargetFileName="bar2"
      Type="MOVE">
      </jca:operation>

      It is working fine for all 90% of pdf files, but some files are failing with the following error in domain.log file.

      2012-02-24 11:15:12,170> <DEBUG> <custst1.collaxa.cube.translation> <TranslatorFactory::log> Inside TranslatorFactory
      <2012-02-24 11:15:12,170> <DEBUG> <custst1.collaxa.cube.translation> <TranslatorFactory::log> using version attribute = NXSD
      <2012-02-24 11:15:12,170> <DEBUG> <custst1.collaxa.cube.translation> <TranslatorFactory::log> loading xlator class...oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl
      <2012-02-24 11:15:12,174> <DEBUG> <custst1.collaxa.cube.translation> <TranslatorFactory::log> class loaded
      <2012-02-24 11:15:12,174> <DEBUG> <custst1.collaxa.cube.translation> <NXSDTranslatorImpl::log> Starting translateFromNative using InputStream
      <2012-02-24 11:15:12,174> <DEBUG> <custst1.collaxa.cube.translation> <XlatorHelper::logDebug> validating payload size
      <2012-02-24 11:15:12,175> <INFO> <custst1.collaxa.cube.activation> <File Adapter::Inbound> Error while translating inbound file : Sample.pdf
      <2012-02-24 11:15:12,175> <INFO> <custst1.collaxa.cube.activation> <File Adapter::Inbound>
      ORABPEL-11104

      Error while translating.
      [Line=1, Col=5] The value "%PDF" read from the native data, from the specified position, using "choiceCondition" as "fixedLength" and "length" as "4", doesnt match any of the "conditionValue" on the particles of choice model group.
      Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.

      at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.parseNXSD(NXSDTranslatorImpl.java:1312)
      at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.parseNXSD(NXSDTranslatorImpl.java:1142)
      at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.doTranslateFromNative(NXSDTranslatorImpl.java:748)
      at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.translateFromNative(NXSDTranslatorImpl.java:509)
      at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:846)
      at oracle.tip.adapter.file.inbound.ProcessWork.processMessages(ProcessWork.java:380)
      at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:231)
      at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
      at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:280)
      at java.lang.Thread.run(Thread.java:595)

      <2012-02-24 11:15:12,175> <INFO> <custst1.collaxa.cube.activation> <File Adapter::Inbound> Since a translation exception was thrown, this indicates that it is a non-debatching scenario.
      <2012-02-24 11:15:12,175> <INFO> <custst1.collaxa.cube.activation> <File Adapter::Inbound> Failed to translate file : {common/InboundFiles/Sample.pdf}

      Thanks in advance for your help.......