Java mapping - Linkage Error

Hello,
We are on PI 7.0 SP10.
Currently we are migrating the XI servers from Solaris to AIX IBM.
When I try to run Java mapping, I get following error:
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>Application</SAP:Category>
  <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
  <SAP:P1>sapmarkets/marketconnect/xcbl/r3/OrderMapping</SAP:P1>
  <SAP:P2>http://xi/SRM/ReceivePurchaseOrders</SAP:P2>
  <SAP:P3>22150771-0ee7-11dc-c87a-fe330a306909</SAP:P3>
  <SAP:P4>-1</SAP:P4>
  <SAP:AdditionalText />
  <SAP:ApplicationFaultMessage namespace="" />
  <SAP:Stack>Incompatible class versions (linkage error)</SAP:Stack>
  <SAP:Retry>M</SAP:Retry>
  </SAP:Error>
Please help.
Thanks in advance.
Beena.
Edited by: Beena Thekdi on Jan 22, 2008 8:05 PM

Thanks Raj.
But this note says
>> The error is corrected with Support Package 5 for Support Package 03 for the XI TOOLS 3.0 software component.
and I am already on PI 7.0.
Please tell me still I need to apply this?
Thanks,
Beena.

Similar Messages

  • XI Mapping: Class versions are incompatible (linkage error)

    Hi,
    i have a simple File-to-File scenario, and I am getting the following error as observed in the XI Monitor:
    <SAP:Category>Application</SAP:Category>
    <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
    <SAP:Stack>Class versions are incompatible (linkage error)</SAP:Stack>
    To troubleshoot the mapping, I have removed all mappings, and put the target nodes to constant values. I am still getting the error in Mapping (linkage error).
    I am using XI3.0SP0 (J2EE SP07, ABAP SP3). Is this a known problem / OSS notes available ? thanks.
    Regards,
    Manish Agarwal.

    Hallo Agarwal,
    have a look in OSS Message #755302
    Regards Franz Forsthofer

  • Linkage error occurred when loading class MyClass

    Hi
    I have written one simple class name MyClass and i have created jar file and i imported into import archive... but in interface mapping while i am testing i am getting the <b>"<b>Linkage error occurred when loading class MyClass"</b></b> error.... why i am getting this error
    Thanks & Regards
    Ravi Shankar B

    Here it goes:
    Symptom
    The LINKAGE_ERROR error occurs during the mapping.
    The trace contains "java.lang.NoClassDefFoundError: Illegal name":
    Other terms
    XI 30, Mapping, Linkage Error
    Reason and Prerequisites
    As of the jdk 1.4.2_05 from Sun, this program error occurs during the mapping in the runtime or during testing in the Repository. This error may also occur in conjunction with jdks of other vendors or other versions.
    Solution
    The error is corrected with Support Package 5 for Support Package 03 for the XI TOOLS 3.0 software component.
    Import the corresponding archive SAPXITOOL03P_5.SCA for SAP Exchange Infrastructure XI 3.0 as described in the Netweaver 04 Support Package Stac Guide.
    You will find the archive and the guide in the SAP Service Marketplace under the alias "SP stacks -> SAP NetWeaver -> SAP NetWeaver 04".
    Regards
    Vijaya

  • Special Character being replaced by Question Marks in Java Mapping

    Hi All,
    I need some help on Java Mapping related to special characters.
    The problem is that i'm using a Java Mapping to add some information to the XML inside the Interface Mapping. This works fine on our development environment but, in our production environment, it replaces the special character with question marks (eg.: á --> ??).
    I'm suspecting of some configuration on the Java Virtual Machine that sets the encoding, but i don't have access to it. Does anyone have any clues about this problem?
    Thanks a lot,
    Leonardo

    Hi Leonardo
    Have a look at this forum thread, this might help you to solve your problem.
    Java Map Causing error because of ampersand &

  • Linkage error while doing java mapping

    Hi,
    I Have written a java mapping but when i use it in xi.It is showing an error as linkage error
    LinkageError at JavaMapping.load(): Could not load class: com/satyam/nestle/JavaMap
    Can anyone explain what does this mean and how to overcome it.
    Thanks in advance,
    Bhargav

    Did you try testing the java mapping seperately....that it does not have any errors??? Also check the cahce update. Sometimes it happens that XI is not able to load the class file from the cache. Perform a CPA cache refresh (delta). This should solve the problem
    Reward if helpful.

  • How to avoid Linkage Error in JAVA Mapping

    Dear Experts,
    I am trying to test the JAVA mapping compiled in NWDS but receiving the error
    "LinkageError at JavaMapping.load(): Could not load class".
    java.lang.NoClassDefFoundError: JSONXMLProject/bin/com/sap/json/ConvJson2Xml (wrong name: com/sap/json/ConvJson2Xml)
    at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:735)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:716) at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at com.sap.aii.ib.server.mapping.execution.MappingLoader.findClass(MappingLoader.java:195)
    Following are the details:
    SAP PO 7.4
    SP Stack Number 05
    JDK Version jdk16
    NWDS
    SAP Enhancement Package 1 for SAP NetWeaver Developer Studio 7.3 SP10 PAT0000
    1.Created the Project , Package and then class (Included the logic)
    2. Included 1 JSON Jar file into my project and the Added to build path.
    3.Exported the project as Archive File and saved in desktop
    4.Imported into SAP PO system as Imported Archive
    5.Could not observe the JSON jar file which i used as referenced JAR in NWDS
    6.Tested in OM after referencing the JAVA class and found the above error.
    I have JDK 5, 6 and 7 present in my local desktop and I am trying to export the compiled code using both JAVA SE 1.6 and 1.5 in NWDS seperatly after going several discussions.
    Can any one hep me with the screenshots and tell me how to include all the reference jar files in exported project..
    Regards..

    Dear Anand,
    I did exactly as you shared. As the JSON jar has number of classes, then in OM all the Classes had to be assigned. Then the linkage error went.
    But in execution , it shows a new error that all the classes of the JSON jar has to be implemented with interface StremTransformation or AbstractTransformation.
    I assume in the Operation Mapping I will use only 1 class as JAVA Class. Anyway I am attaching the document with navigation.
    Do we have any other alternative??
    Please rename the extension of the document by remove .txt
    Regards

  • LINKAGE ERROR in Java Mapping

    Hi Friends,
    I am getting LINKAGE ERROR when executing JAVA mapping as its not able to reference AbstractTransform class provided by SAP PI API.
    This problem occurs in particular environment for this particular mapping. For other environments this is working fine.
    I assume it has something to do with Java Library reference which is mis-configured during transport. Can anyone let me know how and where the library path is configured for Imported Achieves in SAP PI 7.1.
    We are using java 1.5 for building and creating java achieves.
    Many thanks,
    SK

    Hi Sumant,
      This error occurs when the jdk version of XI server and the library version you used to develop the mapping are incompatible. Make sure you use the same version as of the server
    have a look in SAP Note 755302
    Regds,
    Pinangshuk.

  • Java Mapping - Class versions are incompatible (linkage error)

    Hi Friends,
        While testing java mapping in Integration Repository i am getting an error - "Class versions are incompatible (linkage error)". Can anyone plz tell what might be the reason.
    Regards,
    Gowtham Kuchipudi.

    hello
    I have this message but my trace look like this:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <Trace level="1" type="B" name="interface activity determination">
      <Trace level="1" type="T">Version 000</Trace>
      <Trace level="1" type="T">Message status 000</Trace>
      <Trace level="1" type="T">Interface action INIT</Trace>
      <Trace level="1" type="T">(must be INIT for a new determination)</Trace>
      <Trace level="1" type="T">Message type BEST EFFORT. -> No determination</Trace>
      <Trace level="1" type="T">Set interface action INIT into *MAST*</Trace>
      </Trace>
      <Trace level="1" type="E">CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST</Trace>
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV">
      <Trace level="1" type="T">number of receivers: 1</Trace>
      <Trace level="1" type="T">Single-receiver split case</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="B" name="PLSRV_MAPPING_REQUEST" />
    - <!--  ************************************
      -->
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Interface Mapping http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService ProposalDeatailsService_WS2RFC_IM</Trace>
      <Trace level="1" type="T">LinkageError at JavaMapping.load(): Could not load class: xmlpayload</Trace>
      <Trace level="1" type="T">java.lang.UnsupportedClassVersionError: xmlpayload (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy158.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:107) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:157) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</Trace>
      <Trace level="1" type="T">Linkage error occurred when loading class xmlpayload (http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService, d7e31f30-53be-11dc-8fbd-ee09c0a8664d, -1)</Trace>
      <Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Linkage error occurred when loading class xmlpayload (http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService, d7e31f30-53be-11dc-8fbd-ee09c0a8664d, -1) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:115) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy158.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:107) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:157) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: java.lang.UnsupportedClassVersionError: xmlpayload (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy158.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor428.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:107) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:157) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</Trace>
      <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      </SAP:Trace>
    the error that I recieve in the SXMB is:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
      <SAP:P1>xmlpayload</SAP:P1>
      <SAP:P2>http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsS~</SAP:P2>
      <SAP:P3>d7e31f30-53be-11dc-8fbd-ee09c0a8664d</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Class versions are incompatible (linkage error)</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    this is my XI information
    Runtime Environment
    Java version:1.4.2_12
    Java vendor:Sun Microsystems Inc.
    Version
    Service pack:21
    Release:30_VAL_REL
    Latest change:409678
    Sync time:200709211024
    since I already have the SP required by the note, any other suggestions?
    Thanks
    Kfir

  • Linkage error occured when loading the class:Java Mapping

    I AM GETTING THE ABOVE ERROR IN SUB WHEN TESTING THE MAPPING .
    Source:
    <MTO_FTP_MAT_DETAILS>
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    TARGET
    MTI_FTP_MAT_DETAILS
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import com.sap.aii.mapping.api.StreamTransformation;
    class Echo {
         public static OutputStream out;
    public class myEcho extends DefaultHandler implements StreamTransformation {
         private Map map;
         public void setParameter(Map param) {
              map = param;
         public void execute(InputStream in, OutputStream out) {
              DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              try {
                   SAXParser saxParser = factory.newSAXParser();
                   Echo.out = out;
                   saxParser.parse(in, handler);
              } catch (Throwable t) {
                   t.printStackTrace();
         public void startDocument() throws SAXException {
              try {
                   Echo.out.write("<?xml version='1.0' encoding='UTF-8'?>".getBytes());
              } catch (IOException e) {
                   e.notify();
         public void endDocument() throws SAXException {
              try {
                   Echo.out.flush();
              } catch (IOException e) {
                   throw new SAXException("I/O error", e);
         public void startElement(String namespaceURI, String sName, // simple name
         String qName, // qualified name
         Attributes attrs) throws SAXException {
              String eName = sName; // element name
              if ("".equals(eName))
                   eName = qName; // not namespace-aware
              if ("ns0:MTO_SAP_MAT_DETAILS".equals(qName)) {
                   try {
                        Echo.out.write(("<MTI_FTP_MAT_DETAILS>").getBytes());
                   } catch (Exception e) {
                        e.printStackTrace();
              } else {
                   try {
                        Echo.out.write(("<" + qName + ">").getBytes());
                   } catch (Exception e) {
                        e.printStackTrace();
         public void endElement(String namespaceURI, String sName, // simple name
         String qName // qualified name
         ) throws SAXException {
              String eName = sName; // element name
              if ("".equals(eName))
                   eName = qName; // not namespace-aware
              if ("ns0:MTO_SAP_MAT_DETAILS".equals(qName)) {
                   try {
                        Echo.out.write(("</MTI_FTP_MAT_DETAILS>").getBytes());
                   } catch (Exception e) {
                        e.printStackTrace();
              } else {
                   try {
                        Echo.out.write(("</" + qName + ">").getBytes());
                   } catch (Exception e) {
                        e.printStackTrace();
         public void characters(char buf[], int offset, int len)
              throws SAXException {
              String s = new String(buf, offset, len);
              try {
                   Echo.out.write(s.getBytes());
              } catch (Exception e) {
                   e.printStackTrace();

    Hi,
    When you make the jar to import to XI you must verify the two classes are generated at the same time. Later you can verify in Inteface Mapping that you are using the myEcho class to do the java mapping.
    Plesae verify the java version are the same in you own machine and the xi machine.
    Regards.

  • JAVA mapping error

    Hi All,
    I am getting the below error while executing a JAVA mapping.
    <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
      <SAP:P1>XMLNSTagCreate1/XMLNSTagCreate1</SAP:P1>
      <SAP:P2>java.lang.NoClassDefFoundError: XMLNSTagCreate1/XM</SAP:P2>
      <SAP:P3>LNSTagCreate1 (wrong name: XMLNSTagCreate1)</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>Linkage error while loading class XMLNSTagCreate1/XMLNSTagCreate1; java.lang.NoClassDefFoundError: XMLNSTagCreate1/XMLNSTagCreate1 (wrong name: XMLNSTagCreate1)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I have tried compiling the code in the same JRE as the one in PI. Still it is not working.
    Please suggest.
    Regards,
    Yashwanth
    Edited by: YashwanthSVK on Aug 17, 2011 8:38 PM

    Hi all... thank you for the replies.. I have compiled the code in the same version of JRE as the PI version...
    Hi Vijay,
    I also felt the same but as I do not have much knowledge in JAVA, i could not track it further. 
    below is the code for the mapping... would you mind if I ask you to have a look at it and let me know where the error is..
    thank you so much ...
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactory;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import com.sap.aii.mapping.api.MappingTrace;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.FileWriter;
    This mapping creates xmlns attribute to send to Tradeplace
    public class XMLNSTagCreate1 extends DefaultHandler  implements StreamTransformation {
         private Map param;
         private MappingTrace trace;
         private OutputStream out;
         public void execute(InputStream in, OutputStream out)
              throws StreamTransformationException {
                   DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
                        try {
                             //trace.addWarning("Execute function starts here");
                             DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
                             try {
                                  org.w3c.dom.Document doc = docBuilder.parse(in);
                                  //Node TradeplaceMessage = doc.getFirstChild();
                                  Element trade=(Element) doc.getFirstChild();
                                  if(trade.hasAttribute("tag1"))
                                  NamedNodeMap TradeplaceMessageAttributes = trade.getAttributes();
                                  String xmlnsValue=trade.getAttribute("tag1");
                                  String modeValue=trade.getAttribute("productionMode");
                                      trace.addInfo("XMLNS  Value:"+xmlnsValue);
                                                                     trade.removeAttribute("tag1");
                                       trade.removeAttribute("productionMode");
                                       trade.setAttribute("xmlns",xmlnsValue);
                                       trade.setAttribute("productionMode",modeValue);
                                                      javax.xml.transform.Transformer transformer = TransformerFactory.newInstance().newTransformer();
                                                      transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                                                      StreamResult result = new StreamResult(new StringWriter());
                                                      DOMSource source = new DOMSource(doc);
                                                      transformer.transform(source, result);
                                                      String xmlString = result.getWriter().toString();
                                                      //System.out.println(xmlString);
                                                      out.write(xmlString.getBytes());
                             } catch (SAXException e1) {
                                  // TODO Auto-generated catch block
                                  e1.printStackTrace();
                             } catch (IOException e1) {
                                  // TODO Auto-generated catch block
                                  e1.printStackTrace();
                             } catch (TransformerConfigurationException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             } catch (TransformerFactoryConfigurationError e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                             } catch (TransformerException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                        } catch (ParserConfigurationException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
         public static void main2(String[] args) throws Exception {
              String xmlFile = "U:
    Untitled.xml";
              InputStream in = new BufferedInputStream(new FileInputStream(xmlFile));
              XMLNSTagCreate1 test = new XMLNSTagCreate1();
              //test.countOccurences(in);
         public static void main(String[] args) throws Exception {
              String xmlFile = "//NA.AD.WHIRLPOOL.COM//myApps//home//NA//qqjos1d//My Documents//TP2.xml";
              InputStream in = new BufferedInputStream(new FileInputStream(xmlFile));
              FileOutputStream out = new FileOutputStream("//NA.AD.WHIRLPOOL.COM//myApps//home//NA//qqjos1d//My Documents//DhanishTP2.xml");
              XMLNSTagCreate1 test = new XMLNSTagCreate1();
              test.execute(in, out);
              OutputStreamWriter out1 = new OutputStreamWriter(out,"UTF-8");
         /* (non-Javadoc)
    @see com.sap.aii.mapping.api.StreamTransformation#setParameter(java.util.Map)
         public void setParameter(Map param) {
              // TODO Auto-generated method stub

  • Error in Java Mapping program

    Hi friends,
    I am tryin java mapping for first time.. and created one java program using link https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wholePayloadtoaXML+field
    But when I am compiling it using JAVAC, I am getting following error message that
    package com.sap.aii.mapping.api does not exist . How can I solve this error.
    Complete error is as follows:
    C:j2sdk1.4.2_16-x64 in>javac PayloadToXMLField.java
    PayloadToXMLField.java:1: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.StreamTransformation;
                                   ^
    PayloadToXMLField.java:2: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.AbstractTrace;
                                   ^
    PayloadToXMLField.java:3: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.StreamTransformationConstants;
                                   ^
    PayloadToXMLField.java:8: cannot resolve symbol
    symbol  : class StreamTransformation
    location: class PayloadToXMLField
    public class PayloadToXMLField implements StreamTransformation {
                                              ^
    PayloadToXMLField.java:16: cannot resolve symbol
    symbol  : class AbstractTrace
    location: class PayloadToXMLField
        AbstractTrace trace;
        ^
    PayloadToXMLField.java:27: cannot resolve symbol
    symbol  : class AbstractTrace
    location: class PayloadToXMLField
                (AbstractTrace) param.get(
                 ^
    PayloadToXMLField.java:28: cannot resolve symbol
    symbol  : variable StreamTransformationConstants
    location: class PayloadToXMLField
                    StreamTransformationConstants.MAPPING_TRACE);
                    ^
    PayloadToXMLField.java:43: cannot resolve symbol
    symbol  : variable outputPayload
    location: class PayloadToXMLField
            outputPayload =
            ^
    PayloadToXMLField.java:50: cannot resolve symbol
    symbol  : variable outputPayload
    location: class PayloadToXMLField
                out.write(outputPayload.getBytes());
                          ^
    9 errors
    Thanks,
    Brijesh Soni

    thanks , it is done now..
    the program is compiled properly and class file is generated.
    but m gettin error in mapping.
    in IR i created two message type  with data type as string.
    and i had imported the class file and java program using Imported archives.
    now in interface mapping mapping program i had selected type as Java Class.and name of java program.
    but when i tested it, it is giving error as Linkage error occurred when loading class zip/PayloadToXMLField
    Please suggest, M i doing some thing wrong?is any thing missing?
    Program tht i had used in java
    from link (https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/wholePayloadtoaXML+field):
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField implements StreamTransformation {
        String strXML = new String();
        String outputPayload = new String();
         //Declare the XML tag for your XML message
         String StartXMLTag = "<Payload>";
         String EndXMLTag = "</Payload>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            outputPayload =
                "<?xml version="1.0" encoding="UTF-8"?>"
                   + StartXMLTag
                   + strXML
                   + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
                   trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;
    and detailed trace of error is:
    11:34:21 Start of test
    LinkageError at JavaMapping.load(): Could not load class: zip/PayloadToXMLField
    java.lang.NoClassDefFoundError: zip/PayloadToXMLField (wrong name: PayloadToXMLField) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.load(RepJavaMapping.java:136) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:50) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) 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:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    11:34:21 End of test

  • Error in Java Map...PLz help

    Hello,
    I have check the map and it is working fine on netbeans  IDE. But when try to use it in PI 7.0 the following error is coming :
    <Trace level="1" type="T">LinkageError at JavaMapping.load(): Could not load class: final map/XMLHeaderGenerator</Trace>
      <Trace level="1" type="T">java.lang.NoClassDefFoundError: final map.XMLHeaderGenerator (wrong name: XMLHeaderGenerator) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:254) at java.lang.ClassLoader.defineClass(ClassLoader.java:191) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at java.lang.ClassLoader.loadClass(ClassLoader.java:593) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor3858.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy208.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</Trace>
      <Trace level="1" type="T">Linkage error occurred when loading class final map/XMLHeaderGenerator (http://icc.XXXXXXXXXXXXXXXXX, 8fde2b90-c816-11dc-c9b8-ee57346358b4, -1)</Trace>
      <Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Linkage error occurred when loading class final map/XMLHeaderGenerator (http://icc.XXXXXXXXXXXX, 8fde2b90-c816-11dc-c9b8-ee57346358b4, -1) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:115) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor3858.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy208.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.NoClassDefFoundError: final map.XMLHeaderGenerator (wrong name: XMLHeaderGenerator) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:254) at java.lang.ClassLoader.defineClass(ClassLoader.java:191) at com.sap.aii.ibrun.server.mapping.MappingLoader.findClass(MappingLoader.java:158) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at java.lang.ClassLoader.loadClass(ClassLoader.java:593) at com.sap.aii.ibrun.server.mapping.JavaMapping.load(JavaMapping.java:95) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:45) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor3858.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy208.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</Trace>

    Hey I am using this lib
    import org.xml.sax.helpers.*;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import org.w3c.dom.Element;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    Do i need to import some of these or they are available in PI

  • Error while doing java mapping

    Hi,
    I have written a java mapping code .But i have a small doubt when i compile it it is showing errors that package com.sap.aii.mapping.api does not exist.How can i solve the problem.Please help me in this issue.
    Thanks,
    Bhargav

    Hi ,
    check this thread, it may help you.
    https://forums.sdn.sap.com/click.jspa?searchID=3558715&messageID=3229273
    Regards,
    Ramesh.

  • PI 7.11 - How to create a System Error in SXMB_MONI using a Java Mapping

    Hi
    We ve go a  Java Mapping in a File-to-HTTP Scenario. It works perfect except of one error case: if an empty source file or a source file with the wrong structure is delivered. In this case our Java Mapping forwards an empty payload to the HTTP channel. So, for PI is the mapping successful.
    I'd like to recognize this case and invoke a system error in the SXMB_MONI, so that this mapping will be stopped and our alerting concept informs the users. I know, how to recognize the case in Java but need to know how to create the System Error Status in the PI System.
    Thanks in advance
    Michael

    Hi Michael,
    Please refer here for the mapping API description:
    http://help.sap.com/javadocs/NW04S/SPS09/pi/com/sap/aii/mapping/api/package-summary.html
    You can use the StreamTransformationException exception describet there to raise an error from your Java mapping. Direct link:
    http://help.sap.com/javadocs/NW04S/SPS09/pi/com/sap/aii/mapping/api/StreamTransformationException.html
    You might also consider using the "Empty-File Handling" option in sender file CC to avoid processing empty files by PI.
    Hope this helps,
    Greg

  • Error in Java mapping

    Hi~
    I am trying to use import statement :
    import com.sap.aii.mapping.api.StreamTransformation; in the java mapping.
    But I am getting an error saying
    "StreamTransformation cannot be resolved to a type"
    I am working on the SAP Netweaver STudio SP01. Do I need to load any libraries for the SAP programs ?
    I am a newbie with Java. I dont get the direction to resolve this issue.
    Good Day~
    ~Peeru

    Hi,
    guess Raj is right.
    This could be helpful too:
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    Regards
    Patrick

Maybe you are looking for