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

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

  • Class versions are incompatible (linkage error)

    Hi All,
    I New to SAP XI and i've been working on java mapping, i Used RAD 6.0 for generation of class files, i imported the generated files into Integration builder.
    but when i execute the scenario i'm getting this error
    "Class versions are incompatible (linkage error)"
    in message monitoring with a red flag..
    can anyone explain me why i'm getting this error....
    Thanks & Regards,
    Sai Kumar Madduri

    Hi,
    Our PI Details:
    Runtime Environment
    Java version: 1.5.0_14
    Java vendor:Sun Microsystems Inc.
    Version
    Service  pack:09
    Release: 645_VAL_REL
    NWDS IDE: 1.5.0_14
    XI
    Software component details
    XI TOOLS 3.0
       Support Package 11 of SAP_XITOOL, 3.0 SP011 011
    XI TOOLS 7.0
       No Entry for Support Packages.
    Request to advise what is the best option for my JAVA Dom program to run
    regards
    shekar Chandra

  • Use java mapping class on PI 7.0

    Hi experts,
    I have a problem with a java mapping class on PI 7.0, maybe somebody could help me.
    I have a java mapping that call a webservice using AXIS library. If I run on my PC the java mapping is working. I load on Imported Archive the Java mapping class and AXIS librarys. My Java mapping class is compilated by jdk 1.4.2.09, like others java mappings that i have on PI 7.0 system, but when I execute the interface, its returns an error:
    Incompatible class versions (linkage error)
    This error is caused by AXIS Libraries, I use AXIS 1.4 version, and I think that this version is using jdk 1.5 because I read it on some foros. Could somebody confirm it? If it is true, could somebody tell me if there are some AXIS version that use jdk 1.4 or maybe How could I solved it? Thanks.
    Regards,
    Gemma

    Incompatible class versions (linkage error)
    this is usually 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

  • ODM and ODM schema versions are incompatible please use ODM api version ver

    Hi,
    I am with a problem, I am with the version of Oracle 10g 10.1.0.3 EE in Linux As 3 and I am not getting to rotate Oracle it Dates Mining, when I am going login in the program him of the the following mistake,
    ODM and ODM schema versions are incompatible please use ODM api version version 10.1.0.3
    excuses for bad English!
    tks,
    Welvis Douglas
    Msn : [email protected]

    Hi,
    When using Data Miner, the api that it uses to connect to the ODM database option must have the same version number as the db itself.
    See the following page:
    http://www.oracle.com/technology/products/bi/odm/odminer.html
    And scroll down to the section on the 10.1.X apis:
    "Data Miner requires that the version of odmapi.jar in the Data Miner lib directory be the same as the version of odmapi.jar installed with ODM. The version of odmapi.jar shipped with Data Miner is 10.1.0.2. Here are the additional patch versions of odmapi.jar for download:"
    There are links there to get the .jar files required for the version you are using (10.1.0.3).
    Thanks, Mark.

  • TNS:versions are incompatible

    we have oracle Version 10.2.0.3.0 on hp-ux.
    I can see the following alert in the listener log. can you please suggest what can be done to resolve this issue??
    Trace level is currently 0
    Started with pid=12844
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ss.pta.za.go2uti.com)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    21-APR-2009 06:48:47 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 06:49:19 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 06:57:31 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 06:58:13 * ping * 0
    21-APR-2009 07:06:56 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 07:07:05 * ping * 0
    21-APR-2009 07:07:12 * stop * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 09:31:36 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 13:01:04 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 13:01:15 * ping * 0
    21-APR-2009 13:01:28 * stop * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 13:47:41 * status * 12618
    TNS-12618: TNS:versions are incompatible
    21-APR-2009 14:56:44 * status * 12618
    TNS-12618: TNS:versions are incompatible
    07-MAY-2009 04:12:21 * status * 12618
    TNS-12618: TNS:versions are incompatible
    07-MAY-2009 07:42:12 * status * 12618
    TNS-12618: TNS:versions are incompatible
    07-MAY-2009 07:42:24 * status * 12618

    Hi..
    refer to Doc ID:      297781.1 on metalink.
    Anand

  • Is it possible to call XSLT from Java Mapping Class?

    Hi,
    does someone have experience with this? Or any ideas?
    And, if yes, how can be this XSLT called? Is it necessary to specify special path? Or it is the XSLT file placed in the same directory?
    Thanx in advance, Peter
    Message was edited by: Peter Jarsunek

    Hi SUdhir,
    Thanx 4 your answer. I have seen this link before, but there is only Java->Java or XSLT->Java calling.. I need Java->XSLT.. When I create Java mapping, I want to use stored XSLT stylesheet to convert the message. Because, my problem is,that my primary message contains characters which I want to be changed. For this reason I need java class - to replace the characters. And then I want to do transformation with the XSLT stylesheet. Can you post some example?
    Thanx, Peter

  • How to send response message from Java mapping class? Please help!

    Hi Experts,
      I have a sync scenario
              -Req-->  -
    >
    SOAP           XI       RFC
              <Res--     <-----
      The Req message contains:
      <Order>
           <Orderid>100</Orderid>
           <Desc>Extrenal Order</Desc>
           <Qty>2500</Qty>
      </Order>
      Response message is:
      <Log>
         <LogTxt>Qty value cannot be more than 3 chars</LogTxt>
      </Log>
      In the XI I have to validate the input request message using a schema. For this I am writing a java mapping program using aii_map_api.jar.
    My requirement is that If the input message schema validation fails then I want to send a response message back to sender.
      How can I send a response message back to the sender in java mapping program?
    Kindly help with sample code example.
    Thanks
    Gopal

    Hi,
    First, I think PI 7.1 has this functionality and perhaps it comes in a SP for PI 7.0 and XI 3.0.  So first have a look at that before creating custom development.
    Second, if you use the java mapping, you will only have access to a request or response message.  I would advise using a custom java module in the module processor and insert this message in the sender communication channel.  This will allow you to validate request and send a response.
    Regards,
    Yaghya

  • JAVAMAP-Sax Parser ...............Linkage error when loading the class.

    Dear all,
    Do we have any extra things to execute the Java mapping using the Sax Parser?
    When I am executing the interface mapping ,I am getting the" Linkage error when loading the class" error.
    Kindly let me know your personnel maildId so that I can mail you the screen shots.
    Thanks,
    Srinivasa

    Dear sunil,
    Find the File.
    Source:
    <MTO_FTP_MAT_DETAILS>
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    TARGET
    MTI_FTP_MAT_DETAILS
    <MATDETAILS>
    <MAKTX>
    <MATNR>
    <WERKS>
    <LABST>
    <MEINS>
    <PERCNT>
    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();

  • Getting Error in java mapping: Parsing empty source. Root element expected!

    Hi Experts,
       I am using java mapping for schema validation of input message. I have followed all the standard procedures and implemented the java class in the interface mapping.
    My interface mapping is like this:
    OrderData --->Java Class ---SchemaValidate
                         Mesg Map ---OrderData_to_BAP --->BAPI Msg
    So first I want to validate the schema of the input message. If the input message is invalid then XI should throw an exception. Then I use the actual message mapping to map the input order data to the BAPI input parameters.
    In the java code I am using xerces parser.
    The java code works fine when I run it as a standalone application.
    The interface mapping also works fine if I don't include the java mapping. Ofcourse schema validation does not happen.
    But when I test the interface mapping by including the java mapping then I am getting the error:
    Call method execute of the application Java mapping SchemaValidate
    Java mapping SchemaValidate completed. (execute() of SchemaValidate
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected!
    What am I doing wrong? Why it is not getting the root element?
    My Java code is as follows:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.helpers.*;
    import org.xml.sax.*;
    import org.apache.xerces.jaxp.*;
    Sample mapper for SAP-XI
    @author Gopal
    public class SchemaValidate implements StreamTransformation {
        //Constants when using XML Schema for SAX parsing.
         static final String JAXP_SCHEMA_LANGUAGE =
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         static final String W3C_XML_SCHEMA =
         "http://www.w3.org/2001/XMLSchema";
         static final String JAXP_SCHEMA_SOURCE =
         "http://java.sun.com/xml/jaxp/properties/schemaSource";
    Injection of mapping parameters
    from integration engine
    @param map Map with configuration data
        public void setParameter(Map map) {
    Mapping implementation
    @param inputStream Input data from integration engine
    @param outputStream Output data to integration engine
        public void execute(InputStream inputStream,
                            OutputStream outputStream)
          throws StreamTransformationException {
            try {
                  // obtain an object of class javax.xml.parsers.SAXParser,
                  SAXParserFactory spf = SAXParserFactoryImpl.newInstance();
                  spf.setNamespaceAware(true);
                  spf.setValidating(true);
                  SAXParser sp = spf.newSAXParser();
                  // setup the schema file
                  sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                  sp.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                  //parse the input xml using the given schema
                  sp.parse(inputStream, new ParseErrorHandler());
            catch(SAXException se) {
              se.printStackTrace();
            catch ( Exception e ) {
              throw new StreamTransformationException( e.getMessage() );
    My input message is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OrderCreate_request xmlns:ns0="mynamespace">
       <ORDER>HTEST1234567</ORDER>
       <ORDER_TYPE>z001</ORDER_TYPE>
       <ORDER_NAME>Test Order</ORDER_NAME>
       <CO_AREA>INTC</CO_AREA>
       <CCTR_POSTED>1234567890888888888</CCTR_POSTED>
       <CURRENCY>USD</CURRENCY>
       <PERSON_RESP>12345679</PERSON_RESP>
    </ns0:OrderCreate_request>
    Kindly help! please this is urgent!!!!!!
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Feb 28, 2008 9:34 AM

    Hi Stefan,
       I did the code changes to return output stream and the java code works perfectly in standalone mode in my PC.
       But when I use the same in the Java mapping with XI then It throws an error "Getting Error in java mapping: Parsing empty source. Root element expected!".
    My XI J2EE server has JDK1.4.3.11.
    Is there any limitation of using SAX parser in XI? If Yes, then which parser should be used for schema validation in XI?
    I have included the XSD file for schema validation along with class files in the .jar file. This jar file is then imported in XI repository. Is the XI engine not able to read the XSD file?
    Do I have to handle reading XSD file differently? Any suggession how?
    Is this parser error due to some security access?
    Kindly help me! I have been struggling with this problem since 2 weeks. I will be greatfull to you if you can help me.
    Thanks
    Gopal

  • Errors in Map class

    Hello Everyone.
    Well I working on a program that uses Map class and I have some errors.
    They are listed as.
    on line 110
    Type safety: The method put(Object, Object) belongs to the raw type HashMap. References to
    generic type HashMap<K,V> should be parameterized
    line 115
    pe safety: The expression of type Collection needs unchecked conversion to conform to
    Collection<ComputerInvent>
    line 123
    Type mismatch: cannot convert from Object to Computer_listing
    Here is my code is far
    import java.io.*;
    import java.util.*;
    class Computer_listing {
         private String id;
         private String name;
         private Integer harddrive;
         private Integer memory;
         private float speed;
         public Computer_listing(String idx) {
              id = idx;
         }// close the computer_listing loop
          * Constructors.
         public Computer_listing(String cd, String cn, Integer hd, Integer me,
                   float sp) {
              id = cd;
              name = cn;
              harddrive = hd;
              memory = me;
              speed = sp;
         }// close public EmployeeClass
          * accessors make info available
         public String getId() {
              return id;
         public String getName() {
              return name;
         public Integer getHardrive() {
              return harddrive;
         public Integer getMemory() {
              return memory;
         public float getSpeed() {
              return speed;
          * Mutator Methods
         public void setId(String cd) {
              id = cd;
         public void setName(String cn) {
              name = cn;
         public void setHarddrive(Integer hd) {
              harddrive = hd;
         public void setMemory(Integer me) {
              memory = me;
         public void setSpeed(float sp) {
              speed = sp;
    }// close class
    public class ComputerInvent {
         public static void main(String[] args) {
              HashMap hs = new HashMap();
              Scanner kbd = new Scanner(System.in);
              kbd.useDelimiter("\n");
              while (true) {
                   String msg = null;
                   Computer_listing compdb = null;
                   System.out.println("Enter ComputerID - Stop to end");
                   msg = kbd.next();
                   if (msg.equalsIgnoreCase("STOP")) {
                        break;
                   } else {
                        compdb = new Computer_listing(msg);
                   System.out.println("Enter Computer Name");
                   compdb.setId(kbd.next());
                   System.out.println("Enter HardDrive");
                   compdb.setHarddrive(kbd.nextInt());
                   System.out.println("Enter Memory");
                   compdb.setMemory(kbd.nextInt());
                   System.out.println("Enter Speed");
                   compdb.setSpeed(kbd.nextFloat());
                   // add to data structure
                   hs.put(msg, hs); //line 110
              }// close while loop
              System.out.println("Done");
              int i = 1;
              Collection<ComputerInvent> values = hs.values();//line115
              for (ComputerInvent temp : values) {
                   System.out.println("Items are " + i + "" + temp.getClass());
                   i++;
              }// close for loop
              System.out.println("Enter ID to find");
              String findit = kbd.next();
              Computer_listing x = null;
              if ((x = hs.get(findit)) != null) { //line 123
                   System.out.println("Found it");
                   System.out.println("Name is " + x.getClass());
              } else {
                   System.out.println("Did not find it");
              }// close else
         }// close public static void
    }// close public class ComputerInventCan someone please help me in solving this.
    thanks
    sandyR

    The code should have thrown hundreds of errors i wonder how u managed with few
    import java.io.*;
    import java.util.*;
    class Computer_listing {
         private String id;
         private String name;
         private Integer harddrive;
         private Integer memory;
         private float speed;
         public Computer_listing(String idx) {
                  this.id = idx;
         public Computer_listing(String cd, String cn, Integer hd, Integer me,
                   float sp) {
              this.id = cd;
              this.name = cn;
              this.harddrive = hd;
              this.memory = me;
              this.speed = sp;
         public String getId() {
              return this.id;
         public String getName() {
              return this.name;
         public Integer getHardrive() {
              return this.harddrive;
         public Integer getMemory() {
              return this.memory;
         public float getSpeed() {
              return this.speed;
         public void setId(String cd) {
              this.id = cd;
         public void setName(String cn) {
                 this.name = cn;
         public void setHarddrive(Integer hd) {
              this.harddrive = hd;
         public void setMemory(Integer me) {
              this.memory = me;
         public void setSpeed(float sp) {
              this.speed = sp;
    public class ComputerInvent{
      public static void main(String s[]){
             HashMap<String,Computer_listing> hs = new HashMap<String,Computer_listing>();
             Scanner kbd = new Scanner(System.in);
             kbd.useDelimiter("\n");
               while(true){ 
                   String msg = null;
                   Computer_listing compdb = null;
                    System.out.println("Enter <ComputerID> - Type <Stop> to end");
                    msg = kbd.next();
                    if (msg.equalsIgnoreCase("STOP"))
                break;
                     else
                compdb = new Computer_listing(msg);
                    System.out.println("Enter Computer Name:");
              compdb.setId(kbd.next());
              System.out.println("Enter HardDrive:");
              compdb.setHarddrive(kbd.nextInt());
              System.out.println("Enter Memory:");
              compdb.setMemory(kbd.nextInt());
              System.out.println("Enter Clock Speed:");
              compdb.setSpeed(kbd.nextFloat());                
                    hs.put(msg,compdb);
              System.out.println("<Done>");
              Collection<Computer_listing> values = hs.values();
              int i = 0;
              for (Computer_listing temp : values) {
                   System.out.println("Name["+ i + "]:" + temp.getName());
                   i++;
              System.out.println("Enter ID to find");
           String findit = kbd.next();
              Computer_listing x = null;
                 if ((x = hs.get(findit)) != null) {
                   System.out.println("Found it");
                   System.out.println("Name is " + x.getName());
              } else {
                   System.out.println("Did not find it");
    }Hope that works :)
    Anyways i'd advice you learn basics of using java.util Classes first and then go about using generics if you are a starter.
    REGARDS,
    RaHuL

  • Getting Java mapping errors when testing my Interface mapping

    Hi,
    I'm trying to test my interface mapping from IR, I keep getting these exceptions. All I'm doing in my interface mapping is I have two mapping programs a XSLT mapping with java helper functions with the XSL and a message mapping. In the test it pass thru the XSLT mapping but fails at Message mapping and throws the following exception. Any help on this is really appreciated.
    10:03:26 Start of test
    Call XSLT processor with stylsheet com/earthlink/xi/mapping/xmlc_to_crm_resp.xsl.
    START APPLICATION TRACE ***
    Response:
    0
    END APPLICATION TRACE ***
    Returned form XSLT processor.
    Call method execute of the application Java mapping com.sap.xi.tf._MM_XMLC_RESP_
    Error during appliction Java mapping com/sap/xi/tf/_MM_XMLC_RESP_
    java.lang.NullPointerException at com.sap.aii.mappingtool.tf3.AMappingProgram.exceptionCaught$(AMappingProgram.java:59) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:182) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:149) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:73) at com.sap.aii.ibrep.server.mapping.ibrun.RepSequenceMapping.execute(RepSequenceMapping.java:54) 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.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) 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)
    10:03:26 End of test

    Joe,
    most likely your XSLT is outputting a not well-formed XML message.
    Remove message mapping from the mapping list and execute it again, to check output.
    Also, for mapping debugging in java enhanced function inside XSLT mappings, use the following:
    1st, you need to pass the "inputparam" parameter from the XSLT runtime to the Java function (it needs to be one of the input parameters for the executed java function).
    In the Java code itself, implement the following code:
    AbstractTrace trace = (AbstractTrace) param.get(StreamTransformationConstants.MAPPING_TRACE);
    trace.addInfo("Log your message here!");
    where <i>param</i> is the input parameter refering to the <i>inputparam</i> from XSLT.
    The AbstractTrace and StreamTransformationConstants classes can be found in the aii_map_api.jar file (used in Java mappings).
    Regards,
    Henrique.

  • Should we avoid Graphical mapping and stick with Java mapping?

    After developing mappings in XI for a month, I just don't see any good reasons to use Graphical mappings over Java mappings. Maybe some experienced users here can give me some valid reasons why we should choose Graphical mappings. Here is what I think:
    Disadvantages of Graphical mappings:
    1. No way to perform automated unit testings. This is probably the biggest reason I hate it. You can do some tests manually when you work in Integration Builder. But there is no way you can write some unit testing utilities to automate the task.
    2. Complexity. Even for some simple requirements, your Graphical mappings can become complicated and hard to understand. A lot of times, I find myself staring at several dozens of graphical nodes and try to understand what it does.
    3. Impossible to reuse. This is totally against the DRY (Don't repeat yourself) principle. For example, to generate messages for JDBC adapter, it is common to have two identical fields for primary keys: one in the access node and another in the key node. If you change the mapping logic in one, you have to remember to change the other.
    Advantage with Java mappings:
    1. Fully automated unit testing. You can create JUnit tests along with your Java mapping classes and use Maven or other build tools to perform automated unit testing.
    2. Your choice of XML parsing and binding. With Java mapping, you can choose any open source framework for XML parsing and binding. For example, with XMLBeans, I can convert XML input message to a Java object, transform to another Java object and write to output message. And each Java object is generated from its corresponding XML schema.
    3. Highly reusable. We can use fundamental object-oriented designs to create highly reusable mapping components.
    4. Better version control. Since the mappings are just Java classes, we can use CVS or SVN to track code changes.
    5. Better build tools. We can fully utilize build tools like Ant and Maven to automate the build, unit tests, or even generate documents and mapping web sites.
    So do you guys agree? Maybe I am still new to XI or I am missing some important things. But at this point, I just don't see why I should use Graphical mappings. Is there anyone developing XI interfaces completely with Java mappings?
    Thanks in advance for any comments!
    Kenny Cheang

    Hi Suraj,
    > Since its graphical the blocks will take space, but
    > there is always an adavntage of processing time.
    > Ebven though it may appear bigger, it will take less
    > time as compared with Java code (for the same
    > mapping).
    Could you explain more why the graphical mapping has better performance? I thought the graphical mapping is compiled into a Java class in the runtime anyway.
    > Yes thats there, but same goes with Java mapping too
    > right (if you haven't mentioned it as constants)
    I mainly think about inheritance. If I have to build 10 interfaces and they all have some common behavior, I can create a base interface class to encapsulate the common logic. But with graphical mapping, you have to duplicate them in each interface.
    > Disadvantages of Java mapping:
    > 1. Performance
    Same as above. I just don't see why Java has worse performance. I actually think Java should have better performance. You can optimize the code anyway you want. In some cases, you have to use queue functions in graphical mapping but it's not necessary in Java.
    > 2. All might not be well versed with Java Code(though
    > everyone may know basic java) .
    I am not asking everyone to abandon graphical mapping. I am just wondering which one is better when you have skills for both.
    > 3. Lot of standard functions are available in GM
    > which you can choose, but you have to remember the
    > exact code for those in Java mapping.
    You can create functions in Java too. All you have to do is to remember the function name.
    Kenny

  • Java Mapping of Adapter-Specific Message Attributes

    Hi!
    I've got a problem with the help.sap.com-example for the above mentioned task:
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    String valueOld = conf.get(key);
    if (valueOld != null) {
        String valueNew = valueOld.replaceAll(“input”,”output”);
        conf.put(key, valueNew);
    The Container-class I  have doesn't offer the method getTransformationParameters(). Additionally, the method get() from class DynamicConfiguration doesn't accept a DynamicConfigurationKey-object. Finally: how do I instantiate the Container-object (I think it's stored in the Parameter-Map, but what's its name?).
    Thanks!
    BR
    Christian

    Hi Christian,
    Pls see these sap help links on the Java mapping.
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
    As you would see in the example shown in the link...you donot require a container object in case of java mapping(that is required when you are using the user defined functions)...
    here you can call the get() method from the map in the java mapping class....this map is set by the mapping runtime by calling the setParameter() method in your java mapping class.
    Thanks,
    Renjith

  • Java mapping for Remove and Add of  DOCTYPE Tag

    HI All,
    i have one issue while the Java mapping for Remove and Add of  DOCTYPE Tag   in Operation Mapping .
    it says that , while am testing in Configuration Test "  Problem while determining receivers using interface mapping: Error while determining root tag of XML"
    Receiver Determination...
    error in SXMB MOni
    " SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
      <SAP:P1>Problem while determining receivers using interface mapping: Error while determining root tag of XML: '<!--' or '<![CDATA[' expected</SAP:P1>
    plz provide solutions
    Thanks in advance.

    Hi Mahesh,
    I understand, you are using extended Receiver Determination using Operational Mapping (which has Java Mapping). And, there is an error message u201CError while determining root tag of XMLu201D, when you are doing configuration test.
    Can you please test, the Operational Mapping (which has Java Mapping) separately in ESR, with payload which is coming now. It should produce a XML something like this [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce53aea0d7154ee10000000a421937/frameset.htm]
    <Receivers>
    <Receiver>
      <Party agency="016" scheme="DUNS">123456789</Party>
      <Service>MyService</Service>
    </Receiver>
    <Receiver>
      <Party agency="http://sap.com/xi/XI" scheme="XIParty"></Party>
      <Service>ABC_200</Service>
    </Receiver>
    </Receivers>
    If it is not (I Think it will not), then there is some problem in Java Mapping coding. Please correct it. Last option, if your Java code is small in length; you may paste it here, so that we can have a look at the cause of issue.
    Regards,
    Raghu_Vamsee

Maybe you are looking for

  • Mac vs PC ads, and the song that is in them.

    Hello everyone, Can someone, anyone, tell me what the little jingle is on the "hi, I'm a mac" ads (also called mac vs PC) and where I can find it. I really would like to try and make my own tit vs tat ads, but just cannot find this song anywhere!

  • Error in parked invoice document - Error in routine MRM-DRSEG_CR_CREATE

    Hi... I have parked a invoice document against a Service entry sheet. The invoice document has been parked but when going to MIR4 in change mode system is throwing an error message pop as Error in routine MRM-DRSEG_CR_CREATE. The SES which has been c

  • How can I add Internet browser back/forward buttons to the main toolbar?

    The developper of the software I'm testing manages to open web-pages in a window within our software. We find this a great feature, although it has one downside: no back/forward buttons the users have gotten used to thru standard Internet browsers. I

  • ABAP Screen: Implicit transferring fields / LOOP AT TC

    Hello experts, I developed a table control in the following way: process before output.   module status_0110.   loop with control tc_liqivp_items.     module item_get.     module screen_modify.   endloop. process after input.   loop with control tc_l

  • NativeWindow for each Monitor (Multiple Monitors playing same content)

    Requirement Display same media (movie/images) content (only once instance) in all attached Monitors Problem I am creating two NativeWindow class instances for each monitor (2 monitors available). After I have added the movie content to each NativeWin