cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation error in SAP PI while activating message mapping

Former Member
0 Kudos

Hi,

We have a Java mapping code which is referenced in the UDF's written in graphical mapping. This package has been imported while writing the UDF. The Java code compiles successfully and gets activated fine in PI(Imported Archive). However when the message mapping with UDF referencing this Java mapping is being activated i throws below error:

Source text of object Message Mapping: A_to_B | http://sap.net/erp/trade has syntax errors:

Java Area import, Line 7:

package sap.net.erp.trade does not exist import sap.net.erp.trade.GenerateItem;                                      ^

                    ^ Note: /usr/sap/XX4/DVEBMGS02/j2ee/cluster/server1/./temp/classpath_resolver/Map3f1d45f37b5f11e292ed0000014ad9db/source/com/sap/xi/tf/_A_to_B_.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

Any help is appreciated.

Thanks,

Sriram

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Sriram,

The UDF is unable to find the JAVA mapping path, kindly ensure that the JAVA mapping archive is added under Message mapping > Functions > Archives Used.

Additionally the error points that you are using a deprecated API, you may want to look at that as well.

Regards,

Gautam Purohit

Former Member
0 Kudos

Thanks Gautam. The earlier error is resolved. However now there seems to be another error as below:

getTradeType(com.sap.aii.mappingtool.tf3.rt.Container) in sap.net.comm.emt.trade.GenerateItem cannnot be applied to (com.sap.aii.mappingtool.tf7.rt.Container) String result = c.getTradeType(container).

Is it to do with the package import ebing incompatible with PI 7.1?

Regards,

Sriram

Former Member
0 Kudos

Hi Sriram,

This looks like a type cast problem.

Can you paste your mapping code in here?

Thanks,

Diptee

Former Member
0 Kudos

Hi Sriram,

Also please go through the post http://scn.sap.com/thread/1302866.

Thanks,

Diptee

Former Member
0 Kudos

Hello Sriram,

This is a typecast issue due to the fact that the APIs to be used in JAVA Mapping for 7.0 and 7.1 are different.

The link provided by below definitely should help as you are migrating 7.0 mapping to 7.1 environment.

Regards,

Gautam Purohit