File Adapter debatching in OSB

Hi,
I have to debatch a large XML file using File Adapter. I imported the JCA service into OSB project and the debatching works well. Now I need to find out if the current batch is the last batch read from the file? Is there some property etc to find this?
Thanks for your help.
Regards,
sagol

Thanks !
I am now facing another problem:The flow is like this
Proxy Service polls the data --->Business Service--->File
My requirements are:
1.convert this into csv--> For this I have created a MFL and used XQuery to map from the database xsd to the MFL
2.Updated the BS to use MFL.(A small doubt:Where do I specify that I file to be written is csv)
3.Where do I specify the name of the file to be written
4.In the proxy service I used routing to the BS.But I didnot apply the messaging constructs such as assign,insert etc ..But the csv file is not written by BS(actually I donot know the usage)
Please let me know if I am missing any step!
The error message it shows
<Jun 17, 2009 7:37:19 PM IST> <Error> <JCATransport> <BEA-381951> <JCA inbound r
equest only invocation failed, exception: java.security.PrivilegedActionExceptio
n: com.bea.wli.sb.transports.TransportException: General runtime error: Failed t
o transform MFL content from XML to binary
java.security.PrivilegedActionException: com.bea.wli.sb.transports.TransportExce
ption: General runtime error: Failed to transform MFL content from XML to binary
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:373)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.security.Security.runAs(Security.java:61)
at com.bea.wli.sb.transports.jca.binding.JCAInboundRequestListener.sendM
essage(JCAInboundRequestListener.java:156)
at com.bea.wli.sb.transports.jca.binding.JCAInboundRequestListener.post(
JCAInboundRequestListener.java:71)
Truncated. see log file for complete stacktrace
com.bea.wli.sb.transports.TransportException: General runtime error: Failed to t
ransform MFL content from XML to binary
at com.bea.wli.sb.transports.TransportException.newInstance(TransportExc
eption.java:195)
A lot of thanks!!!
Regards
Prabal
Edited by: user123 on Jun 17, 2009 7:08 AM

