Show TOC

Runtime Environment (Java Mappings)Locate this document in the navigation structure

Use

The Process Integration runtime uses the runtime environment for Java mappings to execute Java mapping programs. In addition to the mapping API you can use other standard libraries of the SAP JEE server in loaded Java mapping programs.

Prerequisites

You are using the SAP NetWeaver Developer Studio.

To be able to write a mapping program in your Java development environment, the Java runtime environment (JRE) of the SAP JEE server must be consistent with the JRE version of your Java development environment.

Features

The mapping runtime environment consists of the following runtime components:

  • The Java runtime environment (JRE) of the SAP JEE server

  • The mapping API (see: Java Mapping )

  • sapxmltoolkit The http://help.sap.com/saphelp_nw70/helpdata/en/36/ef353e39011a38e10000000a114084/frameset.htm contains a JAXP implementation.

    The SAP XML Toolkit will be replaced by version 5 of the Java Development Kit (JDK). More information: XSLT Mapping .

  • com.sap.mw.jco The SAP Java Connector enables ABAP-APIs to be called from the Java mapping. See the corresponding Javadoc documentation in the SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).

  • com.sap.tc.Logging The SAP Logging Service enables integration with the Application Server Management tools. See the corresponding Javadoc documentation in the SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).

Java programs that are loaded in an imported archive can use classes from the JRE, the mapping API, and these three standard libraries.

If you use JRE classes in your Java mapping programs then the same program restrictions apply as for Enterprise Java Beans (EJBs). This includes the following, for example (for a detailed description, see the relevant EJB specification):

  • Do not load a JDBC driver to use them directly. Instead, use the mapping lookup API (see: Mapping Lookups ), or the JDBC Connector Service in the SAP JEE Engine.

  • Do not use the package java.io to write directly to files, or use it to read directly from files.

  • Do not use a class loader in your classes.

  • Within a Java mapping program, do not call java.lang.System.exit() or java.lang.System.setProperties() .

  • Do not create or use any threads.

  • Do not use any network sockets.

    Also ensure that you read the implementation considerations and restrictions in Java Mapping .

Search Path for Classes in Java Mapping Programs (Integration Server)

The mapping runtime environment is determined by the software component version and the namespace of the Java mapping to be executed. The environment also has a specific search sequence when loading the classes. If the mapping runtime environment finds a class in a path, the search is terminated and the subsequent paths are ignored. The paths are searched in the following sequence:

  1. The paths of the JRE of the J2EE server

  2. The path in which the mapping API is saved and the path of the standard libraries (SAP XML Toolkit, SAP Java Connector, SAP Logging Service), see above

  3. Imported archives in the same namespace and the same software component version as the Java mapping to be executed

  4. Imported archives in the same namespace and a subordinate software component version

  5. Imported archives in other namespaces of the software component version

  6. Imported archives in other namespaces of subordinate software component versions

  7. Note that you can only load a class from the other namespaces if it is unique there.

Activities

Accessing the Runtime Environment in the SAP NetWeaver Developer Studio

Mapping API

To access the mapping API in a Java project in SAP NetWeaver Developer Studio, 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 .

  5. Enhance the variable with the following path: Start of the navigation path comp Next navigation step SAP_XIAF  Next navigation step  DCs  Next navigation step  sap.com  Next navigation step  com.sap.aii.mapping.lib.facade  Next navigation step  _comp  Next navigation step  gen  Next navigation step  default  Next navigation step  public  Next navigation step  api  Next navigation step  lib  Next navigation step  java  Next navigation step  com.sap.aii.mapping.api.filter.jar End of the navigation path

For more information about the mapping API (and the lookup API it contains) refer to SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required) and SAP NetWeaver Developer Studio:

Start of the navigation path Help Next navigation step Help Content  Next navigation step  SAP NetWeaver Developer Studio Documentation  Next navigation step  API Reference  Next navigation step  SAP NetWeaver 7.10 for Process Integration  Next navigation step  comp.sap.aii.mapping.api End of the navigation path.

Java EE Standard Libraries

To include the three J2EE standard libraries in the class path of SAP NetWeaver Developer Studio, proceed as follows:

  1. Call the context menu for your Eclipse project and choose Properties .

  2. Choose Java Build Path on the left-hand side.

  3. Choose the Libraries tab page on the right-hand side.

  4. Choose Add Variable.

  5. Select SAP_SYSTEM_ADD_LIBS and choose Extend .

  6. Select the required Jar file by using the following directory paths:

    • sapxmltoolkit

    • comp/ENGINEAPI/DCs/sap.com/sapxmltoolkit/_comp/gen/default/public/default/lib/java/

    • com.sap.mw.jco

    • comp/ENGINEAPI/DCs/sap.com/com.sap.mw.jco/_comp/gen/default/public/default/lib/java/

    • com.sap.tc.Logging

    • comp/ENGINEAPI/DCs/com.sap.tc.Logging/_comp/gen/default/public/default/lib/java/