Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

There are different ways to get the libraries that you need for XI development.

Make sure that the libraries fit to your XI installation, so the version and SP level should be the same.

See also  Get PI Libraries from ABAP Stack using ABAP Program

From the PI installation

You find the libraries in following folders of the server of your PI installation:

PI 7.0 

/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/apps/sap.com/com.sap.xi.services

  aii_map_api.jar, aii_mt_rt.jar (M)

/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ext/ ->

  • com.sap.aii.af.lib: aii_af_mp.jar, aii_af_ms_api.jar, aii_af_trace.jar (AM,AD)
  • com.sap.aii.security.lib: aii_security_lib.jar (AD)
  • security.class: tc_sec_ssf.jar (AD)
  • com.sap.aii.proxy.xiruntime: aii_proxy_xirt.jar (P)
  • com.sap.aii.messaging.runtime: aii_msg_runtime.jar (P,D)
  • com.sap.xi.util.misc: aii_utilxi_misc.jar (P)
  • com.sap.guid: guidgenerator.jar (AD,P)
  • sapxmltoolkit: sapxmltoolkit.jar (M,AM,AD,P)
  • tc~bl~txmanager~plb: sap.com~tc~bl~txmanagement~lib.jar (AD)

/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/services/ ->

  • com.sap.aii.af.ms.svc: aii_af_ms_impl.jar (AM,AD)
  • com.sap.aii.af.svc: aii_af_svc.jar (AM,AD)
  • com.sap.aii.af.cpa.svc: aii_af_cpa.jar (AM,AD)
  • com.sap.aii.af.security.service: aii_af_service_message_security.jar (AD)

/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/services/interfaces/appcontext

appcontext_api.jar (AD)

PI 7.1 and PI 7.3

usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/bin/ ->

  • ext/com.sap.aii.af.lib/lib: com.sap.aii.af.lib.mod.jar (AM,AD)
  • ext/com.sap.xi.util.misc/lib: com.sap.aii.utilxi.server.jar (P)
  • ext/com.sap.xi.util.misc/lib: com.sap.aii.utilxi.core.jar (P)  
  • ext/com.sap.xi.mapping.api.lib/lib: com.sap.xpi.ib.mapping.lib.jar (M)
  • ext/com.sap.xi.mapping.tool.lib/lib: com.sap.xi.mapping.tool.lib_api.jar (M)
  • ext/com.sap.guid: sap.com~tc~bl~guidgenerator~impl.jar (AD,P)
  • ext/security.class: sap.com~tc~sec~ssf~core.jar (AD)
  • ext/tc~bl~txmanager~plb: sap.com~tc~bl~txmanagerimpl~plb~impl.jar (AD)
  • services/com.sap.aii.proxy.svc/lib: com.sap.aii.proxy.svc_api.jar (P)
  • services/com.sap.aii.af.ms.svc/lib: com.sap.aii.af.ms.svc_api.jar (AD)
  • services/com.sap.aii.af.svc/lib: com.sap.aii.af.svc_api.jar (AM,AD)
  • services/com.sap.aii.af.cpa.svc/lib: com.sap.aii.af.cpa.svc_api.jar (AM,AD)
  • services/com.sap.aii.sec.svc/lib: com.sap.aii.sec.svc_api.jar (AD)
  • interfaces/com.sap.aii.af.ms.ifc/lib: com.sap.aii.af.ms.ifc_api.jar (AM,AD)
  • interfaces/appcontext_api: sap.com~tc~je~appcontext_api~API.jar (AD)
  • system: sap.com~tc~logging~java~impl.jar (AM,AD)

AD = Adapter Development, AM = Adapter Module, D = Dispatcher Module M = Mapping, P = Java Proxy

From service marketplace

You need a user for the SAP service marketplace.

  1. Enter service.sap.com/patches as address  in your browser window.
  2. Click on the left side on: Entry by Application Group
  3. Navigate: Support Packages and Patches -> SAP NetWeaver -> SAP NETWEAVER -> SAP NETWEAVER 7.0/SAP NETWEAVER PI 7.1
    -> Entry by Component -> J2EE Adapter Engine (PI/XI)/Adapter Engine (Java EE)
  4. Expand XI ADAPTER FRAMEWORK CORE 7.00/7.10 -> #OS independent and download the SP level, that fits your PI installation
  5. Extract the downloaded .sca file recursively, until you get the .jar files.

