cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Syntax error

Former Member
0 Kudos

Hi All,

I am new to XI. I have done a simple scenario of message mapping. I just want to transfer one string value (from sender) to another (receiver). However, I am getting the following syntax error:

Source code has syntax error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main Exception in thread "main"

The source code in the test tab of message mapping is:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:zvis_mt_sender xmlns:ns0="http://www.sap.com/simple4">

<PONUM>1</PONUM>

</ns0:zvis_mt_sender>

I am not sure where the syntax error exactly is, I would be glad if anyone could help me.

I need this urgently.

Good Reward points would be given.

Thanks,

Vishal.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>

> Hi All,

>

> I am new to XI. I have done a simple scenario of message mapping. I just want to transfer one string value (from sender) to another (receiver). However, I am getting the following syntax error:

>

> Source code has syntax error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main Exception in thread "main"

>

> The source code in the test tab of message mapping is:

>

> <?xml version="1.0" encoding="UTF-8"?>

>

> <ns0:zvis_mt_sender xmlns:ns0="http://www.sap.com/simple4">

> <PONUM>1</PONUM>

> </ns0:zvis_mt_sender>

>

> I am not sure where the syntax error exactly is, I would be glad if anyone could help me.

>

> I need this urgently.

>

> Good Reward points would be given.

>

> Thanks,

>

> Vishal.

Hi,

Can you please provide me source and target data types. Is there any mapping which is working fine in that SAP XI box.

Thanks

Amit

Former Member
0 Kudos

Hi Vishal,

The problem is related to java runtime.

As one of the above said, if you had written any UDFs please check whether you have imported required libraries. Also check the entire code once.

Regards

Bhanu.

Former Member
0 Kudos

This is my first program in XI, please let me know what is a UDF & how to import libraries and .jar files into my system.

Former Member
0 Kudos

Hi,

Can you tell me another thing. Is this error coming at Runtime only or even when you the test the mapping in ID by clicking on Test button? As adviced above please see if you are using any UDF in your mapping.

Thanks

Amit

Former Member
0 Kudos

Hi,

UDF is User Define Function which you create in your Message Mapping. It's basically a Java Code which you write for putting some logic which is directly not possible.

Thanks

Amit

Former Member
0 Kudos

Hi Amit,

This problem is Not comming at runtime, it is comming even when I am using the test option and clicking execute button.

Former Member
0 Kudos

Hi,

did you cheked your mapping again? Try creating simple message structure, message mapping in the same SWC but diff namespace and see if it works. This error will come whne you are using any standard functions available or UDF.

Thanks

Amit

Reward points if suggestion is helpful

Former Member
0 Kudos

hi,

what is a UDF & how to import libraries and .jar files into my system.

Check this for UDF's

UDF Links *

http://java.sun.com/j2se/1.5.0/docs/api/

/people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi

/people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

UDF -

http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm

+ UDF Help +

http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm

.jar files

When we are doing JAVA , XSLT mappings we have to do import archievs

after developing the JAva mapping in NWDS and create jar file come back to IR under imported archieves we will import the jar file.

Similarly XSLT als make the zip and import under imported archieves

Also when we have any java packages ,import it under archieves and make them to use in UDF

See the below links

XSLT Mapping

/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping

/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

XSLT Mapping with java enhancement

/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=...ValidationsinSAPXI-ACaseStudy.pdf

Check this thread...

Check this thread...

Thanks,

Vijaya.

Former Member
0 Kudos

Hi,

Any luck on the same. If ot doesn't work as your basis team to restart the java stack of your server. Meanwhile you can try clearing the cache from your Java Web Start

Thanks

Amit

Rewards point if suggestion us helpful

Answers (3)

Answers (3)

Former Member
0 Kudos

this was an admin problem and after raising a request with them, it got resolved.

Former Member
0 Kudos

Hi,

The problem is a corrupt .jar file. Download the entire thing again and it will works.

Thanks

Swarup

Former Member
0 Kudos

Hi Vishal,

Have you used any udf or Graphical mapping.

java.lang.NoClassDefFoundError will come if any jar file is missing required for java runtime. Might be some useful jar files are missing while instalation.

Check for Constant mapping for target its working or not

Thanks,

RamuV

Former Member
0 Kudos

Thanks for the reply, it is a graphical mapping and other mappings are working fine in other software components.

I am facing this problem only in my S/W component version.

I have created a new S/W catalog ; technical landscape and business landscape. is the problem related to this

Edited by: Vishal Saxena on Jun 18, 2008 4:45 PM

Former Member
0 Kudos

The mapping is just between two fields PONUM (1..1;xsd:string) -- SONUM (1..1;xsd:string)

These are the steps I have followed:

1. Creating a new product.

2. Defining S/W component

3. Creating two New Technical system (Third-Party) for sender and receiver.

4. Creating two new business systems for sender and receiver

5. Opened intigration repository and imported S/W component versions

6. Created namespace / datatypes/ mess types/ mess interfaces.

7. Activated everything. (no error was shown)

8. Created message mapping and interface mapping and executed the mapping......I get this syntax error.

I am not getting this error when I am creating the same mapping in already present S/W component versions. They are working perfectly fine.

Please let me know what the problem is....

I need this urgently. I am struck for the past 2 days.