Skip to Content
avatar image
Former Member

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-x64in>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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 23, 2009 at 02:18 PM

    Include the aai_map_api.jar file using PATH command. Better use NWDS for this. Much simpler job.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2009 at 06:07 AM

    what i have to give in class path.

    C:\j2sdk1.4.2_16-x64\bin>set CLASSPATH=%CLASSPATH%;aii_map_api.jar

    is it the location where ;aii_map_api.jar file is?

    Add comment
    10|10000 characters needed characters exceeded

    • >

      > No that is the exact code that i had created.

      > I think there is some problem in setting class path, home path and path... i was tryin to search for that..

      > is it working properly at ur side?

      Yes for me it is working as expected.

      Try creating the same program with different class name. Compile it then zip and reload the arhieve.

      then use it in interface mapping and test...............

  • Mar 23, 2009 at 02:24 PM

    Get the jar file aii_map_api.jar and copy it in your working directory(C:\j2sdk1.4.2_16-x64\bin)

    now in dos prompt use the following command.

    C:\j2sdk1.4.2_16-x64\bin>set CLASSPATH=%CLASSPATH%;aii_map_api.jar

    now execute your java program.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23, 2009 at 02:30 PM

    in java mapping, you will have to use the jar aii_map_api.jar

    To locate the jar, Go to your XI server folders and use this path, j2ee\cluster\server0\apps\sap.com\com.sap.xi.services. Inside com.sap.xi.services folder you'll find the jar file. Import the jar for your mapping.

    Also as mentioned above, it always better to use NWDS for any XI related development.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 23, 2009 at 03:00 PM

    Thanks A lot....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2009 at 09:13 AM

    Not yet answered,but will to try to put the question in better way...

    Thanks all.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2009 at 12:37 PM

    .

    Add comment
    10|10000 characters needed characters exceeded