Similar Messages

  • [SOLVED] Re: File Adapter + Debatching + uniquemessageseparator

    Hi all
    I am facing a strange problem using File Adapter + Debatching + uniquemessageseparator.
    There are two BPEL servers, both with the same version (10.1.3.3) and running the same BPEL process. The process reads an EDI flat file using uniquemessageseparator property and debatching set to 1 message per instance.
    One of them reads the EDI flat file correclty, the other one sometimes throws an error and doesn´t read the file. Sometimes it reads the file, but this has been an exeption.
    Looking the log file, I guess the problem is related to the way BPEL deal with debatching. I believe it creates temporary directories and temporary files to handle the debatching feature and I guess there is a bug in this technique.
    Log lines for the server that can´t read the file:
    <2007-10-26 16:53:40,404> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translator has failed to translate any message from batch number: 309
    <2007-10-26 16:53:40,404> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Message not published as translation failed: {
    File=/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/3 - CENARIO ALTERNATIVO 1.txt, batchIndex=309, PublishSize=5
    <2007-10-26 16:53:40,405> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translator has failed to translate any message from batch number: 310
    <2007-10-26 16:53:40,405> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Message not published as translation failed: {
    File=/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/3 - CENARIO ALTERNATIVO 1.txt, batchIndex=310, PublishSize=5
    <2007-10-26 16:53:40,405> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translator has failed to translate any message from batch number: 311
    <2007-10-26 16:53:40,405> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Message not published as translation failed: {
    File=/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/3 - CENARIO ALTERNATIVO 1.txt, batchIndex=311, PublishSize=5
    <2007-10-26 16:53:40,406> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translator has failed to translate any message from batch number: 312
    <2007-10-26 16:53:40,406> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Message not published as translation failed: {
    File=/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/3 - CENARIO ALTERNATIVO 1.txt, batchIndex=312, PublishSize=5
    <2007-10-26 17:04:01,720> <INFO> <pi_lms-c001e.collaxa.cube.services> <PurgeTask::purgeTask> Start of purging task for domain = pi_lms-c001e
    <2007-10-26 17:04:01,722> <INFO> <pi_lms-c001e.collaxa.cube.services> <PurgeTask::purgeTask> End of purging task for domain = pi_lms-c001e
    <2007-10-26 17:04:01,726> <INFO> <pi_lms-c001e.collaxa.cube.services> <PurgeTask::purgeTask> Start of purging task for domain = pi_lms-c001e
    <2007-10-26 17:04:01,727> <INFO> <pi_lms-c001e.collaxa.cube.services> <PurgeTask::purgeTask> End of purging task for domain = pi_lms-c001e
    <2007-10-26 17:04:15,258> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Debatching error recovery started : Read offset : 5,13,null from debatching control file : /u01/app/oracle/product/10.1.3.1/j2ee/home/fileftp/controlFiles/BpelPiAtualizacaoC001E~1.0/gg05kSGbd1hww+mYZuMepg==/inbound/debatch_err_recovery_2 - CENARIO PRINCIPAL - B.txt
    <2007-10-26 17:04:15,260> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translator has failed to translate any message from batch number: 1
    <2007-10-26 17:04:15,260> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Message not published as translation failed: {
    File=/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/2 - CENARIO PRINCIPAL - B.txt, batchIndex=1, PublishSize=5
    <2007-10-26 17:14:40,424> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Debatching error recovery started : Read offset : 5,13,null from debatching control file : /u01/app/oracle/product/10.1.3.1/j2ee/home/fileftp/controlFiles/BpelPiAtualizacaoC001E~1.0/gg05kSGbd1hww+mYZuMepg==/inbound/debatch_err_recovery_2 - CENARIO PRINCIPAL - B.txt
    <2007-10-26 17:14:40,426> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translator has failed to translate any message from batch number: 1
    <2007-10-26 17:14:40,426> <INFO> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Message not published as translation failed: {
    File=/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/2 - CENARIO PRINCIPAL - B.txt, batchIndex=1, PublishSize=5
    Log lines for the server that reads the file:
    <2007-10-26 17:51:58,386> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Poller enqueuing file for processing :/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/2 - CENARIO PRINCIPAL - B.txt
    <2007-10-26 17:51:58,386> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> File : /tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/2 - CENARIO PRINCIPAL - B.txt is ready to be processed.
    <2007-10-26 17:51:58,386> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Creating stopwatch for : 2 - CENARIO PRINCIPAL - B.txt
    <2007-10-26 17:51:58,386> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Processing file : /tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/2 - CENARIO PRINCIPAL - B.txt], ProcessHeadersOnly=[false]
    <2007-10-26 17:51:58,387> <DEBUG> <pi_lms-c001e.collaxa.cube.activation> <AdapterFramework::Inbound> onBatchBegin: Batch 'bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0//2 - CENARIO PRINCIPAL - B.txt_1193425973000' (/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e/2 - CENARIO PRINCIPAL - B.txt) starting...
    <2007-10-26 17:51:58,387> <DEBUG> <pi_lms-c001e.collaxa.cube.translation> <TranslatorFactory::log> Inside TranslatorFactory
    <2007-10-26 17:51:58,387> <DEBUG> <pi_lms-c001e.collaxa.cube.translation> <TranslatorFactory::log> using version attribute = NXSD
    <2007-10-26 17:51:58,388> <DEBUG> <pi_lms-c001e.collaxa.cube.translation> <TranslatorFactory::log> loading xlator class...oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.translation> <TranslatorFactory::log> class loaded
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Created translator : oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl@1673c89
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Setting up Control dir for debatching error recovery
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Inside getUniqueDirectory::ActivationSpec getProcessName for [bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0/] returned [BpelPiAtualizacaoC001E~1.0]
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> GenUtil::getUniqueDirectory::ActivationSpec [localhost_pi_lms-c001e_BpelPiAtualizacaoC001E~1.0_/LeArquivo//tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e] ==> [BpelPiAtualizacaoC001E~1.0/gg05kSGbd1hww+mYZuMepg==]
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> MD5 BaseDir is [u01/app/oracle/product/10.1.3.1/j2ee/home/fileftp/controlFiles/BpelPiAtualizacaoC001E~1.0/gg05kSGbd1hww+mYZuMepg==]
    <2007-10-26 17:51:58,392> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Control dir for debatching error recovery : /u01/app/oracle/product/10.1.3.1/j2ee/home/fileftp/controlFiles/BpelPiAtualizacaoC001E~1.0/gg05kSGbd1hww+mYZuMepg==/inbound
    <2007-10-26 17:51:58,393> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Invoking inbound translation for : 2 - CENARIO PRINCIPAL - B.txt
    <2007-10-26 17:51:58,393> <DEBUG> <pi_lms-c001e.collaxa.cube.translation> <NXSDTranslatorImpl::log> Starting translateFromNative using InputStream
    <2007-10-26 17:51:58,405> <DEBUG> <pi_lms-c001e.collaxa.cube.translation> <NXSDTranslatorImpl::log> Done with translateFromNative
    <2007-10-26 17:51:58,405> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Completed inbound translation for : 2 - CENARIO PRINCIPAL - B.txt
    <2007-10-26 17:51:58,405> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> isTextFile : true,isXmlFile : false
    <2007-10-26 17:51:58,405> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Translated inbound batch index "1" of file {2 - CENARIO PRINCIPAL - B.txt} sucessfully.
    <2007-10-26 17:51:58,406> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> Sending batch to Adapter Framework for posting to BPEL engine: {
    batchId=bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0//2 - CENARIO PRINCIPAL - B.txt_1193425973000, batchIndex=1, publishSize=1
    <2007-10-26 17:51:58,406> <DEBUG> <pi_lms-c001e.collaxa.cube.ws> <File Adapter::Outbound> File Adapter is configured with Inbound Retry Count = [10] and Inbound Retry Interval =[1] secs for Inbound Retriable Exceptions
    <2007-10-26 17:51:58,406> <DEBUG> <pi_lms-c001e.collaxa.cube.activation> <AdapterFramework::Inbound> [Read_ptt::Read(registroGeral)]Setting inbound JCA message headers to
    <InboundFileHeaderType xmlns="http://xmlns.oracle.com/pcbpel/adapter/file/">
    <fileName>2 - CENARIO PRINCIPAL - B.txt</fileName>
    <directory>/tmp/Integracao/testeIntegrado/atualizacao/pi_lms_c001e</directory>
    <size>659</size>
    <batch>bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0//2 - CENARIO PRINCIPAL - B.txt_1193425973000</batch>
    <batchIndex>1</batchIndex>
    </InboundFileHeaderType>
    <2007-10-26 17:51:58,407> <DEBUG> <pi_lms-c001e.collaxa.cube.activation> <AdapterFramework::Inbound> [Read_ptt::Read(registroGeral)]Posting inbound JCA message to BPEL Process 'BpelPiAtualizacaoC001E' receive activity:
    Can anyone give me a help?
    Thanks

    Hi all, it is "solved": I found an workaround, but not a real solution. Let me explain:
    When file/ftp adapter starts to read a file using the debatching technique, bpel creates a control file:
    <ORACLE_HOME>/j2ee/home/fileftp/controlFiles/BpelPiAtualizacaoC001E~1.0/gg05kSGbd1hww+mYZuMepg==/inbound/debatch_err_recovery_2 - CENARIO PRINCIPAL - B.txt
    (where "2 - CENARIO PRINCIPAL - B.txt" is the file name)
    This control-file is used by BPEL to control what is the last portion of the EDI flat file that has been read. If the server fails, it continues to read from that point. After the processing, it deletes the control-file.
    However, in some cases BPEL server doesn´t delete the control-file after processing it.
    Therefore, when a new file cames but with THE SAME NAME ("2 - CENARIO PRINCIPAL - B.txt" for instance), BPEL uses the old control-file to process the new file,
    resulting in not processing the file.
    So, the issue is: BPEL is not deleting the control-file in some cases, but I don´t know exactly when this occurs. In my environment, it occurred four times only, and I don´t know exactly how to reproduce it.
    So, when you face an issue like this, try to check that temporary directory.
    Regards
    Marcelo

  • File Adapter - Debatching & ChunkedRead

    Hi ,
    Can anybody please tell me what is the difference between File Debatching & ChunkedRead
    in File Adapter . How the error handling mechanism differs in these two .
    Thanks in Advance ..
    Regards,
    Surfraz

    HI,
    please have a look at the documentation
    http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_file.htm#CACJBIGD --- File Debatching
    http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_file.htm#BABCFGAB --- File Chunked Read
    Abhinav

  • Capability of File Adapter Framework in OSB

    Hi,
    Has anyone ever used the file adapter framework within Oracle Service Bus to capture data / transform using XSLT and then publish that data out to a service?
    Would greatly appreciate any experiences in this area, I know that this functionality exists in SOA suite and can be enhanced with BPEL.
    If anyone know of any limitations of OSB in this area that would also be good to know.
    Thanks
    K

    Hi,
    There's no problem in doing this. You can use a file adapter or the file transport.
    When using the file transport, it is possible to convert a flat-file structure to XML (and vice-versa) by using MFL. For more information on MFL: [http://biemond.blogspot.com/2008/12/flat-file-to-xml-with-oracle-service.html]

  • File Adapter in OSB 11g

    Hi
    I am using a File Adapter created to read a file using OSB 11.1.1.3.0. But after i publish that osb project, i am getting the below warning and file is not been polled by the proxy.
    ####<Feb 23, 2011 10:08:30 AM IST> <Warning> <JCA_FRAMEWORK_AND_ADAPTER> <wipro-e16351a68> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <dcc2d8a908de630a:59887477:12e50cc23d3:-7ff2-0000000000000084> <1298435910015> <BEA-000000> <PollWork::run exiting, Worker thread will die>
    After 600 secs i could see StuckThread error in server.
    ####<Feb 23, 2011 10:15:01 AM IST> <Error> <WebLogicServer> <wipro-e16351a68> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <dcc2d8a908de630a:59887477:12e50cc23d3:-7ff2-0000000000000092> <1298436301203> <BEA-000337> <[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "601" seconds working on the request "weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl@dd20cd", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
         java.lang.Object.wait(Native Method)
         oracle.tip.adapter.file.inbound.FilesToProcess.dequeueToProcess(FilesToProcess.java:101)
         oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:269)
         weblogic.work.ContextWrap.run(ContextWrap.java:41)
         weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please help what is going wrong in my approach.
    Thanks,
    Sesha

    I even tired creating a new WM thread and assigned to this proxy.
    I have chosen MaxThreadsConstraint option with Maximum of 5 concurrent thread.
    Also i have enabled Ignore Stuck Threads in that WM thread.
    Now i dont see any thread stuck in the server log, but sametime the file is not been picked by the Proxy which means the error is suppressed alone from displaying in logs..
    Thanks,
    Sesha

  • OSB Error in deploying a project with jca file adapter

    Hi,
    I am facing an issue where I am getting an error when deploying a service from Eclipse. I am using OSB/SOA 11.1.1.5 2 node cluster. I have an OSB service where I am writing to a file and am using file adapater. I created a composite with file adapter to write a file then imported .jac, .wsdl and composite into eclipse and generated a business service out of .jca file. When I deploy the project from eclipse I am getting the below error and am not able to deploy the project.
    Conflicts found during publish.
    Invalid JCA transport endpoint configuration, exception: javax.resource.ResourceException: Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    I have FileAdapter deployed and pointed to OSB manage servers cluster. Here is a snippet of config.xml.
    <app-deployment>
        <name>FileAdapter</name>
        <target>SOA_Cluster,OSB_Cluster</target>
        <module-type>rar</module-type>
        <source-path>/app/oracle/fmw/Oracle_SOA1/soa/connectors/FileAdapter.rar</source-path>
        <deployment-order>321</deployment-order>
        <plan-dir xsi:nil="true"></plan-dir>
        <plan-path>/app/oracle/shared/SOA_Cluster/dp/FileAdapterPlan.xml</plan-path>
        <security-dd-model>DDOnly</security-dd-model>
        <staging-mode>nostage</staging-mode>
      </app-deployment>
    Also inside console -> deployments  -> FileAdapter -> Targets and OSB_Cluster is checked also.
    Here is the .jca file
    <adapter-config name="writeFile" adapter="File Adapter" wsdlLocation="writeFile.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory location="eis/HAFileAdapter"/>
      <endpoint-interaction portType="Write_ptt" operation="Write">
        <interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
          <property name="PhysicalDirectory" value="C:\ORACLE"/>
          <property name="Append" value="false"/>
          <property name="FileNamingConvention" value="a_%SEQ%.doc"/>
          <property name="NumberMessages" value="1"/>
        </interaction-spec>
      </endpoint-interaction>
    </adapter-config>
    Any idea what might be wrong.
    Thanks.

    I already have the fileAdapter JNDI is already configured in console. The error I am getting is during the deployment
    Conflicts found during publish.
    Invalid JCA transport endpoint configuration, exception: javax.resource.ResourceException: Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    Cannot locate Java class oracle.tip.adapter.file.outbound.FileInteractionSpec
    Thanks

  • File Adapter Transactional in SOA and OSb

    Hi All,
    Is file adapter transactional in SOA and OSB. I have a requirement where a inbound file adapter polls for a file and it is consumed by a topic.If topic is down,how can I know that the same file will goes to topic when is up(how can I make it transactional).I want to do this both in SOA ans OSB.
    Any help would be appreciated.
    Thanks,
    Kumar.

    Hi Kumar,
    File Adapter itself is NON TRANSACTIONAL...
    4.2.9 Nontransactional
    The Oracle File Adapter picks up a file from an inbound directory, processes the file, and sends the processed file to an output directory. However, during this process if a failover occurs in the Oracle RAC back end or in an SOA managed server, then the file is processed twice because of the nontransactional nature of Oracle File Adapter. As a result, there can be duplicate files in the output directory.
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/adptr_file.htm#BABIEBJF
    Cheers,
    Vlad

  • File adapter in OSB

    Hi ,
    I am trying to use file adapter in OSB. My intention is the OSB should write a file in a specified location in my sytem. I have configured the Business Service with Messagin service in (general tab), request msg as text and response msg as none in(messagin tab), protocol as file in (transport tab), prefix as AddUser suffix as *.txt* in (file transport tab).
    whenever i give input in proxy service it writing the file at the specified location, but the issue is,it writes the file name as AddUser3225734920456246193--12c3763f.132dd1769a3.-7f5b.txt . i dont need this part(AddUser3225734920456246193--12c3763f.132dd1769a3.-7f5b) in file name which is written. can anyone tell me how i can solve this?
    Any help is appreciated.
    thanks

    Hi,
    We can go with transport JCA FILE for file writing into the specified location.
    Create a file adapter in jdeveloper with all specified things like (file name,physical path location and schema).This creates the jca and wsdl file in jdevloper copy this to eclipse(OEPE) and later u can create business service based on jca file in eclipse.Or else in osb sbconsole copy import related jca and wsdl files and create business service based on this.This process wil create file in particular location with name specified in the jca file in particular location.....

  • File Adapter with Debatching

    Hi All
    We are using File Adapter in debatching mode for processing of large files.
    Once all records are processed we need to move the processed file from one location to another on same machine.
    But in case of debatching multiple BPEL theads are processing same file. so how do we know we have reached the end of the file and all processing is done so that we can move that file.
    Thanks
    /Mishit

    This should work : http://kr.forums.oracle.com/forums/thread.jspa?threadID=1024912
    /Mishit

  • File Adapter Service debatching issue

    I am experimenting with the ESB to enable an inbound file adapter to read multiple records "debatching" from a file with XML content. I am using a router to pass to another FileAdapter for writing each of the child records to a separate XML file. So basically I am just trying to test reading multiple records from a single XML file and then putting each record in its own separate outbound file. Seems like this should be a pretty simple initial experiment with using the ESB. But when I drop this inbound xml file, it is getting picked up properly, but the entire inbound xml file is not getting split up or debatched into separate XML messages from the file input adapter. My confusion is over how the fileadapter works with files with XML content, I have checked the "Files contain multiple messages" checkbox and indicated batches of "1". So shouldn't this tell the file adapter to process one record from the inbound file at a time, passing it thru the router and ultimately to the outbound file adapter? If so, how does the file adapter know what deliminates each record in the XML file? Here is the inbound xml that I am trying to read/break apart and put each child XML element "service request event" in it's own outbound file. Please advice what I am missing here. I am not so sure that debatching in the File Adapter will work with files including XML content? Or perhaps that is a work around or example that someone has to explain how to do this.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns4:Events xmlns:ns4="http://xmlns.arl.psu.edu/OffboardServicesEvent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.arl.psu.edu/OffboardServicesEvent Events.xsd">
    <ns4:ServiceRequestEvent>
    <ns4:summary>Planetary over temp test1</ns4:summary>
    <ns4:severity_id>9</ns4:severity_id>
    <ns4:urgency_id>64</ns4:urgency_id>
    <ns4:status>103</ns4:status>
    <ns4:type_id>11124</ns4:type_id>
    <ns4:owner_id>100003631</ns4:owner_id>
    <ns4:current_serial_number>1748AC16206</ns4:current_serial_number>
    <ns4:inventory_item_id>2320011231602</ns4:inventory_item_id>
    <ns4:problem_code>1001R3</ns4:problem_code>
    </ns4:ServiceRequestEvent>
    <ns4:ServiceRequestEvent>
    <ns4:summary>Planetary over temp test2</ns4:summary>
    <ns4:severity_id>9</ns4:severity_id>
    <ns4:urgency_id>64</ns4:urgency_id>
    <ns4:status>103</ns4:status>
    <ns4:type_id>11124</ns4:type_id>
    <ns4:owner_id>100003631</ns4:owner_id>
    <ns4:current_serial_number>1748AC16206</ns4:current_serial_number>
    <ns4:inventory_item_id>2320011231602</ns4:inventory_item_id>
    <ns4:problem_code>1001R3</ns4:problem_code>
    </ns4:ServiceRequestEvent>
    </ns4:Events>
    here is the schema....
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://xmlns.arl.psu.edu/OffboardServicesEvent"
    targetNamespace="http://xmlns.arl.psu.edu/OffboardServicesEvent"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    elementFormDefault="qualified">
    <xsd:element name="ServiceRequestEvent" type="ServiceRequestEventType"/>
    <xsd:element name="Events">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="ServiceRequestEvent" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="ServiceRequestEventType">
    <xsd:sequence>
    <xsd:element name="summary" type="xsd:string"/>
    <xsd:element name="severity_id" type="xsd:double"/>
    <xsd:element name="urgency_id" type="xsd:double"/>
    <xsd:element name="status" type="xsd:double"/>
    <xsd:element name="type_id" type="xsd:double"/>
    <xsd:element name="owner_id" type="xsd:double"/>
    <xsd:element name="current_serial_number" type="xsd:string"/>
    <xsd:element name="inventory_item_id" type="xsd:string"/>
    <xsd:element name="problem_code" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    I have been scanning thru the Oracle tutorials and googling, but have not found any examples where a single XML document is debatched via the File adapter in this way.
    Thanks for any help,
    Todd

    I figured it out. I was using 10.1.3.1, which does not support XML debatching -- just flat file debatching. I upgraded to 10.1.3.3 and it works now. Before I did that, however, I followed the instructions here: http://www.oracle.com/technology/products/ias/bpel/pdf/10133technotes.pdf (section: Transferring Large Payloads in Oracle BPEL Process Manager) and downloaded those jarfiles. Perhaps they come with 10.1.3.3, but I did not remove them before I upgraded so I'm not sure if those steps were necessary.

  • Base64Binary OSB and File Adapter Issue

    Hi all,
    I am converting an xml to flat file after that i want to write the flatfile to a file using File Adapter in OSB.
    So using java callout we converted the binary content to base64 string and we are able to write the data using file adapter .
    But the file contains as extra line in between each line which my legacy system wont accept.
    I printed the base64 string in the output file and when i decode that file using the website as safe decode as text i am able to get the correct file.
    So where is the problem ? File Adapter ? Why i am getting extrace line in between each line . How to write safely using file adapter.
    If i use file transport of OSB i am able to write without any issues but i want to write dynamic location so i am looking for file transport of OSB.
    Thanks
    Phani

    Hi Anju,
    Thanks for the response . If i decode the base64 binary data using this website if i use Notepad++ i cant see an extra line in the notepad++ it showing as below
    Its a fixed length file 1 to 513 then next line so for the file transport it showing as below
    ISA ............................
    1 to 513 CRLF
    For file adapter it is showing as below in the same notepad++ editor
    ISA..........................
    1 to 513 CR
    CRLF
    an extra CR so an extra line .
    I used MFL and converted the xml to non-xml ( flat file fixed length file) for file transport i am i created another proxy message type Text .It is working fine
    Added to the above problem i have another few questions on the file transport
    How can append to an exiting file using File transport ?
    How to change the File directory dynamically ?

  • How to know when File Adapter is complete when debatching?

    I have a BPEL process that reads in a file and debatches it into records of 1 and inserts them into a table.
    How do I know when the entire process is complete and all records in the file have been handled?

    Thats the problem with the file adapter. If you use it in debatch mode, you cannot really control the different BPEL processes that get spawned off one file.
    The other approach for scenarios where the file is huge, could be to use the adapter in notification mode. So the file adapter will notify the BPEL process, that the file is available, and then BPEL process can read the file using xpath functions or java code etc.
    Hope this helps.
    -@

  • How to use Oracle File Adapter in OSB

    We are trying to use File Adapter in OSB 11g. Is it supported in this version? If yes then some one can specify a document which contains File Adapter - OSB integration steps.

    according to the ESB JCA transport:
    [ESB JCA|http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jca.htm#i1106345]
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jca.htm#i1106345
    there is only these adapters:
    _25.2.1 Adapter Support_
    The Oracle Service Bus JCA transport lets you interact with the following JCA-compliant adapters:
    Oracle Adapter for Oracle Applications
    Oracle JCA Adapter for AQ
    Oracle JCA Adapter for Database
    Oracle JCA Adapter for Files
    Oracle BAM Adapter (Business Activity Monitoring)
    PeopleSoft (Oracle Application Adapters 10g)
    SAP R/3 (Oracle Application Adapters 10g)
    Siebel (Oracle Application Adapters 10g)
    J.D. Edwards (Oracle Application Adapters 10g)
    See the following guides for more information on Oracle adapters:
    I wanna use FTP Adapter and MQ Adapter in Oracle ESB 11.1.1.3, can we make it?

  • High Availability File Adapter in OSB

    If you use the JCA FileAdapter in OSB, it is necessary to use the eis/HAFileAdapter version, to ensure that only one instance of the adapter picks up a file; you must then configure a coordinator, by setting the
    controlDir, inboundDataSource, outboundDataSource, outboundDataSourceLocal, outboundLockTypeForWrite
    parameters.
    controlDir refers to the filesystem, the others to the DB
    This document http://www.oracle.com/technetwork/database/features/availability/maa-soa-assesment-194432.pdf says
    "Database-based mutex and locks are used to coordinate these operations in a File Adapter clustered topology. Other coordinators are available but Oracle recommends using the Oracle Database."
    Using a Oracle Database as coordinator means using RAC, otherwise no HA.
    I wonder if anybody has been successful setting up HAFileAdapter without using a DB?
    If DB is required, I am considering using the good old "native" OSB File Poller, since it doesn't require complicated setup to be run in a cluster... but I don't want to use MFL, I would rather use the XSD-based Native Format. Here comes the second question:
    Is it possible to use the nXSD translator using the OSB Native File Poller - instead of the JCA Adapter?
    Thank you so much for your help - it will be rewarded with "helpful/answered" points .
    pierre

    I wonder if anybody has been successful setting up HAFileAdapter without using a DB?
    I have not tried it but I think there are several options available invlucing writing your own custom mutex. Please find the details in Oracle File and FTP Adapters High Availability Configuration section on this link
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10106/ha_soa.htm#sthref434
    Is it possible to use the nXSD translator using the OSB Native File Poller - instead of the JCA Adapter?
    When you create a JCA Adapter based Proxy Service to read the files, the nXSD translation happens before the proxy service is invoked. JCA Engine first reads the data, translates using nXSD and then invokes the Proxy with the translated content. (You can verify this easily by creating a JCA based file read service and open the test console for it in sbconsole, it will show you XML request instead of native).
    So you can not read the text content using File Transport of OSB and then calling nXSD directly or calling an nXSD based Proxy Service.
    HOWEVER, you certainly can use file and nXSD in a combination if thats what you want.
    1. Create a Synchronous Read File Adapter with an nXSD created for it
    2. Create a Business Service for that Synchronous Read JCA in OSB
    3. Create a File Transport based service in OSB which will read the content of file and then call the Business Service to again read the content (which will include the translation using nXSD defined in step one to convert the content to XML).
    So basically you will need to read the file twice! Once using File Transport Proxy service (which will take care of polling in cluster) and then using Sync Read JCA based business service(which will do nXSD translation). To reduce the impact of reading the file twice you can use trigger files. File Proxy to read trigger file and and invoke JCA business service to read the actual file for that trigger.
    Another alternative can be to create a similar class as present here(http://blogs.oracle.com/adapters/entry/command_line_tool_for_testing) but instead of writing a file it will just return the translated content. Call this class with native content from the File Transport proxy using a Java Callout to do the translation.

  • Configuring File adapter for OSB

    Hi,
    I wish to process invoice data that will be in the csv file . The structure of the file is as following :
    $H$<<Supplier Name>>,<<Supplier Site>>,<<Invoice Number>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    $H$<<Supplier Name>>,<<Supplier Site>>,<<Invoice Number>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    $D$<<Line Number>> ,<<Business Unit>>,<<Location>>,<<Store Name>>
    The intent is to configure the file adapter in such a fashion that it rejects the entire invoice if there are any errors in any of the lines that belong to that invoice. The invoices that follow the erred inovice should be processed normally. How do I configure the adapter to achieve this? Any help is greatly appreciated.

    Hi,
    Configuring the adapter for rejecting the invalid invoice rows is not possible. Adapter should be configured as usual to read all the rows. Once the rows are read, you can have all validation in the proxy service. If you find any invalid rows, you can write those rows to a saperate file so that it can be corrected and fed again. And all the other valid rows can be sent for further processing.
    Thanks,
    Vishwa

Maybe you are looking for

  • How do I make a person's face unrecognizable?

    I edit a medical journal and, though we've only showed images at our site, we're now thinking about putting video up also. For still images we overlay a black rectangle across a patient's eyes, eyebrows, and enough of the area so that he or she is no

  • Have a look at code!!

    I want to draw a rectangle in an applet and trace the mouse pressed action only inside that rectangle To achive this i have created 2 classes 1.Class Rect This class extends Component and used to draw the Rectangle using drawRect() method and used to

  • "Adjust Date and Time..." will convert your TIFFs to JPGs!!!

    I wanted to let everyone know of a serious bug that I've been discussing in the following thread: [http://discussions.apple.com/thread.jspa?threadID=1315705&tstart=0]. Here's the bug. If you use the "Adjust Date and Time..." function on a TIFF file,

  • Which ports are needed for SAP HANA Studio - HANA DB communication?

    I want to connect SAP HANA Studio to a HANA instance. The HANA instance number is 40. The SAP note 1592925 states that the ports 5$$13/5$$14 and 3$$15 should be open to allow communication between the HANA Studio and the HANA database. I even see the

  • Some read mail items remain marked as unread

    Some read mail items remain marked as unread (even after I've read them). I have to manually mark them as read. This doesn't happen to all mail items, just some. How can I fix this?