Linkage in java?

In one module i got code for finding IP address and Encryption process and a code for Jbutton. I need to know "how we can integrate these three code and run such that if i click that button the code for IP address should run to get the IP address of the machine without decryption process of the file"

Put the base location of the compiled code/jars in the class path. I don't see anything in your requirements which suggest you would setup your program any differently to any other Java program.
If you are new to java, the "New to Java" forum is a good place to get more detailed help on the basics of using Java.

Similar Messages

  • FlexPMD maven plugin no longer useable with Maven due to imcompatible binaries?

    I am using Maven 2.2.1 with FlexPMD 1.2 and Flexmojos 3.7.1, with the maven-site-plugin 3.0
    I get the following error:
    [INFO] [site:site {execution: default-site}]
    [FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage
    error (java.lang.AbstractMethodError) and may be out-of-date. Check the realms:
    [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven
    -site-plugin:3.0]
    urls[0] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/plugins/mav
    en-site-plugin/3.0/maven-site-plugin-3.0.jar
    urls[1] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/reporting/m
    aven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
    urls[2] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-u
    tils/1.5.10/plexus-utils-1.5.10.jar
    urls[3] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/maven-setti
    ngs-builder/3.0/maven-settings-builder-3.0.jar
    urls[4] = file:/C:/dreammachine/cache/m2/repository/org/apache/velocity/velocity
    /1.5/velocity-1.5.jar
    urls[5] = file:/C:/dreammachine/cache/m2/repository/commons-collections/commons-
    collections/3.2.1/commons-collections-3.2.1.jar
    urls[6] = file:/C:/dreammachine/cache/m2/repository/commons-lang/commons-lang/2.
    5/commons-lang-2.5.jar
    urls[7] = file:/C:/dreammachine/cache/m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
    urls[8] = file:/C:/dreammachine/cache/m2/repository/velocity/velocity/1.5/veloci
    ty-1.5.jar
    urls[9] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxia
    -core/1.2/doxia-core-1.2.jar
    urls[10] = file:/C:/dreammachine/cache/m2/repository/xerces/xercesImpl/2.9.1/xer
    cesImpl-2.9.1.jar
    urls[11] = file:/C:/dreammachine/cache/m2/repository/xml-apis/xml-apis/1.3.04/xm
    l-apis-1.3.04.jar
    urls[12] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomponents/h
    ttpclient/4.0.2/httpclient-4.0.2.jar
    urls[13] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomponents/h
    ttpcore/4.0.1/httpcore-4.0.1.jar
    urls[14] = file:/C:/dreammachine/cache/m2/repository/commons-codec/commons-codec
    /1.3/commons-codec-1.3.jar
    urls[15] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-xhtml/1.2/doxia-module-xhtml-1.2.jar
    urls[16] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-apt/1.2/doxia-module-apt-1.2.jar
    urls[17] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-xdoc/1.2/doxia-module-xdoc-1.2.jar
    urls[18] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-fml/1.2/doxia-module-fml-1.2.jar
    urls[19] = file:/C:/dreammachine/cache/m2/repository/javax/servlet/servlet-api/2
    .5/servlet-api-2.5.jar
    urls[20] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-decoration-model/1.2/doxia-decoration-model-1.2.jar
    urls[21] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-site-renderer/1.2/doxia-site-renderer-1.2.jar
    urls[22] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
    urls[23] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    velocity/1.1.8/plexus-velocity-1.1.8.jar
    urls[24] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/shared/mav
    en-doxia-tools/1.4/maven-doxia-tools-1.4.jar
    urls[25] = file:/C:/dreammachine/cache/m2/repository/commons-io/commons-io/1.4/c
    ommons-io-1.4.jar
    urls[26] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    archiver/1.0/plexus-archiver-1.0.jar
    urls[27] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    io/1.0/plexus-io-1.0.jar
    urls[28] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/jetty/6.1
    .25/jetty-6.1.25.jar
    urls[29] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/jetty-uti
    l/6.1.25/jetty-util-6.1.25.jar
    urls[30] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/servlet-a
    pi/2.5-20081211/servlet-api-2.5-20081211.jar
    [FATAL ERROR] Container realm = plexus.core
    urls[0] = file:/C:/dreammachine/tools/m2/lib/maven-2.2.1-uber.jar
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] null
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    java.lang.AbstractMethodError
            at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(Ab
    stractSiteRenderingMojo.java:246)
            at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
    nManager.java:490)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
    ultLifecycleExecutor.java:694)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
    fecycle(DefaultLifecycleExecutor.java:556)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
    ltLifecycleExecutor.java:535)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
    dleFailures(DefaultLifecycleExecutor.java:387)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
    ts(DefaultLifecycleExecutor.java:348)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
    If I revert to maven-site-plugin 2.1 this issue disappears, but I then get the error reported here:
    https://issues.sonatype.org/browse/FLEXMOJOS-310?page=com.atlassian.jira.plugin.system.iss uetabpanels:comment-tabpanel#issue-tabs
    If I migrate to maven 3.0.3 with maven-site-plugin 3.0 I get the following error:
    [INFO] configuring report plugin com.adobe.ac:flex-pmd-maven-plugin:1.2
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1:31.730s
    [INFO] Finished at: Tue Sep 27 17:21:49 BST 2011
    [INFO] Final Memory: 21M/243M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:si
    te (default-site) on project cafe-parsley: Execution default-site of goal org.ap
    ache.maven.plugins:maven-site-plugin:3.0:site failed: An API incompatibility was
    encountered while executing org.apache.maven.plugins:maven-site-plugin:3.0:site
    : java.lang.AbstractMethodError: null
    [ERROR] -----------------------------------------------------
    [ERROR] realm =    plugin>org.apache.maven.plugins:maven-site-plugin:3.0
    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    [ERROR] urls[0] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/plu
    gins/maven-site-plugin/3.0/maven-site-plugin-3.0.jar
    [ERROR] urls[1] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/rep
    orting/maven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
    [ERROR] urls[2] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/rep
    orting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
    [ERROR] urls[3] = file:/C:/dreammachine/cache/m2/repository/org/apache/velocity/
    velocity/1.5/velocity-1.5.jar
    [ERROR] urls[4] = file:/C:/dreammachine/cache/m2/repository/oro/oro/2.0.8/oro-2.
    0.8.jar
    [ERROR] urls[5] = file:/C:/dreammachine/cache/m2/repository/velocity/velocity/1.
    5/velocity-1.5.jar
    [ERROR] urls[6] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/aether/
    aether-util/1.7/aether-util-1.7.jar
    [ERROR] urls[7] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/sisu/si
    su-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
    [ERROR] urls[8] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/sisu/si
    su-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
    [ERROR] urls[9] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/
    plexus-interpolation/1.14/plexus-interpolation-1.14.jar
    [ERROR] urls[10] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
    [ERROR] urls[11] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/plexus
    /plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
    [ERROR] urls[12] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/plexus
    /plexus-cipher/1.4/plexus-cipher-1.4.jar
    [ERROR] urls[13] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-sink-api/1.2/doxia-sink-api-1.2.jar
    [ERROR] urls[14] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-logging-api/1.2/doxia-logging-api-1.2.jar
    [ERROR] urls[15] = file:/C:/dreammachine/cache/m2/repository/junit/junit/3.8.1/j
    unit-3.8.1.jar
    [ERROR] urls[16] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-core/1.2/doxia-core-1.2.jar
    [ERROR] urls[17] = file:/C:/dreammachine/cache/m2/repository/xerces/xercesImpl/2
    .9.1/xercesImpl-2.9.1.jar
    [ERROR] urls[18] = file:/C:/dreammachine/cache/m2/repository/xml-apis/xml-apis/1
    .3.04/xml-apis-1.3.04.jar
    [ERROR] urls[19] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomp
    onents/httpclient/4.0.2/httpclient-4.0.2.jar
    [ERROR] urls[20] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomp
    onents/httpcore/4.0.1/httpcore-4.0.1.jar
    [ERROR] urls[21] = file:/C:/dreammachine/cache/m2/repository/commons-codec/commo
    ns-codec/1.3/commons-codec-1.3.jar
    [ERROR] urls[22] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-xhtml/1.2/doxia-module-xhtml-1.2.jar
    [ERROR] urls[23] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-apt/1.2/doxia-module-apt-1.2.jar
    [ERROR] urls[24] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-xdoc/1.2/doxia-module-xdoc-1.2.jar
    [ERROR] urls[25] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-fml/1.2/doxia-module-fml-1.2.jar
    [ERROR] urls[26] = file:/C:/dreammachine/cache/m2/repository/javax/servlet/servl
    et-api/2.5/servlet-api-2.5.jar
    [ERROR] urls[27] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-decoration-model/1.2/doxia-decoration-model-1.2.jar
    [ERROR] urls[28] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-site-renderer/1.2/doxia-site-renderer-1.2.jar
    [ERROR] urls[29] = file:/C:/dreammachine/cache/m2/repository/commons-collections
    /commons-collections/3.2.1/commons-collections-3.2.1.jar
    [ERROR] urls[30] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/sh
    ared/maven-doxia-tools/1.4/maven-doxia-tools-1.4.jar
    [ERROR] urls[31] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-archiver/1.0/plexus-archiver-1.0.jar
    [ERROR] urls[32] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-io/1.0/plexus-io-1.0.jar
    [ERROR] urls[33] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
    [ERROR] urls[34] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
    [ERROR] urls[35] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-utils/1.5.10/plexus-utils-1.5.10.jar
    [ERROR] urls[36] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/j
    etty/6.1.25/jetty-6.1.25.jar
    [ERROR] urls[37] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/s
    ervlet-api/2.5-20081211/servlet-api-2.5-20081211.jar
    [ERROR] urls[38] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/j
    etty-util/6.1.25/jetty-util-6.1.25.jar
    [ERROR] urls[39] = file:/C:/dreammachine/cache/m2/repository/commons-lang/common
    s-lang/2.5/commons-lang-2.5.jar
    [ERROR] urls[40] = file:/C:/dreammachine/cache/m2/repository/commons-io/commons-
    io/1.4/commons-io-1.4.jar
    [ERROR] Number of foreign imports: 1
    [ERROR] import: Entry[import  from realm ClassRealm[project>com.jpmorgan.ib.arch
    itecture.deia.app:cafe-parsley:1.0-SNAPSHOT, parent: ClassRealm[maven.api, paren
    t: null]]]
    [ERROR]
    [ERROR] -----------------------------------------------------
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
    Thus it seems FlexPMD can no longer be used with Maven due to some sort of binary incompatibility issue...
    Does anyone know how to resolve this issue?

    Hooray, I got to the bottom of issue.
    Basically the flex PMD maven plugin is broken at version 1.2 with more recent version of  maven-site-plugin.  This is because of a new abstract method introduced to the class AbstractMavenReport - canGenerateReport(); 
    This method isn't implemented in the FlexPmdMojo and FlexPmdReportMojo classes on the SVN trunk or in flexPMD 1.2 and was causing >mvn site to fail as outlined above. Add implementations of this method, returning true in both classes and the plugin works again!
    Note the method also needs to be added to the relevant Mojo and ReportMojo classes for the FlexMetrics and CPD maven plugins to get them working too.
    Flex PMD commiters - please release a new version of the project to resolve this showstopper!

  • Header/ source, linker

    Hello,
    The syllabus for a Java qualification I'm preparing says I should understand:
    "the concept of linkage between Java files"
    and
    "the difference between header and source files"
    in Java.
    Also, under the heading of exception handling, the syllabus states I should be able to
    "Define a functions� (sic) exception specifications in their header"
    Can anybody please point me in the direction of information about these concepts? Many thanks.
    Mick

    Are you sure it's not C++? Java has neither header files (I'd say Interfaces come pretty close) nor does it use the term "functions"...
    The rest sounds like standard exception handling/throwing. I think the tutorials on this site contain everything you need to know.

  • JDBC Savepoint Problem

    Hi,
    I am developing a database application for which I am using Oracle server and Java driver listed in the Oracle website �classes12.jar�.
    The following code
    Class.forName("oracle.jdbc.OracleDriver").newInstance();
    java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@" + host + ":" + port + ":" + dbName, user, password);
    connection.setAutoCommit(false);works well, but the moment I call
    connection.setSavepoint(); it is giving me the following error,
    Database driver class linkage failed.
    java.lang.AbstractMethodError: oracle.jdbc.driver.OracleConnection.setSavepoint()Ljava/sql/Savepoint;Please advise me to fix this problem?
    Anton.

    If that is the case could any one suggest me the
    Oracle JDBC Driver (URL to download) that supports
    Savepoint features?Google can.
    http://www.google.com/search?hl=en&q=oracle+jdbc+savepoint

  • 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

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

  • 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

  • Can I leverage JDom or Dom4J for java mapping in PI 7.0?

    Hi,
    since we know that PI 7.0 is based on jdk1.4 which officially allows DOM and SAX,but could I using the open source API like JDom or Dom4J via importing the related jar file to PI IR for java mapping?Anyone tried that?

    Hi ,
             I tried importing jar files into PI7.0 I was able to do so.
    First add the external jar file for JDOM into build path in eclipse (or NWDS). I did this in eclipse.
    Again I tried to import the same jar file into project within eclipse. Then the jar file will be broken into class files.
    Now compile the JDOM code you wrote and do project ->build all. This will generate the class file for your source code in addition to the class files formed earlier. Now exit from eclipe. Move to source folder of the eclipse. there you will find the .java file and the set of class files which were imported into the project earlier. Copy these files to separete folder say "myclass". Now again move to "bin" folder of your eclipse settings and obtain the .class file for the source code you have written. Copy this class file to the  "myclass" folder. Now using WINZIP zip all files into one ZIP file within "myclass" folder. Finally import this ZIP into PI 7.0 server. Run the mapping code using test tab. If you are getting any linkage error then you need to obtain correct external jar for JDOM parser else the mapping should run fine.
    Regards
    Anupam

  • Java Mapping PI 7.0 to 7.1

    Hi,
    The below mentioned code is for sending email with attachment using Java Mapping which was implemented in PI 7.0
    I know the API for PI 7.1 has changed, I changed the below code using extends AbstractTransformation using Transform instead of implements streamTransformation and few other changes but I get lot of issues.
    Could anyone point out what and all need to be changed in PI 7.1 for the below mentioned code. It would be greatly if anyone could let me know the changes
    package dynamicconfmail;
    import com.sap.aii.mapping.api.*;
    import java.io.BufferedReader;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Properties;
    import javax.mail.*;
    import javax.activation.*;
    import javax.mail.internet.*;
    import javax.mail.util.ByteArrayDataSource;
    public class DynamicConfMail implements StreamTransformation {
        private Map param;
    //// Start of Main Class
    //         public static void main(String[] args) throws Exception
    //     try
    //     FileInputStream fin = new FileInputStream("c:/test/sam.txt");
    //     FileOutputStream fout =     new FileOutputStream("H:/test/sam2_O.txt");
    //     DynamicConfMail mapping = new DynamicConfMail();
    //     mapping.execute(fin, fout);
    //     catch (Exception e)     
    //     //   e.printStackTrace();
    // //End of Main Class
        public DynamicConfMail() {
        public void setParameter(Map map) {
            param = map;
            if (param == null) {
                param = new HashMap();
        public void execute(InputStream inputstream, OutputStream outputstream)
            int IO_BUFFER_SIZE = 4 * 1024;
                String llkj = "1111";
                String llkj_f = "llkj.txt";
                String llkj_dir = "/usr/sap/llkj/in";
                String xyzv = "9999";
                String xyzv_f = "xyzv.txt";
                String xyzv_dir = "/usr/sap/xyzv/in";
               String default_dir = "/usr/sap/Error";
               String Flag = "";
               String FileName = "";
            try
    //           The following is for the FileName in the File Adapter
                DynamicConfiguration conf = (DynamicConfiguration) param.get("DynamicConfiguration");
                DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
                DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
                InputStream ins = inputstream;
                // Start Copy the InputStream to OutputStream
                byte[] b = new byte[IO_BUFFER_SIZE];
                int read;
                StringBuffer out = new StringBuffer();
                 try {
                        while ((read = inputstream.read(b)) != -1)
                            out.append(new String(b, 0, read));
                            String InputString =  out.toString();
                            String substr = InputString.substring(2, 18);
                            System.out.println(substr);
                            if (substr.equals(llkj))
                                     System.out.println("The given string is equals");
                                     conf.put(key, llkj_f);
                                     conf.put(key1, llkj_dir );
                                       FileName = llkj_f;
                            else if (substr.equals(xyzv))
                                     System.out.println("The given string is equals");
                                     conf.put(key, xyzv_f);
                                     conf.put(key1, xyzv_dir);
                                       FileName = xyzv_f;
                            else
                                    conf.put(key1, default_dir);
                                    Flag = "F";
                                    System.out.println("The given string is not equals");
                                     FileName = substr;
                            // Writes to outputstream
                            outputstream.write(b, 0, read);
                        if (Flag.equals(""))
                         //* Code to Send Email*/
                            String att = outputstream.toString();
                            email obj1 = new email();
                          obj1.send("mailhost", "emailID", "Success", "Success", "emailID",InputString, FileName);
                         //End of Email          Code/
                        else if (Flag.equals("F"))
                        //* Code to Send Email*/
                            String att = outputstream.toString();
                            email obj1 = new email();
                         obj1.send("mailhost", "emailID", "Failed", "Failed", "emailID",InputString, FileName);
                        //End of Email          Code/
                catch (IOException ex)
                    ex.printStackTrace();
               // End of Copy the InputStream to OutputStream
            catch (Throwable throwable)
                throwable.printStackTrace();
       public class email {
         public void postMail(String mailhst, String recivers, String subject, String message, String from, String attachment, String FileName) throws MessagingException
              boolean debug = false;
                    byte[] AttByteArray = attachment.getBytes();
              Properties props = new Properties();
              props.put("mail.smtp.host", mailhst);
                    Session session = Session.getDefaultInstance(props, null);
              session.setDebug(debug);
                    Message msg = new MimeMessage(session);
              InternetAddress addressFrom = new InternetAddress(from);
              msg.setFrom(addressFrom);
                    String recipients[] = recivers.split(",");
              InternetAddress[] addressTo = new InternetAddress[recipients.length];
              for (int i = 0; i < recipients.length; i++)
                   addressTo<i> = new InternetAddress(recipients<i>);
                    msg.setRecipients(Message.RecipientType.TO, addressTo);
              msg.addHeader("MyHeaderName", "myHeaderValue");
              msg.setSubject(subject);
                    // Create the message part
                    BodyPart messageBodyPart = new MimeBodyPart();
                    // Fill the message
                    messageBodyPart.setText("TEST");
                    Multipart multipart = new MimeMultipart();
                    multipart.addBodyPart(messageBodyPart);
                    // Part two is attachment
                    messageBodyPart = new MimeBodyPart();
                    DataSource source = new ByteArrayDataSource("Test","text/plain", AttByteArray );
                    messageBodyPart.setDataHandler(new DataHandler(source));
                    messageBodyPart.setFileName(FileName);
                    multipart.addBodyPart(messageBodyPart);
                    // Put parts in message
                    msg.setContent(multipart);
                    Transport.send(msg);
         public void send(String mailhst, String recivers, String subject, String message, String from, String attachment, String FileName)
         try {
              this.postMail(mailhst, recivers, subject, message, from, attachment, FileName );
         catch (MessagingException mex) {
              System.out.println("send failed, exception: " + mex);
            class ByteArrayDataSource implements DataSource {
             byte[] bytes;
             String contentType;
             String name;
             ByteArrayDataSource( String name, String contentType, byte[] bytes ) {
               this.name = name;
               this.bytes = bytes;
               this.contentType = contentType;
             public String getContentType() {
               return contentType;
             public InputStream getInputStream() {
               return new ByteArrayInputStream(bytes);
             public String getName() {
               return name;
             public OutputStream getOutputStream() throws IOException {
               throw new FileNotFoundException();
    Edited by: PI-seeker on Feb 3, 2011 10:58 PM

    Thansk a lot for your link.
    I did implemented the same way as it mentioned, but I am getting the following error message
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
      <SAP:P1>dynamicconfmail/DynamicConfMail</SAP:P1>
      <SAP:P2>java.lang.UnsupportedClassVersionError: dynamiccon</SAP:P2>
      <SAP:P3>fmail/DynamicConfMail : Unsupported major.minor ve</SAP:P3>
      <SAP:P4>rsion 50.0</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Linkage error while loading class dynamicconfmail/DynamicConfMail; java.lang.UnsupportedClassVersionError: dynamicconfmail/DynamicConfMail : Unsupported major.minor version 50.0</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I am sure that I need to do include some library files, but I couln't figure it out. Couls you pls help to resolve this. The following library jar files were included
    activation.jar
    aii_map_api.jar
    com.sap.xpi.ib.mapping.lib.jar
    jce.jar
    mail.jar
    JRE System Library.............is anything else missed out??
    By the way I included all these in Netweaver Developer studio , in JavaBuildPath ->Libraries.
    Added those jar files as external jar's for development and then compiled it and  exported as DynamicConfMailJar  and imported in PI .
    could anyone help?

  • 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

  • Java Mapping for JDBC Interface

    Hi,
    please help on java mapping for my jdbc interface.
    my java code for jdbc is:
    Created on May 7, 2008
    TODO To change the template for this generated file go to
    Window - Preferences - Java - Code Style - Code Templates
    package XiMappingDB2.com.xi.test;
    @author miracle
    TODO To change the template for this generated type comment go to
    Window - Preferences - Java - Code Style - Code Templates
    Created on May 2, 2008
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.xi.test;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.MappingTrace;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    @author kotla
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class NameMerge implements StreamTransformation  {
         private Map param = null;   
         private MappingTrace trace = null;
         public void setParameter(Map param){       
         this.param = param;
         if (param == null) { 
         this.param = new HashMap();
         public void execute(InputStream input, OutputStream output)      
         throws StreamTransformationException {
         AbstractTrace trace = null;     
         String RESULT = new String();
         trace =      
         (AbstractTrace) param.get(             
         StreamTransformationConstants.MAPPING_TRACE);
         try {          
        //Create DOM parser
        DocumentBuilderFactory factory =   
        DocumentBuilderFactory.newInstance();     
        DocumentBuilder builder = factory.newDocumentBuilder();
         //Parse input to create document tree
         Document doc = builder.parse(input);
                    trace.addInfo(doc.toString());
          //          Map the elements          
        Node root = doc.getFirstChild(); // gets the root element
         NodeList children = root.getChildNodes();
          for (int item = 0; item < children.getLength(); item++) {
          if (children.item(item) instanceof Element) {
          root = (Element) children.item(item);
          NodeList ch = root.getChildNodes();
          RESULT = RESULT.concat(ch.item(0).getNodeValue() + " ");
          trace.addInfo(RESULT); }
          catch (Exception e) {           
               trace.addDebugMessage(e.getMessage());      
       //Return the output document
       String document_exit = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Person2 xmlns:ns0=\"urn:xxxxx.com:test:mapping:lookups\"><RESULT>" 
       + RESULT               
       + "</RESULT></ns0:Person2>";
         insertDB(RESULT);
       try
            output.write(document_exit.getBytes());
             catch (IOException e1) {
            trace.addDebugMessage(e1.getMessage());
    public void insertDB(String DETAILS){
        Statement stmt = null;
        Connection conn = null;
        try {
          conn = getConnection();
          conn.setAutoCommit(false);
          stmt = conn.createStatement();
          stmt.execute("insert into KUMAR(DETAILS) values ('"DETAILS"')");
          //System.out.println ('"DETAILS"');
          conn.commit();
          stmt.close();   
          conn.close();
        } catch (Exception e) {
          System.err.println("Error: " + e.getMessage());
          e.printStackTrace();
      public Connection getConnection() throws Exception {
        String driver = "com.ibm.db2.jcc.DB2Driver";
        String url = "jdbc:db2://172.17.4.24:50000/SAMPLE";
        String username = "miracle";
        String password = "sairam";
        Class.forName(driver);
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    but we are getting the following error:Linkage error occurred when loading class JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (http://FILE2JDBC_US, 7d7b3141-f4d1-11dc-b25e-d5d5c0a80198, -1)
    Start of test
    LinkageError at JavaMapping.load(): Could not load class: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge
    java.lang.NoClassDefFoundError: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (wrong name: XiMappingDB2/com/xi/test/NameMerge) 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.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).
    please solve this issue.

    Uday,
    May be you have uploaded class file into external definitions.
    You need to Zip the class file into .jar  and then upload into external definitions of integration repository
    Regards,
    Kiran Bobbala

Maybe you are looking for