From NetWeaver Developer Studio 7.1

To access the mapping API in a Java project in SAP NetWeaver Developer Studio 7.1, proceed as follows:

1. Choose Properties in the context menu for the Java project in which you want to apply the mapping API.

2. In the navigation tree choose Java Build Path and then choose the Libraries tab page.

3. Choose Add Variable.

4. From the list of classpath variables, select SAP_SYSTEM_ADD_LIBS and choose Extend.
(If this variable is not available, choose Configure Variables -> New, Enter Name SAP_SYSTEM_ADD_LIBS and select path /<eclipse>/plugins/com.sap.tc.ap_XXX -> OK)

5. Enhance the variable with the following path:
comp -> SAP_XIAF -> DCs -> sap.com -> com.sap.aii.mapping.lib.facade -> _comp -> gen -> default -> public -> api -> lib -> java -> com.sap.aii.mapping.api.filter.jar

From Java Webstart local files

If none of the above mentioned ways is suitable for you, as you have no access to the ressources, you can at least get the library for mapping in the local files of your Java Webstart installation, after you have called the Integration Directory (Enterprise Service Directory) from your PC.

  1. Find the Java Webstart cache folder on your PC (Start Java Webstart and choose file -> options -> extended)
  2. Navigate to the folder http -> <server> -> <port> -> DMrep -> DMrepository
  3. Here you find:
    • For PI 7.0 RMaii_map_api.jar and RMsapxmltoolkit.jar which you can use instead of aii_map_api.jar and sapxmltoolkit.jar
    • For PI 7.1 RMcom.sap.xpi.ib.mapping.lib.jar and RMsap.com~tc~sapxmltoolkit~sapxmltoolkit.jar which you can use instead of com.sap.xpi.ib.mapping.lib.jar and sap.com~tc~sapxmltoolkit~sapxmltoolkit.jar

