SAP JRA in Adapter module

We are developing an Adapter module for "File Sender Adapter" and in that we have a requirement to call an RFC. We are trying to use SAP JRA (Java Resource Adapter) for doing this as we do not want to hard code the password in the module by using direct JCO connections.
Using JRA we are able to invoke RFC in our adapter module but the message payload does not go to the next module (Standard module) in the chain. We identified that as soon as we get the connection handle using statement:
       Connection connection = connectionfactory.getConnection();
message is not going to next module in the chain. We are also not getting any error or exception anywhere. It is just that the message is not getting processed. Any help or idea would be appreciated.
Regards

Hi Amol
I was not able to this today as I do not having authorization in our development system for exposing RFC as webservice and waiting for the authorization.
I want to know if I expose the RFC as webservice in development server, will it be transported via normal ABAP transport procedure in the landscape (will this require any change in config etc.) or I need to expose it separately in different server.
James

Similar Messages

  • 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

  • Reg Adapter Module in SAP PI 7.11

    Hi,
    I am trying to develop an Adapter Module using SAP NWDS and I am referring http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa?quicklink=index&overridelayout=true for the same.
    Now I am stuck on page 11 (page 16 of the pdf).
    Does the value of Remote interface have to be strictly com.sap.aii.af.lib.mp.module.ModuleRemote (similarly for other parameters)?
    Are these values dependent on the Default EJB Package that we use (mentioned on page10). Because the name of my package is com.companyname.adaptermodule and is as per the naming convention that we follow.
    Thank you,
    Pankaj.

    Hi,
    Ok. Actually I thought that the names are dependent on the default EJB package-name that we specify in previous step; but now these two do not seem to be related to each other (name-wise)
    The question seems to be answered for now. Thanks to Stefan.
    Thank you,
    Pankaj.

  • Import  com.sap.aii.mappingtool.* show error in PI 7.1 adapter module

    Hi
    Experts,
    i have an adapter module for 7.0 and i am trying to replicate the same for PI  7.1  in 7.1 NWDS.
    i have made the required changes as mentioned in stefan's blog :/people/stefan.grube/blog/2008/12/11/adjust-your-pi-70-adapter-modules-for-pi-71-in-15-minutes
    but  import com.sap.aii.mappingtool.tf7.rt.Container; shows error , do we need to  inlcude any jar file for this :
    i am using this module to rename file name (in case of pick and place scenario forwithot IR configuration)
    getMessageProperty and setmessageProperty is getting deprecated.(striked off)
    strFileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
    Regards,
    Srinivas

    > strFileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File","FileName");
    in PI 7.1 you can use:
    strFileName = msg.getMessageProperty(new MessagePropertyKey("FileName","http://sap.com/xi/XI/System/File"));
    Note that property name and namspace come in different order. I almost got mad until I noticed
    http://help.sap.com/javadocs/pi/SP3/xpi/index.html

  • Reg::Error in XMLDecryption algorithm for adapter module in SAP PI

    Hi Experts,
    I have developed a custom java code for encryption and decryption for XML to be included in adapter module in SAP PI using SAP netweaver.My decryption code is working fine for stand alone java application.But when I create EJB project and deploy it I get no error..But in communication monitoring of SAP PI i get the below error
    Error: org.apache.xml.security.encryption.XMLEncryptionException: No Key Encryption Key loaded and cannot determine using key resolvers
    I included xmlsec1.3.0.jar file as external library..
    I would be grateful if you could suggest any solution for the above issue.
    Thanks
    Priya

    Hi Priya,
                     I am working on the same senario if Uhave idea plz help me on it.
    Regards,
    Prasad.

  • Reg :: Exception in custom java adapter module in sap pi

    Hi Experts,
                  I have included custom  java adapter module in SAP PI. I get the below error in sender communication channel  monitoring.
    Error: javax.ejb.TransactionRolledbackLocalException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException; nested exception is: javax.ejb.EJBTransactionRolledbackException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException
    I have included in External jar files in EJB project  also..Will that cause the above exception?
    Kindly suggest your solution.
    Thanks
    Priya

    Hi !
    have a look
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    and this thread also
    Throw Error in Module Adapter EJB
    Thanks!

  • Another SOAP Sender adapter "com.sap.aii.af.mp.module.ModuleException" erro

    I am working on a synchronous scenario SOAP <-> XI <-> RFC.
    This worked fine, when I run it without SOAP adapter, direct via XI Pipeline.
    Now I want to use the SOAP sender adapter, but get the error as described below this post.
    As this is a real new XI installation, some patches or updates might be required to make it work. Or some adapter modules ?
    Any suggestions on how to solve this problem will be rewarded.
    What worries me a bit is the line "  " in the error description.
    Extra info: I use SoapSonar as a test webservice client. The error is the message as received in te test client.
    <?xml version="1.0"?>
    <!-- see the documentation -->
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP:Body>
        <SOAP:Fault>
          <faultcode>SOAP:Server</faultcode>
          <faultstring>Server Error</faultstring>
          <detail>
            <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
              <context>XIAdapter</context>
              <code>ModuleUnknownException</code>
              <text><![CDATA[
    com.sap.aii.af.mp.module.ModuleException: either no channelID specified or no channel found for the specified party, service, and channel name, MessageServlet(Version $Id: //tc/xi/645_VAL_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#9 $)
         at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:427)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
              ]]></text>
            </s:SystemError>
          </detail>
        </SOAP:Fault>
      </SOAP:Body>
    </SOAP:Envelope>

    Hi Chandravadhana,
    The colon should be there :
    http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm
    The inbound address for SOAP messages is: http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel
    Under party:service:channel enter the party name, the service name, and the name of the communication channel. If no party has been created, enter the following: channel=:service:channel
    Regards
    Suraj

  • Standard adapter modules in sap xi

    Hi,
    Can any one provide me the standard adpter modules in XI and the procedure to use them in the communication channel.
    Thanks,
    Rajeev.

    Hi,
    Go with these blogs.
    SAP NetWeaver Process Integration 7.1: Available Adapters and Adapter Modules
    TechEd 2006: EPI350 - Developing and Testing Adapter Modules in SAP NetWeaver Exchange Infrastructure
    these will help u out

  • Obtaining BAPI Parameters in Adapter Module

    Hi All
    I am using JRA way for obtaining BAPI parameters in Adapter Modules.
    Could someone provide me some guidance on the same.
    Which method in java will be used in retreving the value from BAPI inside module.(Example: Filename)
    and method for passing the same to BAPI using adapter module
    Regards
    Abhishek Mahajan

    Hi ,
    refer this link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4
    Which service pack you are working on ?
    If you are on SP14 then you need not create a wrapper, you can use standar SAP feature to do this.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm
    Commit Control for Individual BAPI Calls
    If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
    If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
    If your working on service pack <SP14 then refer the link below...this will help you in creating a wrapper..
    https://websmp203.sap-ag.de/~sapdownload/011000358700000328352005E/HowtouseBAPandccBPM.pdf
    regards
    Surya

  • Crating adapter modules in XI

    Hi
    I went through a blog on this and seen that we need some jar files inorder to develop this. these are files they have mentioned in the blog
    aii_af_lib.sda,
    aii_af_svc.sda and
    aii_af_cpa_svc.sda.
    Where are these files placed in the XI server. can naybody please tell me the exact location.
    thanks

    Hi Sudhakar,
    These files to be deployed in Netweaver developer studio .
    Plz do refer the following blog it explains clearly...
    Adapter Module Development & Module Configuration
    Also refer...
    ADAPTER MODULES
    how to create modules on j2ee engine
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    Alerts from adapter modules - the JRA way!!
    Alerts from adapter modules - the JRA way!!
    Alerts from adapter modules - the JRA way!!
    Alerts from adapter modules - the JRA way!!
    RFC calls from Adapter modules...the Web Service Way!
    RFC calls from Adapter modules...the Web Service Way!
    TechEd 2007: EPI351 - Developing User Enhancement Modules in the Adapter Engine
    TechEd 2007:  EPI351 - Developing User Enhancement Modules in the Adapter Engine
    TechEd 2006: EPI350 - Developing and Testing Adapter Modules in SAP NetWeaver Exchange Infrastructure
    TechEd 2006: EPI350 - Developing and Testing Adapter Modules in SAP NetWeaver Exchange Infrastructure
    Migrate from Java embedding in Oracle BPEL to Adapter modules in SAP XI
    Migrate from Java embedding in Oracle BPEL to Adapter modules in SAP XI
    XI Mapping Module for AFW
    The specified item was not found.
    XI: Dynamic configuration in adapter modules - one step further
    The specified item was not found.
    Adapter Module Development & Module Configuration
    Adapter Module Development & Module Configuration
    Dynamic configuration in adapter modules
    Dynamic configuration in adapter modules
    Rename Attachment Adapter Module
    Rename Attachment Adapter Module
    Regards,
    Vinod.

  • Access BAPIs Using the SAP Java Resource Adapter

    Hi experts,
    Can someone tell me how to Access BAPIs Using the SAP Java Resource Adapter?

    hi Shweta,
    Please refer the step by step procedure:
    1. Start the deploy tool of the SAP J2EE Application Server with the DeployTool.bat in the directory //<SAP J2EE Engine Installation Directory/.../j2ee/deploying.
    2. Choose Project &#8594; New Project and enter a name for the new project.
    3. Click on the Deployer tab.
    4. From the menu path, choose Deploy &#8594; EAR &#8594; Load Module and select the sapjra.rar file.
    5. For the newly created node sapjra.rar, choose Server Settings &#8594; Identity Subjects and select Caller Impersonation as authentication type, so that the J2EE user data is used to log on to the ABAP system.
    6. Make sure that the J2EE Application Server is running. Connect to the J2EE Application Server with Deploy &#8594; Connect.
    7. Deploy the sapjra.rar using the menu Deploy &#8594; Deployment &#8594; Deploy Module.
    8. Enter SAPJRADemo as application name and start the application.
    9. Close the deploy tool.
    10. Start the Visual Administrator again.
    11. Select the Cluster tab and switch to <Server Node> &#8594; Services &#8594; Connector Container.
    12. Click on the Runtime tab and choose sap.com/SAPJRADemo &#8594; eis/SAPJRADemoFactory.
    13. Choose Managed Connection Factory &#8594; Properties. On this page, you need to specify the logon data for the ABAP system. There is already some dummy data visible in the property list if no real system data has been specified so far.
    14. To change the value of a property, select the property in the list, change the value underneath it, and add the changes using the Add button. At the end, do not forget to save all changes by pressing the button Save Changes. The user configured for the SAP JRA must be the user authorized to read metadata of function modules.

  • 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.

  • 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.

