Reset of counter in file adapter after restart J2EE

Hi,
When the J2EE engine is restarted all counters in the file adapter (Add Counter to filename) are resetted and start at 1 again.
Is this a bug?
How to prevent this?
Even when I put into the file adapter that is has to start counting at 00009 it still starts at 00000. Or if I indicate that it has to start again from 44 it starts counting on 42. .... very strange behaviour.
regards
Ron
Edited by: Ron van der Sterren on Jul 15, 2008 11:54 AM

See FAQ on File adapter
question 32
I think this is not a good solution from SAP.
Suggestion is that a counter can be used. But it is designed that it will be reset by a restart of the engine.
Ron

Similar Messages

  • Rename file in file adapter after processing

    Hi All,
    My requirement is, i need to rename the file in receiver file adapter after the file is written to the folder. and this file should have a counter attached to its name. For eg. If i had a file created with name Material, i want to change it to Order001, Order002, Order003.... so on and counter should reset after 999. how can i achecive it?
    thanks a lot in advance.
    Regards,
    Rashmi
    Edited by: Rashmi H S on Jul 15, 2009 12:15 PM

    Hi Rshmi,
    use this UDF i hope it will work fine,
    DynamicConfiguration conf = (DynamicConfiguration) container
         .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String a=conf.get(key);
    int inc = 1;
    Integer seqNo = (Integer) container.getParameter("seqNo");
    if(seqNo == null || seqNo ==999){
                                seqNo = new Integer(inc);
    else{
                               int num = seqNo.intValue() + inc;
                               seqNo = new Integer(num);
    container.setParameter("seqNo", seqNo);
    return var1+seqNo.toString();
    Regards,
    Raj

  • File adapter: file_name with counter, stable after restart J2EE

    Hello guys,
    we are on XI 7.0.
    in a receiver file channel we have to create file names with a stable counter (7digits).
    The payload is IDOC flat file after ABAP mapping (not XML format).
    The  bad thing with the counter is that it is not stable. After restart of J2EE engine the counter starts again more or less
    from the beginning (also described in a FAQ OSS note).
    Does anybody have an idea how we could realize a stable counter for file names that also increases the counter after restart of J2EE. Is individual programming necessary? module ?
    We thought about SAP number ranges (DB) but how to integrate this in the file channel. Also generating the the number in ERP and send it in the IDOC to XI, but after the ABAP mapping to IDOC flat file we cannot use the payload for variable replacement.
    Every help is appreciated
    best regards
    Hans

    Hello Georg,
    You can achieve this by developing a Customized adapter module,
    Try to maintain the counter in one of the temporary file in the XI system, read the counter number from the temporary file and increment the counter by 1.
    rename the receiver filename with the sufix as counter.
    replace the counter number in the temporary file with the latest counter number i.e increment by '1'.
    regards,
    Chandra Shekhar

  • Recovered files gone after restarting Muse after Update

    Muse quit unexpectedly while I was working on several websites in that were in recovery mode.  When I restarted Muse, it told me that an update was available. After restarting Muse after the update, it did not attempt to recover the files that I was working on. Are the changes that I made lost forever, or can I find them stored somewhere on my computer?  I have a current time machine back up.  Will that be helpful? 

    Muse does not recover files from older versions of Muse.
    The Muse team recommends you save any work in progress before updating Muse to a new version.
    If you have a timemachine backup of the recovery files and the unsaved changes are important to you, you should be able to recover them by doing the following:
    1. Look for the Muse recovery files in your time machine backup. They should be here:
    /Users/your-user-name/Library/Preferences/AdobeMuse/Local Store/Recovery
    Restore that folder to just before you did the update to Muse version 6.
    2. Uninstall/delete Muse 6
    3. Install Muse version 5.0 from here: http://labsdownload.adobe.com/pub/adobemuse/builds/muse_5-0_update_mac.dmg
    4. Launch Muse version 5. Do not update. It should recover your files.
    5. Save your file(s)
    6. quit Muse, launch again, update to version 6.

  • Need help!---lookup connectionFactory failed after restart j2ee server!

    hi,
    I wonder anyone could help me to solve this context lookup problem described as bellows.i should say 'thanks' in advance!!!
    At the end of the message i post the code used to lookup administered objects then create connection.
    i use sun's default jms implementation (j2sdkee1.3.1) and jdk1.4 as environment.
    The jms client will try to establish a new connection if the j2ee server restarts (perhaps due to remote j2ee server shutdown or network trouble) , but it fails to lookup topicConnectionFactory in the JNDI this time. An namingException will be caught :
    "javax.naming.CommunicationException: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079689 No; nested exception is:
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
         at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:92)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
         at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:176)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:68)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:70)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:641)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:583)
         at com.sun.corba.ee.internal.corba.ClientDelegate.request(ClientDelegate.java:875)
         at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
         at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
         ... 6 more
    Some code in the establish() method:
    try {
    TopicConnectionFactory topicConnectionFactory = null;
    InitialContext ctx = null;
    ctx = new InitialContext();
    System.out.println("ctx:" + ctx);
    topicConnectionFactory =
    (TopicConnectionFactory) ctx.lookup ("connectionfactory");
    System.out.println("topicConnectionFactory:" + topicConnectionFactory);
    while (connection == null)
    try{
    connection = topicConnectionFactory.createTopicConnection();
    } catch (javax.jms.JMSException jmse)
    System.out.print("Cannot connect to message server...");
    System.out.println("Pausing " +
    CONNECTION_RETRY_PERIOD / 1000 + " seconds before retry.");
    try
    Thread.sleep(CONNECTION_RETRY_PERIOD);
    } catch (java.lang.InterruptedException ie) {ie.printStackTrace();}
    continue;
    System.out.println("\nConnection established");
    session =
    connection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
    topic = (Topic) ctx.lookup ("subscribeTopic");
    connection.setExceptionListener( (javax.jms.ExceptionListener) this);
    catch (javax.naming.NamingException jne){
    System.err.println("[MessageSubscriber] - NamingException!");
    //jne.printStackTrace( );
    Best Regards,
    -bawanglongqiqi

    Hi!
    I've encountered a similar problem with looking up the Home-interface
    of an EJB from a client through the InitialContext object after a
    restart of the application server.
    Try to set an additional property before creating your InitialContext
    object that clears the JNDI cache (the property name seems to differ
    between context factories - e.g. I'm using a WebSphere one and had to
    set a WebSphere specific property name).
    I'm sure you will find further info when you do a web search on "clear
    JNDI cache" for your specific JNDI provider.
    Kind regards,
    Markus

  • File adapter OS command line - Calling a command remotely ??

    Hi,
    We have a scenario where in which receiver file adapter after putting a file on the FTP  , a subsequent XML loader needs to be called which would load data into the client legacy ERP system.
    There seems to be some idea about doing it through file adapter OS command line.
    The problem is the how to call this loader command remotely from our file adapter OS command line.
    Any help would be appreciated ???

    >> The problem is the how to call this loader command remotely from our file adapter OS command line.
    The below link might be helpful ...
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature

  • FILE adapter with secure FTP

    Hi experts,
    i have scenario file to file scenario, communication should  happen in secure connection .i searched in blogs & forums
    please find berlow forum
    How to configure SFTP Adapter in XI?
    in that 2 nd reply
    there is one option :2. Use the FTP adapter, and encrypt/decrypt the file contents through a user exit in the adapter. Something on the FTP server side will have to do the same.
    can anyone please elaborate this one & where can i find user exit  for the file adapter.
    please help is there any option to provide secure cinnection in file adapter (FTP) like using run operating system command befor or after message processing
    Thanks In advance

    I think  that you can solve in 4 different ways:
    -> Using FTPS connection
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    -> Using a 3rd Party Adapter (Seeburger or Aedaptive) for PGP or deploying a custom adapter for PGP
    http://www.seeburger.com/9468/
    -> PGP OS Level (Installing a PGP software like GnuPGP in your system) Install the PGP software in XI and write the OS command for encryption and decryption at OS level. Call this command in File adapter after or before message processing
    PGP ncryption
    -> Using an UDF
    Check this links:
    Is there any FTP API available from SAP?
    Send Text file to FTP in binary mode with PGP encryption
    http://www.webmethods.com/meta/default/folder/0000007429
    Converting IDOC to XML
    XI implementation
    http://www1.webmethods.com/PDF/webMethods_for_SAP-wp.pdf

  • Binary file with File adapter

    Hi gurus,
    I am getting binary file as base64binary (not a text/xml file) in a request XML tag. I need to write this file to a file directory with the file adapter after retrieving it from the request message by a message/java mapping and use another field in XML as the file name.
    I followed the blog `how to send binary data through PI` but in that case, the request message is also the same. Mine requires a mapping to be executed and in this case I cannot use dummy names for message types/interfaces as Enterprise Repository development is required.
    How can I achieve this?
    Thanks
    Gokhan

    Just solved the problem actually
    As I was trying to write a binary file directly with the receiver file adapter, I wasn't sure how to define a data type / message type for it. I developed a java mapping that decodes the base64 to binary data and writes it to the output stream, and used a dummy message type / data type for the service interface as the target in Operation Mapping
    And it worked!
    Regards,
    Gökhan

  • NTFS junction points in file adapter

    As for my system (NW70 SPS14), file adapter can't resolve symbolic links when configured as NFS/sender.
    So I have D:\very\big\level\of\deep\some\directory and D:\dsfs pointed at it using JP. In RWB I can see following error message: Configured source directory 'D:\dsfs' does not exist
    Why is FA so stupid?

    Sarvesh Singh wrote:>
    > Use Transaction AL11 in XI and check if your dir exists there. While mentioning the dir name in Communication Channel you don't have to mention the drive letter e.g. 'D' just mentioned \dsfs only.
    >
    > Very Important, that you should have full dir access authorization i.e. 777
    Because of file adapter works on J2EE-side, there is no need in AL11 approach. SAPService<SID> is the user who has to have enough rights, and he actually has full access to both of directories (full and linked).

  • (File-)Adapter Logging

    Hi,
    I configured the file adapter as sender (polling on a ftp server on my local machine).
    The log of the ftp server shows, that the adapter logged in and downloaded the specified file.
    But I can't find the message in any monitoring components, neither in end-to-end monitoring, nor in the xml message monitor.
    I can't find any logs concerning the file adapter on the J2EE Server. Is there any possibility to control the function of the file adapter ?
    Thanks and best regards,
    Linus

    Hello,
    There is an OSS Note (761921) that describes how to create a trace file for the XI Adapters (on the J2EE).
    No need to explain it here. Let em know if you have problem with this note.
    Regards,
    Mustapha Zehana.

  • File Adapter - how to get the file count from a folder

    Hi All,
    I have a requirement that have to poll a directory when the file count is reached to number N (ex:number of files avilable in folder is 5) otherwise it should wait and not pick any of the files. Is it possible to get the file count from a folder using file adapter ?? otherwise please suggest me an approach to achieve this requirement.
    Thanks,
    JJ

    Hi Sarath,
    Thank you for your reply.
    Go with the list files operation of file adapter it will gives you the number of files in the specified folder as you given. . - this step is already done.
    When the number of files reaches your count startup your webservice that which can polls the files. . . - how can i acheive this?? Have to poll the directory and process the number files - please let me know, what could be added to the webservice which is being invoked after cheking file count from parent process.
    The reason for the above question is - we cannot use ReadFile operation in second webservice because it will be automatically triggered when the file is avilable. Also SyncRead operation supports reading one file in b/w bpel process. Kindly explain me the implementation steps.
    Thanks,
    JJ

  • File adapter error after updating to SP19 (INBOUND_BINDING_ERROR)

    File adapter error after updating to SP19 (INBOUND_BINDING_ERROR)
    Hi all,
      im having some troubles after the installation of SP19 (from SP16 in NW04) with File Adapter (File->Idoc scenario).
    In message monitoring (Adapter Engine), I have several messages with status "System Error". The error text is :
    <i>Received XI System Error. ErrorCode: INBOUND_BINDING_ERROR
    ErrorText:   ErrorStack: Error in sender agreement for party '', service 'LEGACY_DEV', interface namespace 'http://XXXXX.com/XXXXXX', interface 'INTERFACE_OB' No sender agreement found for , , , , ,</i>
    Im sure that the Integration Directory settings have not been changed. So I tried the following, but the problem persists:
    - Deactivation/Activation of File Adapter channel
    - check that user XIISUSER is not locked
    - checked SXI_CACHE (it seems ok)
    - Many CPA full refresh
    - Dummy modifications of File Adapter channels (a dummy modification of the description)
    - Reboot J2EE
    I've seen that someone else had problems after upgrading to SP19. I'd really appreciate any suggestion of how to solve my issue.
    Thank you
    Manuel

    Hi Prabhu,
      I've already tried to restart server, but nothing happened. (Before update to SP19, the interface worked well).
    This is the error log from message monitoring:
    <i> 2007-01-16 16:37:34 Success Channel cc_File_Snd_Bolle: Entire file content converted to XML format
    2007-01-16 16:37:34 Success Send binary file  "BOLLE_20061229142059.CSV" from FTP server "AS810T:/sapinbound", size 8733 bytes with QoS EOIO
    2007-01-16 16:37:34 Success Application attempting to send an XI message asynchronously using connection AFW.
    2007-01-16 16:37:34 Success Trying to put the message into the send queue.
    2007-01-16 16:37:35 Success Message successfully put into the queue.
    2007-01-16 16:37:35 Success The application sent the message asynchronously using connection AFW. Returning to application.
    2007-01-16 16:37:35 Success The message was successfully retrieved from the send queue.
    2007-01-16 16:37:35 Success File "BOLLE_20061229142059.CSV" successfully archived on FTP server "AS810T" as "/sapinbound/bolle/20070116-163735-245_BOLLE_20061229142059.CSV"
    2007-01-16 16:37:35 Success The message status set to DLNG.
    <b>2007-01-16 16:37:35 Error Received XI System Error. ErrorCode: INBOUND_BINDING_ERROR ErrorText:   ErrorStack: Error in sender agreement for party '', service 'LEGACY_DEV', interface namespace http://XXXXX.com/XXXXXX', interface 'INTERFACE_OB' No sender agreement found for , , , , ,
    2007-01-16 16:37:35 Error Transmitting the message to endpoint http://SERVERNAME:8000/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: INBOUND_BINDING_ERROR:. </b>
    2007-01-16 16:37:35 Success The asynchronous message was successfully scheduled to be delivered at Tue Jan 16 16:42:35 CET 2007.
    2007-01-16 16:37:35 Success The message status set to WAIT.
    2007-01-16 16:42:35 Success Retrying to send message. Retry: 1</i>
    After this, the system try to resend the message, and the same error appears several times.
    Ty,
    Manuel

  • File Adapter Query, when PI server restarts polling starts

    Hi Experts,
    I have one problem with File sender adapter if someone can suggest solution or easy way to handle situation.
    I have a interface with 50 file adapters.
    I am activating all file adapters with poling interval 24 Hours.
    And I am activating all adapters after 10 minutes interval so that all should not run at same time.
    So every thing is good.
    But the problem is that whenever BASIS team restarts the SAP-PI server. All 50 file sender adapters get restart at same time (i.e. all poling starts at same time which I do not want because of file size of all files and dependency of one interface i/p on other file o/p).
    So every time when server is getting re-started, I have to re-activate all 50 adapters by sitting for many hours after every 10 minute interval.
    Can someone suggest any solution for above problem, or itu2019s not possible to control sender file adapter poling start when server starts instead of time when I activate it originally?
    Regards

    Hi Rohan,
    As far as I know, it is not possible to schedule the adapter when the server gets restarted.
    Lets see what experts say on the same.
    Thanks,

  • Counting number of files read by File adapter

    I have configured a file adapter in a BPEL prcs to read files from a location. The adapter is polling files with a specific file ext(say txt). Is it possible to know the number of files read by the BPEL prcs at the end of the day??? i,e.
    is it possible that a BPEL instance after reading a file updates the count in a variable and this variable value is seen by other BPEL instances and the other instances can also update the value....
    Any pointers will be helpful...
    Thanks

    You could make use of some logtable and log it inhere.
    In the bpel after a file is pickup up, read this value from the table, add 1 to it, and write it back.
    Or try this approach from Lucas :
    http://technology.amis.nl/blog/?p=2781

  • XI 2.0 Inbound file adapter : Connection reset by peer

    I am using XI 2.0 and have an inbound file adapter. It polls every 5 minutes. But at least 1 or twice a day the file adapter stops with the following error message.
    "java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read" occurred \par
    There have been times when this runs for days or weeks without any problems.
    Has anyone else seen this issue and how do your correct it?
    Currently I have to go into the file adpaters and restart them manually. It would be nice if there was some way to automate this function. Any ideas?
    Regards,
    Jim

    With JDK 5.0 use ojdbc5.jar instead of ojdbc14.jar.

Maybe you are looking for

  • How to get Crystal reports in GRC10 RAR

    Hello We have implimented GRC10 but we are unable to get crystal reports when running user or role level analysis kindly suggest me, is there any settings we need to do in SPRO or any plugin need  to install Thanks in advance.

  • TOC links fail when using book function for interactive pdf output

    I have  a large print publication consisting of multiple files using the Indesign book function. I have created a Table of Contents in the first document (there are multiple files in this book), but when I save to interactive pdf to create a digital

  • How to delete un-needed Lion install files

    To recover some extra disk space I am wondering if there are any temporary install files that I can now safely remove.  I did a google search and wasn't able to find anything.  Maybe the Lion install software already cleaned up as part of the process

  • HT5439 how to get online from apple tv?

    We are trying to access the internet from apple TV.  Can you tell us how?

  • Print out midi drum music

    Hey, I programmed some drums for my band. Is there any way I can print out the music of the midi so our drummer can learn them? cheers