7 Comments

  1. Hi Guest,

       This is an exellent aricle. Helped me a lot. Thank you so much. Can you try writing one for PI 7.3.

    regards

    Anupam

  2. Guest

    Hi,

    Please add the list of libraries for 7.3 as well.

    Otherwise, I will add it after completion of my current project as we will need 7.3 jars in our project :)

    Regards,

    Sami

  3. Former Member

    This is a nice cross reference! 

    Under the PI 7.1 and 7.3 sections, there is designation if the jar is part of Adapter Development (AD) or Adapter Framework (AM) etc.

    If the jars are not located on my server, does that imply that some portion of the PI product has not been installed? For example, I have com.sap.aii.af.lib.mod.jar which is part of both AD and AM, but I am missing sap.com~tc~sec~ssf~core.jar which is only part of AD.

    Does this mean we need to get something else installed?

  4. Good article, but for 7.3 and above most time you need to

    In nwds in the java build path - libraries tab - press the button "add libraries" - "XPI Library" - choose mapping or adapter libraries.

    Unfortunately the com.sap.aii.af.svc._api.jar is missing in the NWDS 7.3 sp5 and  nwds 7.3.1 SP11. This lib is needed to write to the audit log. Only way I found is to add this lib as external jar but this has the effext that it is included in the ear and gets deployed which you don't want at it is already present in the server.

     

    Usually you want to log to the default trace and then you need to press the "add variable" button, click wd_runtime, press the "extend" button and select the com.tssap.sap.libs.logging._version_numbers

     

    To write to the audit log something like this

    Object obj = null;
    Message msg = null;

    MessageKey amk = null; // Previously AuditMessageKey
    AuditAccess auditAccess = null;
    try {
    obj = inputModuleData.getPrincipalData();
    msg = (Message) obj;
    if (msg.getMessageDirection() == MessageDirection.INBOUND) {
    amk = new MessageKey(msg.getMessageId(),
    MessageDirection.INBOUND);
    } else {
    amk = new MessageKey(msg.getMessageId(),
    MessageDirection.OUTBOUND);
    }
    auditAccess = PublicAPIAccessFactory.getPublicAPIAccess()
    .getAuditAccess()

    auditAccess.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,
    "try to get msg.getDocument()");
    XMLPayload xmlpayload = msg.getDocument();

  5. Hello All,

    I have a SAP PI 7.4 and there were some libraries I couldn't find in the paths of the document. Here's the list of folders updated:

    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/com.sap.aii.af.lib/lib/com.sap.aii.af.lib.mod.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/com.sap.xi.util.misc/lib/com.sap.aii.utilxi.server.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/com.sap.xi.util.misc/lib/com.sap.aii.utilxi.core.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/com.sap.xi.mapping.api.lib/lib/com.sap.xpi.ib.mapping.lib.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/com.sap.xi.mapping.tool.lib/lib/com.sap.xi.mapping.tool.lib_api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/core_lib/sap.com~tc~bl~guidgenerator~impl.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/security.class/lib/sap.com~tc~sec~ssf.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/ext/tc~bl~txmanager~plb/lib/private/sap.com~tc~bl~txmanagerimpl~plb~impl.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/services/com.sap.aii.proxy.svc/lib/com.sap.aii.proxy.svc_api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/services/com.sap.aii.af.ms.svc/lib/com.sap.aii.af.ms.svc_api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/services/com.sap.aii.af.svc/lib/com.sap.aii.af.svc_api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/services/com.sap.aii.af.cpa.svc/lib/com.sap.aii.af.cpa.svc.api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/services/com.sap.aii.sec.svc/lib/com.sap.aii.sec.svc_api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/interfaces/com.sap.aii.af.ms.ifc/lib/com.sap.aii.af.ms.ifc_api.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/interfaces/appcontext_api/lib/private/sap.com~tc~je~appcontext_api~API.jar
    /usr/sap/<SID>/{J<nr>|DVEBMGS<nr>}/j2ee/cluster/bin/system/sap.com~tc~logging~java~impl.jar

    Regards!

  6. http://help.sap.com/saphelp_nw74/helpdata/en/e9/61e1407e858031e10000000a1550b0/content.htm

    On this doc it is mentioned

    • Only set references to the Adapter Framework API facades.
    • Do not define references to the implementing components.
    • Specify at least the following Adapter Framework API references:

      These apply for adapters and modules.

      • Adapter Framework libraries: com.sap.aii.af.lib.facade
      • Adapter Framework interfaces: com.sap.aii.af.ifc.facade
      • Adapter Framework services: com.sap.aii.af.svc.facade

    Specify the following AS Java references:

    • JCA 1.0 Lifecycle Fallback interface:appcontext (only for the adapter)
    • AS Java components, for example, Transaction Manager Service engine.application.facade

     

    • But how do you do it in NWDS? A beginners guide would not hurt.

     

    I have problems getting the SPIManagedConnectionFactory to compile from the adapter sample. 

    The easiest may be to just edit the .classpath with a text editor

    otherwise in NWDS

    right click project - configure build path - libraries tab - add variable button - extend button - find lib and add it

    I strongly advice to get jfind.jar from sourceforge 

     

    When this is on the classpath it compiles finally

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="con" path="com.sap.ext.libs.xpi.classpathContainer/mapping"/>
    <classpathentry kind="con" path="com.sap.ext.libs.xpi.classpathContainer/adapter"/>
    <classpathentry kind="con" path="sap.jee5"/>
    <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runtimeTarget.sap/sapruntime"/>
    <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/SAP Component Library for JSF"/>
    <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.security_2.0.0.150505070606.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.bl.guidgenerator_2.0.0.150505070606.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.engine.clientapis_2.0.0.150505070606.jar"/>
    <classpathentry kind="var" path="ECLIPSE_HOME/plugins/com.sap.ep.classlocator/ExtractedJars/tc~je~txmanager~api.jar"/>
    <classpathentry kind="output" path="bin"/>
    </classpath>

  7. Former Member

    I'm a newbie and I don't know where to access this folder: usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/bin/

    And what does <nr> mean? I mean which number? Instance number?
    it appears to be a linux path. can I access it through internet explorer? (I know that this is dumb, but please.. I don't have access to a linux terminal)
    is there a way to open this folder from ABAP stack?  (I mean the window that we access pi system from sap logon pad)

    Can you provide some screenshots with the explanation please?