Maybe you are looking for

  • Is my 5900 Faulty ?

    I recently purchased the MSI MS-Starforce GeForce FX900 256mb DDR (NBOX). I connect it to my ( Display 2 ) TV with colour (blue desktop) but my mouse pointer is not white but a fuzzy red and seems to have colours flowing through it and a fuzzy outlin

  • XI as FTPS client

    We have the digital certificate from our client. We will be polling their server (FTPS server) for the file. I guess all we need to do is to LOAD this digital certificate in Keystore service via VA and then to use this in comm channel, right? Thanks,

  • Finder freezes every 10min or so, necessitating Relaunch to continue working

    I have a MacBook Air (purchased Aug 2013) and am using OSX version 10.9.5. Processor = 1.3 GHz Intel Core i5 Memory = 4GB 1600MHz DDR3 Storage = 8.75GB available out of 120.47GB At the moment I am sorting through photo files (.jpg) on an external por

  • JDBC Driver Type - duplicate ignore

    Hi - Does the XI JDBC adapter require a type 4 driver or can other types be used as well? Thanks, Jesse

  • Probleme de chargement de html depuis flsh

    bonjour a tous. Je développe actuellement un site en flash comportant un menu avec des liens vers des pages html. En ligne, les pages html se chargent bien, mais un espace blanc apparait quelques secondes a la place de mon swf (contenu dans ma page h