File sender adapter Module Error

Hi Everybody,
I have developed an adapter module for file sender to rename the file name which is picked from the directory and I am getting an error
"Attempt to process file failed with java.lang.NullPointerException".
Can anybody tell me why is this error?
Thanks,
Zabi

Hi,
first check that module has been succesfully executed or not .This you can check in RWB .
Secondly go in the file adpater and click on to module tab and check
1-there will be two things one will be adapter module that you have depolyed. other one will be call sap adapter.
2- make sure that call sap adapter should come after the module you have deployed. and having the key value less then adapter module (let say your adapter module is having the key value 1 and  call sap adpater is having the key value 0 then you need to change the key value there)
Thanks
sachin

Similar Messages

  • Error Archiving File in File Sender Adapter using AF_Modules/PayloadZipBean

    Hi everybody.
    I have to pick a zip file up from ftp server, unzip an convert the file in xml.
    Im using this modules in file sender adapter:
    AF_Modules/PayloadZipBean --> To unzip de file
    AF_Modules/MessageTransformBean --> file to xml
    The problem is when I try to archive de file. Im getting this error and I dont know why (This path exists /out/ProcesadosSinError/)
    Could not archive file 'test.zip' as '/out/ProcesadosSinError/20100518-091029-155_test.zip' after processing: java.io.FileNotFoundException: /out/ProcesadosSinError/20100518-091029-155_test.zip (A file or directory in the path name does not exist.)
    Could it be that is not possible to archive with AF_Modules/PayloadZipBean?
    Thank u so much

    Hi Stefan.
    Absolutely. This path exists. It's an absolute path from root. I can´t understand the error!!!!
    Thanks!!!
    Edited by: Christian  Abad Chico on May 18, 2010 9:35 AM

  • AS2 error The FILE send adapter cannot open file

    I have AS2 setup under biztalk. I have receive port which listen to HTTP adapter and keep listening on web site.Then there is corresponding send port which just write that file in folder . Send port just have filter for Receive adapter name.
    It works fine, but some time I get error message 
    The FILE send adapter cannot open file <folder name\guid.txt > for writing.
     Details: The system cannot find the path specified.
    I am not able to understand what is error for this? Please help me to figure-out this. 

    Specifying the Backup transport is not going to solve the problem. Specifying the backup transport in this case is something like addressing the symptom of the issue and not finding the solution to root cause of the issue.
    As you specified, if the mentioned error only happens some time but not always. In this case, the message "The
    FILE send adapter cannot open file <folder name\guid.txt > for writing." would just be a warning message. Just by setting the retry in the send port will solve the issue. i..e Since this issue occurs rarely, it may be short lived glitch.
    So by setting the retry count (lets say 3 times) with retry interval (let say 5 mins), this issue can be easily mitigated. You would not lose the message. So during the glitch you would get this message as warning, send port will retry "after specified
    retry interval so after 5 mins", so by that time chances of files transfer is high. So this problem can be easily handled just by having retry count and retry interval in send port.
    But you need to find the actual cause for this issue or you need to find the permanent resolution for this issue.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • J2SE File Sender Adapter Error

    Hi Experts,
    I am doing a scenario on J2SE. Like this: J2SE File Sender -> XI -> J2SE File Receiver.
    On File Sender adapter, it has an error, like this "ERROR: Finished sending to Integration Engine with error u201Cjava.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Foundu201D. Skip confirmation and quit this loop"
    And this is the full log:
    D:\Thach\Input\xi_test.xml
    16:51:45 (4052): Start processing u201CTXTu201D file u201CD:\Thach\Input\xi_test.xmlu201D size 190 in u201CEO mode
    16:51:45 (4058): Start converting to XML format
    16:51:45 (4061): Converted complete file content to XML format
    16:51:45 (4062): Sending text message u201Ce1ffc9e0-71e5-11de-8306-0019d12044f1u2033 type u201Capplication/xmlu201D to Integration Engineu2026 (message size: 633 bytes, URL: u201Chttp://host:50200/sap/xi/engine?type=entryu201D)
    16:51:45 (4076): ERROR: Finished sending to Integration Engine with error u201Cjava.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Foundu201D. Skip confirmation and quit this loop
    16:51:45 (4077): Retry mode - wait 10 sec, 0 msec interval before retry
    And this the content of xi_test.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Material_toPPS xmlns:ns0="http://gml.com/xi/XI/Tutorials">
       <Material>
          <Text>Test</Text>
       </Material>
    </ns0:MT_Material_toPPS>
    And this the configuration of J2SE File Sender:
    mode=FILE2XMBWITHROWCONVERSION
    XI.TargetURL=http://host:50200/sap/xi/engine?type=entry
    XI.User=PISUPER
    XI.Password=*********
    XI.QualityOfService=EO
    XI.SenderParty=
    XI.SenderService=BS_PlainJ2SE_Sender
    XI.ReceiverParty=
    XI.ReceiverService=BS_FileRecv
    XI.Interface=MI_Material_toPPS_OB
    XI.InterfaceNamespace=http://gml.com/xi/XI/Tutorials
    file.type = xml
    file.sourceDir=D:
    Thach
    Input
    file.sourceFilename=xi_test.xlm
    file.processingMode=test
    file.pollInterval=10
    #Content conversion parameters in PlainJ2SE Adapter
    xml.documentName = MT_Material_toPPS
    xml.documentNamespace = http://gml.com/xi/XI/Tutorials
    xml.structureTitle = Material
    xml.processFieldNames = fromConfiguration
    xml.fieldNames = Text
    Please help to solve the issue.
    Thanks so much,
    vn thach

    The URL of the Integration Server is wrong or you cannot access the server from the host, where the J2SE adapter is running:
    XI.TargetURL=http://host:50200/sap/xi/engine?type=entry
    If the Client of the Integration Server is not 000, then you have also to add that line:
    XI.Client=XXX

  • Changing source file for file sender adapter in adapter module

    Hi guys!
    3rd party partner send us files, which are not acceptable by file adapter, so we need to implement (I suppose) adapter module in file sender adapter to correct the file format before it is taken by standard adapter. I have no experience in this development field. Could you give me:
    1, whether it is possible (changing file contents before it is taken by standard file sender adapter)
    2. any ideas, where to start with the development (pdf with info etc.)
    Thanx a lot!
    Olian

    <i>2. any ideas, where to start with the development (pdf with info etc.)</i>
    >>>>>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    <i>1, whether it is possible (changing file contents before it is taken by standard file sender adapter)</i>
    >>
    yes you can achieve this in the logic in a module

  • File send adapter error : java.lang.NullPointerException

    Hi All,
    I have an issue on some of the file sender adapter communication channels .The channels are failing with the error :
    Error :"Attempt to process file failed with java.lang.NullPointerException"
    This issue is happening for couple of file sender channels.When I try to stop and start the channels couple of times the failed messages are getting processed.And after the processing of the failed file, the new files are successfully polling as usual.
    Please share your experiences as on why this issue is happening and what is the permanent fix for the issue ?
    Thanks in Advance !
    Thanks & Regards,
    Roni

    Hi Roni,
       Try with a J2EE restart of the PI server. Hope that will solve your problem.
    Thanks,
    Anudeep

  • Issue on file sender adapter communication channel

    Hi All,
    I have an issue on some of the file sender adapter communication channels .The channels are failing with the error :
    (u201CAttempt to process file failed with com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.xi.swift.ParserException: com.sap.xi.swift.ParserException: Message does not start with character '0x1f'u201D).
    Please let me know the procedure to get this message processed.
    Thanks & Rgards
    Vishnu

    Hi Vishu,
    Find out in what encoding the file is in. for that download Notepad++ and open the file with in.
    In Encoding tab you will see the encoding format.
    1. If its not UTF-8 or ANSI then you should set the correct encoding in Sender File channel.
    2. Check for BOM characters which will not be visible directoly.
    3. Use Notepad++ to convert the content to HEX and check for hidden values. i bet there will be some Encoding BOM in the file which is creating problem while picking the file.
    Since you are using SWIFT module: try to validate the XML file using Altova XML and check weather is correct.
    also ref to this thread:http://scn.sap.com/thread/2134946
    Regards,
    Senthilprakash

  • File Sender Adapter - Throw Alerts

    Hi experts,
    I've custom a communication channel for the file sender adapter and I'd like to raise alerts in case of technical errors and functional.
    I managed to do this for functional errors, by alert rules, and runs good. But for technical errors, the alert rules, not runs good.
    I think to develop this control through Adapter User Modules. But so far I have not succeeded. Because if I remove the read permissions of the directory, the User Module is not executed.
    I don't know the solution. Any ideas?
    Thanks,
    Jose.

    Hi experts,
    My problem was a bad configuration on the parameters of the alert rule. To manage the system errors and the application errors for my process integration scenario I'm configured the next:
    System Errors:
    Rule Activated: Yes. - And - Suppress Multiple Alerts of This Rule: No.
    Description and Alert Category, the corresponds.
    Bound to message: Not relevant.
    Sender Service, Sender Interface and Sender namespace, the corresponds.
    The other conditions: *
    Where did the error occur?
    Adapter Engine: Yes. - Adapter Type: File
    Application Errors:
    Rule Activated: Yes. - And - Suppress Multiple Alerts of This Rule: No.
    Description and Alert Category, the corresponds.
    Bound to message: Yes.
    Sender Service, Sender Interface and Sender namespace, and Receiver conditions, the corresponds.
    Where did the error occur?
    No Restriction.
    Thanks to all,
    Jose.
    Edited by: Jose María Mudarra Lara on Jan 28, 2009 3:45 PM

  • File sender adapter (FTP) - processing mode "Archive"

    Hello all
    We're polling files from an external FTP server. For this I created a scenario on XI according to this thread:
    When setting processing mode to "Archive" in the file sender adapter (ftp) it polls the file, stores it to the archive directory I specified and then tries to delete the file on the FTP server side. This returns me an error because we're not allowed to delete the retrieved files on the FTP server!
    Because of this error the file adapter stops further processing and does not poll all the other files.
    How can I disable this deletion mechanism while keeping processing mode to "Archive"?!?!?
    We do not want to use processing mode "Delete" or "Test" and we don't see other options to influence this behaviour.
    Thanks for any guideance on this one in advance!
    Kind regards,
    Renaud

    Hi Bhavesh
    Sorry for the late answer. Unfortunately I can't ask the application system to provide file names containing a timestamp within. The files are provided by an external partner and are retrieved by several others as well.
    In the meantime I managed to achieve this:
    In repository I created dummy data types, message types and message interfaces. No mapping programs and interface mappings!
    In configuration I created the necessary communication channels (1 ftp sender, 1 file receiver) and the required receiver and interface determinations as well as the sender and receiver agreements.
    The result of this is:
    I'm able to poll some specific files via ftp from remote host. The file names are file1.arj, file2.arj, file3.arj and file4.arj. All 4 files have the same SourceFileTimestamp (e.g. "20060727T053900Z").
    I'm able to store those 4 files 1:1 in a target directory with the same file names. Until here I did NOT need to follow this blog: <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>.
    As of this blog it is possible to access adapter specific attributes and make them available in message mapping using user defined functions. This way I'm able to get the SourceFileTimestamp from the polled files and use it in a message mapping. This way I'm also able to use it in variable substitution on file receiver adapter (syntax = "payload:root,1,fileTS,1") in order to dynamically create a directory with this syntax: YYYYMMDD.
    So far so good... but the only remaining BIG problem now is, that as soon as the mapping is activated and assigned in the interface determination, the created files contain the XML payload instead of the original binary content. Where has it gone? How should the target message type look like so that it can carry over the original binary file content?
    BTW: isn't it possible to post screenshots? Would be much more easier to explain things... so sorry to anyone if I wasn't clear enough!
    TIA and best regards,
    Renaud

  • UDF to get the filename for File Sender Adapter

    Hi,
    I had an requirement to get the  the Filename and map to the  target payload.
    I had configured the File Sender Adapter settings in the ID
    This is the following UDF i got from SDN.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName;
    But when iam using this UDF iam getting an error
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_ORDER_CRS_OB_SAP_PROXY_IB_ method Filename$[com.sap.aii.mappingtool.tf3.rt.Context@54e154e1]
    Please help me in correcting the error.
    Thanks
    Srinivas

    Hi Jayson,
    actually, in the interface mapping, it doesn't give exception.
    The DynamicConfiguration is a constant retrieved from the container object, so it will never be returned as null (given that the container object was instantiated).
    Just the retrieved value will be null (since it was not previously set), but no exception occurs.
    In the message mapping, the container object is never instantiated, and that's the reason for the NullPointerException.
    Regards,
    Henrique.

  • Scheduling File Sender Adapter

    <b>Hai expertise,
          We need to send image files from different local PC's (whose IP address is dynamic) to Document Storage System through XI.
    1) we have to use HTTP sender (Java program which pick current IP address of system and file names from folder to XI in XML format).
    2) XI has to pick the files and depends on response from BAPI files has to be moved to other folders in local machine (from where XI has picked the files)
            Is there any way to pick the payload value to one feild of File sender adapter?
           will it work through Adapter Specific Message Attributes?
             But ASMA is for dynamic folders and dynamic filenames we need to set dynamic FTP IP address to FTP Server name of File Sender adapter.
           Is this functionality be achieved without adapter module creation?
          One more approach we though is that "XI will get XML data of IP address where file resides and file names in the form of XML, which we are polled by server proxy and using that IP address in proxy can we use do FTP copy and moving files from one folder to other depends on BAPI response". Will this work as the BAPI as to execute in backgroung to get files from local windows based machine to sever for FTP copy????
    File sender adapter has to be triggered, when HTTP sender sends the data to XI, Is this possible???
    Can we use File Sender adapter, when HTTP sender sends the data to XI in the same interface?
    Picking files from static folders, filenames but dynamic FTP Servers, is this possible through standard File Sender Adapter?
    Please advice.. its urgent...
    Regards,
    Pushparaju Bollapalli</b>

    try this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d458a870-0601-0010-caab-b99c79741964
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4f61fddf-0601-0010-7ab5-fb749538f6ab
    /people/sap.user72/blog/2006/06/04/starting-stopping-of-communication-channel-from-rwb

  • Cant do a file get from external server using file sender adapter with ftp

    Hi all,
    Up until now our company has only used the file sender adapter with ftp protocol to get a file from our XI server for processing and input the file into an integration process
    I have a requirement to do an ftp file get from an external server
    From our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...).  So all firewall issues and communications are fine
    Unfortunately I cannot currently pull files from the external server using the XI file adapter with ftp protocol from the XI development server AWB017
    FTP Connection Parameters: External server name using port 21, Data Connection is Passive, No security, I supply a userid and password
    Processing Parameters: Processing Mode is Archive (I tried test but this did not work either)
    No messages appear in the RWB
    Is there something else that I need to set up in order for the external ftp get to work via the XI file adapter?
    Regards,
    Mike

    Thanks for your responses.
    I have found the error messages in the File Adapter Monitor
    Scenario 1
    When I prefix the source directory with a forward slash, eg <b>/Folder/Subfolder</b> the error message is as follows
    <b>EST: Error: Error connecting to ftp server 'ip address': FTPEx: /Folder/Subfolder: The system cannot find the path specified</b>
    Scenario 2
    When I DO NOT prefix the source directory with a forward slash, eg <b>Folder/Subfolder</b> a different error message is returned
    <b>Error: Retrieving file 'FILENAME.XML' failed unexpectedly: FTPEx: Folder/Subfolder: The system cannot find the path specified</b>
    At least in this scenario the adapter has been able to identify the file on the external FTP site but cannot retrieve it
    Questions
    I thought that the backslash prefix for the source directory was mandatory but I am receiving an error in each scenario
    I receive the same error message whether the Processing Mode is 'Archive' or 'Test'
    The logs on the external ftp server seem to indicate that I am simply connecting, sending username and password then quiting straight away. I am not issuing any commands that they can see
    I thought that being a Sender adapter it would inherently execute a Pull or Get command
    To recap, from our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...). So all firewall issues, communications, userid and password are fine
    Has anyone experienced these issues?
    Please advise on next course of action?
    Regards,
    Mike

  • How to skip a blank  row in File Sender Adapter - while mapping ?

    Hi friends ,
                     While i am reading a test file it contains some Blank Lines i need to skip that blank lines and i have to read only full line .
                        Do i need to give any configuration in File Sender Adapter ?
                        Expecting your reply asap
    Best Regards .,
    V.Rangarajan

    <i>Hi friends ,
    While i am reading a test file it contains some Blank Lines i need to skip that blank lines and i have to read only full line .
    Do i need to give any configuration in File Sender Adapter ?</i>
    >>>>
    currently the only option that the file adapter provides you is to skip lines at the starting of the file but not in the middle of the file.
    in case these blank lines are at the starting of the file then you can use the following option
    <i>Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
    This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.</i>
    Ref: http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    else the best way would be to handle the same in your mapping (test if the xml node is empty, in tht case do not map it) or use a module to delete all blank lines in the file.

  • File Sender adapter with File content conversion

    Hi
    I'm having problems picking up a flat file that has some junk characters in the file.
    I'm usign a file sender adapter with file content conversion. The adapters shows the following error-
    Conversion of complete file content of  to XML format failed around position 0: sun.io.MalformedInputException
    this is the sample data with junk char's -
    A20099201009999009999060815160505051700130008151vÿÿÿÿ³  r 0OK0476                     31N016227241915840IV  00840 ÿÿÿ ÿ ÿÿÿÿÿÿÿÿ ÿ ÿÿÿ             
    There is not much in the file content conversion. This is a fixed length file, I'm just pickign it up & passing it to an inbound proxy. All my processing is in the proxy.
    I'd appreciate any suggestions.
    Thanks
    Rachana

    Hi Rachana,
    Do you use a specific "encoding" like UTF-8 or ISO-8859-1 in your Sender CC?
    To be simple, Encoding is linked to country, you can find all "iso-nnnn" via google or some of them in sap help.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Moreover, with your source file opened thanks to Notepad (for instance), use option "save UNDER", you will the encoding use by your file
    Mickael

  • File Sender Adapter - File overwritting in the Archiving folder

    Hello Experts,
    I am doing File sender to proxy Receiver Async Scenario.
    In File Sender adapter, i am using the Archiving option by spacifying the
    Archiving path.
    Files are picked up and archiving happen successfully.
    Problem is: - once the File is picked up and archivied into the Archiving location
    If end user again rectifies some data in the same file and place it in the source directory
    then i am getting the following error in RWB Commu. channel monitoring.
    Failed to archive file 'File1.TXT' as '/Input File location/File1.TXT' after processing. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 File not renamed.  File already exists.  You may delete the existing file and then rename.u2019 For details, contact your FTP server vendor.
    I know this is because of File sender adapter is trying to archive the file with the same name(File1.txt) in the archiving location.
    My Question: - Is there any option to allow the File sender Adapter for overwritting the
    File in the archiving location.
    Thanks & Regards
    Jagesh

    check if there is proper rights to over write files in the archive folder.
    The problem seems to be that the rights/authorization is not there. Else the adapter usually overwrites files in the archive folder unless you use the timestamp option.
    Archive
    Files that have been successfully processed are moved to an archive directory.
    u25A0       To add a time stamp to a file name, select the Add Time Stamp indicator.
    The time stamp has the format yyyMMdd-hhMMss-SSS. The time stamp ensures that the archived files are not overwritten and it enables you to sort them according to the time that they were received.
    u25A0       Under Archive Directory, enter the name of the archive directory.
    u25A0       If you want to archive the files on the FTP server, set the Archive Files on FTP Server indicator. If you do not set the indicator, the files are archived in the Adapter Engine file system.

Maybe you are looking for