OutOfMemoryError in Adapter module

Hi all,
I have scenario where I have to do some complex things in a adapter module. with little messages it works fine, but with the greate ones (about 15MB) I get a OutOfMemoryError after 2 messages. The system itself has anough memory I have about 5GB free but it is not allocated by the J2EE engine.
I tried to increase MaxHeapSize over the configtool and restart, but with no effect.
Can anyone give me a hint?
I'm on a HP-UX machine.
Thanx
Olli

Hi Oliver,
Goto the exchange profile via URL
http://<>:port/exchangeProfile, goto
IntegrationBuilder in the left tree and increase parameter com.sap.aii.ib.client.jnlp.j2se.maxheapsize from 512m to 768m (or higherif necessary). Press the save button.
Goto http://<>:port/rep/support/admin/index.html,
press AII Properties on the left side and then press the REFRESH button until you see the new value on the right side.
if the problem is no resolved even after doing the above, take a look at a look at note:
580351 Java WebStart troubleshooting in XI 2.0
855471
(This note is also valid for XI3.0)
Also have a look at this thread and see if it helps...
Re: java.lang.OutofmemoryError while loading message in mapping
Regards,
Abhy

Similar Messages

  • Adapter Module Filename in File Receiver Channel

    Hi All,
    is it possible to set the Filename in File Receiver Adapter from Adapter Module?
    I know that it is possible to read the data      
    Channel ch = new Channel(moduleContext.getChannelID());
    path = ch.getValueAsString("file.targetDir");
    I Need to set the filename in Adapter Module, using of Payload is not possible because Payload is not xml.
    Dynamic Parameters in Message Header is not possible because it is an multi mapping process an i need dynamic Filename for each Part
    payload after mapping is like
    MainDocument
    SubMainDocument
    MainDocument
    SubMainDocument
    i need special Name for each SubMainDocument in FileReceiverAdapter
    regards
    ralf

    Hello Stefan,
    interface mapping is an mapping  like this:
    outbound_interface => Inbound_Interface1
                                 => Inbound_Interface2
                                => Inbound_Interface3
    in sxmb_moni this looks like this
    Soap_Header
    Soap_Body
    Payloads
         =>MainDocument ( application/xml )
        => SubMainDocument ( text/xml )
         =>MainDocument ( application/xml )
        => SubMainDocument ( text/xml )
    First SubMainElement is routing to FileReceiverAdapeter A   where Filename has to be like "NameA%nr%"
    second SubMainElement is routing to FileReceiverAdapeter B   where Filename has to be like "NameB%nr%" 
    %nr% is som value from the Payload.
    Payload is not xml  because using of Conversion Argent!!
    I Think there is only one Dynamic in Header for all subelements, i have test it!
    ralf

  • Dynamic configuration required in sender file - Adapter Module

    Hi Everybody,
    I am developing an Adapter Module in the file adapter (sender) using Adapter Specific Message Attributes.
    I am using Dynamic configuration inside the Module Process method in the adapter module.
    We are getting an error saying Dynamic Configuration cannot be resolved.
    Can anybody tell me the package to be used.
    Thanks,
    Zabiulla

    You can access the dynamic configuration in adapter module like this:
    Message msg = (Message) inputModuleData.getPrincipalData();
    String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
    You do not need any addition library besides the adapter module API.
    Hope that helps
    Stefan

  • ModuleData.getPrincipalData returns null in the adapter module development

    Hi gurus,
    i am doing a test on the adapter module development following an article written by William Li:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ac06cf-6ee2-2c10-df98-e17430ca5949?QuickLink=index&overridelayout=true
    my problem is after the EJB has been deployed, it seems that the return of inputModuleData.getPrincipalData() is always null which makes the program can not get the xml payload from the framework.
    the main process of the example has been simplified like this:
         public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              Object           obj = null;
              try {
              obj = inputModuleData.getPrincipalData();
              Message     msg1 = (Message) obj;          
                    XMLPayload xmlpayload = msg1.getDocument();}          
              catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;
    after deployed, i get the following error in the adapter monitor of RWB: (my JNDI is testtest)
    17.02.2012 17:13:44.643 Information Send binary file  "test8.xml" from FTP server "10.18.48.150:/encrypt_test/", size 206 bytes with QoS EO
    17.02.2012 17:13:44.644 Information MP: processing local module localejbs/CallSapAdapter
    17.02.2012 17:13:44.644 Information Application attempting to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System
    17.02.2012 17:13:44.645 Information Trying to put the message into the send queue
    17.02.2012 17:13:44.648 Information MP: processing local module localejbs/testtest
    17.02.2012 17:13:44.648 Error MP: exception caught with cause java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getDocument() of an object loaded from local variable 'msg1'
    whereas if the code has been changed like this:
         public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              Object           obj = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   Message     msg1 = (Message) obj;     
                   if (obj != null )
                        XMLPayload xmlpayload = msg1.getDocument();
              catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;
    the file can be read by the file adapter.
    i just quite confused that why the return of the getPrincipalData() is null? where is the problem? thanks
    Edited by: Stephen Xue on Feb 17, 2012 5:22 AM

    I'm gonna reply to myself here. I changed the processing sequence of the adapter modules in the  in the FileSender channel so that my module comes first then CallSapAdapter. Then getPrincipalData() contains the message.
    Hope this helps someone else.

  • SAP PI crashes because of Custom Adapter module

    Hi,
    We are facing a strange problem. We have deployed a custom adapter module developed in java which accesses a Hardware Security Module(HSM) and uses the keys in HSM to digitally sign our data. Now, when I use particular methods in this code and deploy it on PI server, the server crashes while testing this out. As soon as I run the channel having this adapter module, PI server becomes unavailable. It restarts on its own after a few minutes.
    One of the reasons I identified to be causing this issue is the signing mechanism used in code. When I used a mechanism that was not supported or not correct, it crashed the server. If i corrected it, it worked fine. I found no other thing in my code causing this behaviour apart from this mechanism. But I am still not able to understand how a single method in a code can cause the whole server to crash. Has anybody here faced such a problem? Any pointers would be appreciated.
    We are using SAP PI 7.31 java only installation.
    Thanks,
    Ravi Desai

    Hi Ravi
    1. To check if it is a memory issue. Once you start the channel, check the memory usage in nwa. Check if the memory is increasing once the channel is started.
    2. Add debug statements to print logs in default traces at as many places as possible. Since your code is not reaching the Catch block, using the debug statement you can reach the line in the code which is causing this issue.
    Regards
    Osman Jabri

  • Using a different user(other than default PI user) with adapter module

    Hi,
    We are having a custom adapter module built to interact with a Hardware Security Module(HSM). This custom adapter module by default uses a PI user configured in the system. However, we are not able to pass commands to HSM because of insufficient authorizations to this PI user. Now, we do not exactly know the permissions required for the user to access HSM. We have asked the HSM support team about the same. However, I wanted to explore the possibility of using a different PI user to work with the adapter module and eventually pass commands to HSM.
    We have an admin user configured which has all the necessary authorizations. Is it possible to use this admin user created on PI system to work with adapter module so that it passes commands to HSM?
    Thanks,
    Ravi Desai

    We have given the necessary authorizations to PI user.

  • How to access Payload in XI Adapter Module

    Hello,
    I have to enhance a adapter module in xi very urgently. Target is to access a node of the XML payload and retrieve the corresponding value.
    This is how my document looks like:
    <mt_test>
         <element1>
              <…> </…>
         </element1>
         <element2>
              <LOG_NO>4711 </LOG_NO>
         <element2>
    </mt_test>
    I need now access the element <LOG_NO>. This can only appear one time in the whole xml document. My code that I did so far (inside the process method) to retrieve this element is like this:
    XMLPayload xmlpayload = msg.getDocument();
         DocumentBuilderFactory factory = null;     
         factory = DocumentBuilderFactory.newInstance();
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document document = builder.parse ((InputStream)xmlpayload.getInputStream());
         Element rootNode = document.getDocumentElement();
    <…and now I have no clue anymore…:-/…>
    May you give me an example how to access the node <LOG_NO> and save the corresponding value in a String variable?
    I would be really thankful.
    Greetings and thanks in advance,
    Tobias

    Hi,
    >>>found no solution with PI Standard Import to support FTP inside the Adapter Module
    why would you? file adapter supports FTP - so you don't need it
    >>>In order to use FTP library, is there any standard library available or supported by SUN.
    you can use any java ftp client available on google
    Regards,
    Michal Krawczyk

  • Setting the charset from an adapter module

    Hi folks,
    I'm trying to set the charset encoding of a payload using an adapter module (I know there is a TextCodepageConverterBean, but I want to set the charset for a message that hasn't one yet). The problem is probably more clear using an example.
    I output a UTF-8 flat string from my message mapping to the adapter framework (mail adapter in my case). Afterwards I want to convert this UTF-8 string to an ISO-8859 encoding with the TextCodepageConverterBean. But if I set the charset using the setContentType() function of my TextPayload object the information gets cut away. I'm using the format
    setContentType("text/plain;charset=utf-8;name=Test.txt")
    . But everything after the first semicolon is dropped. Setting the charset using the MessageTransformBean works, but I want to avoid this by all means, as I need to set the mime type from the adapter module.
    This is running on NW2004 with SP 16 and the latest patch.
    Any idea, why the MessageTransformBean works and not the setContentType call?

    This bug will be fixed with SP20.
    Regards
    Stefan

  • Adapter Module Receiver File Adapter

    Hi All,
    I am getting file name in the Mapping in my target structure in a field FILENAME and i want to use this field to create a file at the target with the name as the value in FILENAME.
    I have to develop this by using Adapter Module.
    Note : This can be done by Variable Substitution and Dynamic Configuration UDF.But i want to implement the same by using adapter module.
    Can somebody help me out in getting the FILENAME from mapping inside the module process method of module.
    Thanks,
    Zabi

    Try this..
    private Map param;
    DynamicConfiguration conf = (DynamicConfiguration) param.get(
    StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String Filename = conf.get(KEY_FILENAME);[/code]
    Thanks
    Sebin

  • Adapter module to enhance File adapter

    Hey guys
    i need a small clarification regarding adapter modules.
    is it possible via adapter modules to enhance the File adapter to such an extent that it can deliver files to two separate systems in separate landscapes.
    i know i can design one more receiver determination and can also use Run OS command options,but modules in general give better performance compared to others so just wan't to explore a little bit more about them.
    Thanx
    Aamir

    Hey Aamir,
    yeah, they do take a lot of resources, but that's how XI was built to work.
    What you're trying to do is a workaround and may not get support from SAP.
    If I have understood right, you still wanna maintain the endpoint connection data in the communication channels but want to acces them directly without going through the technical routing pipeline, is that so?
    If that's it, I'm sorry but I cannot help you any further.
    The only way I know of accessing adapters without going throught technical routing is by using lookup API (RFC, JDBC, Soap) but it is not intended for endpoint scenarios (insert, update etc), mainly for simple read (lookups).
    If maintaining the connection data outside adapters is not a concern, you could try to create the connections directly in Java code, inside java proxies.
    Regards,
    Henrique.

  • Adapter Module (Reading Excel File)

    Hi Guys,
    I followed the Webblog : Read Excel instead of XML through FileAdapter
    For File Adapter Module Development , for reading Excel Sheet.
    Deployment all went fine and when i used in my configuration , file is getting picked up but the xml content is not getting displyed , it says not well formated.Below error is shown in the CC Monitor
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'http://pxxxxx:50xxx/mdt/messagecontentservlet?att...
    My coding in nwds
              xmldata =   "<?xmlversion="1.0"encoding="UTF-8"?>
                             + "<ns:"+wb.getSheet(0).getCell(0, 0).getContents() +"xmlns:ns=""
                             + wb.getSheet(0).getCell(1, 0).getContents() + "">"
                             + "<Name>"+ wb.getSheet(0).getCell(1, 2).getContents()
                             + "</Name>" +"</ns:" wb.getSheet(0).getCell(0, 0).getContents()">";
    Kindly suggest if any
    srini
    Edited by: Venkateswarlu Srinivas on Jul 4, 2008 2:47 PM

    try removing the \n you have added in the string

  • Adapter module that dumps file to XI file directory

    I am given a task to find a way of backing up files the simpliest way. Currently, our config is in a scenario where there are 2 receiver, the receiving system (SAP) and the file backup (File adapter). I would want to reduce the config requirements by eliminating the file backup objects. And I am thinking of doing this by creating an adapter module to be included in the sender adapter.
    Another idea I could think of is the adapter module calls upon the file comm channel to do the file backup.
    The purpose of this research is to reduce object transport time and the mistakes the transport guys are doing on the file comm ch reconfiguration.
    To those who have experiences with adapter module development, is this idea feasible?

    Hi Jai,
    Thanks for your reply. That is the 2nd option I have in case the 1st one isnt possible.
    To further elaborate,
    Current config:
    we have two AS2 comm channels (sender and receiver) managing the connection with our external partners.
    File comm channels to backup the files we send and receive.
    The problem:
    We are having problems with the transport guys as they often make mistake on reconfiguring the file comm channel during transport.
    Requirements:
    Reduce object creation and tranport time.
    Solution proposal 1:
    The idea is to remove all existing objects related to file back up and have all the file back ups done by the adapter module. And this adapter module would become part of the as2 comm channels module processes.
    Hope this clarifies things more.

  • Adapter Module for Sender File Adapter to access a Flat file

    Hi,
    We have a scenario where the source is a flat file.I want to develop an Adapter Module to make a small change to every line in the Flat file.
    Now how do we read a flat file in the Adapter Module?Coz the flat file will be converted to XML file by the Standard Adapter Module of the File adapter.
    Please help me out with this.
    Thank you,
    Anu.

    Hi Anu,
    If you are not using Content Conversion option Standard Adapter Module does not convert the Flat file to XML .
    You can directly access the payload as it is in flat file in the Adapter Module and make changes.
    Use the Standard classes ModuleData & moduleContext to fetch the Payload.
    chk this :
    Customized Sender Adapter Module
    XI: Read data from PDF file in Sender Adapter
    regards
    Ganga

  • Adapter Module Error in PI 7.1

    Hi,
    I have built an adapter module which has been successfully deployed on PI 7.1 using JSPM, but in communication channel monitoring it is giving below error.
    Error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of UserModuleTestEjb
    In Module tab of communication channel I have passed Bean name, which works fine for other Adapter Module but strangely its not working for this one.
    I have also passed JNDI name which is same as EJB bean name. I have tried several other combinations like below none is working.
    localeejbs/UserModuleTestEjb
    localeejbs/sap.com/UserModuleTestEjb
    Regards,
    Nishant

    hi,
    Check if u have added correct references in application-j2ee-engine.xml file and if u are using external library it is there in SDA file.
    /people/stefan.grube/blog/2008/12/11/adjust-your-pi-70-adapter-modules-for-pi-71-in-15-minutes
    Thanks.

  • Adapter Module Migration in PI 7.1

    Hi,
    I have migrated some code for Adapter Module from PI 7.0 to PI 7.1. I have deployed the SDA file on the server and it was successful. But in the communication channel monitoring i am getting below exception.
    Message processing failed. Cause: javax.ejb.TransactionRolledbackLocalException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBTransactionRolledbackException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.Demo.JMSadapterModuleBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.Demo.JMSadapterModuleBean@63120b10 for bean sap.com/DemoJMSEARxml|DemoJMSEJB.jarxml|JMSadapterModuleBean; nested exception is: java.lang.NullPointerException
    could you please advise me what could be the problem?
    Please help me out here.
    Best Regards,
    Prasad Babu.

    Hi Prasad,
    please refer to the last paragraph of the CSS note -
    [#1004000 PI 7.1 Adapter/Module Development: API Changes since SP0|http://service.sap.com/sap/support/notes/1004000]
    i.e.,
    "MIGRATION NOTES
    API: NetWeaver04 XI 3.0/7.0 any SP; Documentation: XI 3.0/7.0 any SP
    XI 3.0/7.0 adapter and module implementations cannot be deployed in XI
    7.1. The source code must be adjusted first. Please use the API cross
    reference attached here. Further information can be found in the SAP
    NetWeaver PI  7.1 manual."
    Regards
      Kenny

Maybe you are looking for

  • Need advice about certification: do J2SE 1.4 or wait for 1.5 to go out?

    I need advice here! I am studing for Java Programmer certification (310-035) and I know now that the certification does not have any expiration date, instead it's version based. So, if I get now a J2SE 1.4 certification, soon it will be outdated... I

  • Mac Book Pro 15"

    I Bought my macbook pro 15" yesterday and i don't know how to make the first battery charge. Full charge before the first time i turn on the computer? Or use it untill fully discharge and then load?

  • Error while opening Quartz Composer

    Command: Quartz Composer Path: /Developer/Applications/Graphics Tools/Quartz Composer.app/Contents/MacOS/Quartz Composer Parent: WindowServer [91] Version: 2.1.1 (17.1) Build Version: 91 Project Name: QuartzComposerEditor Source Version: 170100 PID:

  • Include report header for every new page.

    Hi expert, I have create a report with two buttons, 'previous page' and 'next page'. when i click the buttons, my report will go to another new page. I am using NEW-PAGE in my report. My problem now is, how can i include TOP-OF-PAGE for every new pag

  • Inspection Specifications from Configuration

    Hi there ,                    If you set Inspection Specifications from Configuration indicator in the inspection type setting (QM view material master), the system takes the configurations from the sales or production order into account when inspect