cancel
Showing results for 
Search instead for 
Did you mean: 

Importing java classes to XI

Former Member
0 Kudos

Hello,

I have a problem to import java.util.regex.Pattern / java.util.regex.Matcher

Where I can find the all the java classes in the XI?

How can I know that all the classes where imported?

Regards

Elad

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Elad,

If you are using them in ur UDF, did u imported them in ur UDF? In the top of UDF edior import them into Imports -java.util.regex.Pattern;java.util.regex.Matcher

-raj.

Former Member
0 Kudos

Hello Raj,

I did that, I add the line to the top line in UDF editor.

I can't find nothing in mapping objects --> imported archive.

Regards

Elad

former_member192892
Active Contributor
0 Kudos

What is the error you're getting??

Former Member
0 Kudos

RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns1:_-BI0_-QI6AZCORPORATE_PRO__1_RFC/DATA/item[2]/MATERIAL. The message is: Exception:[java.lang.RuntimeException: Mapping Error Occurred.] in class com.sap.xi.tf._Sales_Data_MAP_ method check_product$[eof, eof, com.sap.aii.mappingtool.tf3.rt.Context@151fc3b]

henrique_pinto
Active Contributor
0 Kudos

Usually, you don't need to explicitely import classes from java.util.* packages, they are imported by default in all UDFs.

Anyways, the mapping runtime is complaining about a RuntimeException, not a NoClassDefFoundError.

Regards,

Henrique.

Former Member
0 Kudos

Hello,

I'm not understand way the mapping (in test tab) work in production and don't work in Development environment.

The mapping is completely same.

Any idea?

Regards

Elad

bhavesh_kantilal
Active Contributor
0 Kudos

Elad,

Like pointed by others, you need not import any Jar file for the pattern and matcher classes under Regex.

I have a UDF working absolutely fine that uses this class.

I would suggest that you look into the code and try to analyse what the issue is.

Also, make sure that you have a semicolon after the import of both these classes and the improt statement should be at the top of the UDF under imports.

Regards

Bhavesh

Former Member
0 Kudos

Why don't you add some trace statements using abstractTrace object so that you can debug where the code is failing in the UDF

Cheer's

Answers (1)

Answers (1)

former_member192892
Active Contributor
0 Kudos

Hi Elad, Are you importing this clas in your UDF???

Former Member
0 Kudos

Hello Varun,

I try to import the class to the UDF.

The UDF work in production environment but not work in development environment.

I think the problem is with java class.

Regards

Elad

former_member192892
Active Contributor
0 Kudos

Are you using a custom java class and trying to call it in your UDF, or are you directly importing Pattern class and Matcher class???

Former Member
0 Kudos

Hi Elad,

You can see the java classes in the Mapping Objects ->imported archives.

Are you getting any error like class not found even if they are imported ??

Regards,

Sreenivas