cancel
Showing results for 
Search instead for 
Did you mean: 

Error in simple user defined function

deviprasad_pothireddy
Active Participant
0 Kudos

Hi all,

I have seen one simple user defined function on scenario. Now it is working fine. Same code I have used another place. But it is giving some errors

D:/usr/sap/C08/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc6fa0c70297511dbaf7e00c09f4504e7/source/com/sap/xi/tf/_ST_MM_.java:3: package javax.mail.internet does not exist

import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import javax.mail.internet.;import javax.mail.;import java.util.;import java.util.Date;import javax.activation.;import java.lang.reflect.;import javax.mail.event.*;

Like that it has shown 13 errors. I have given the package names in imports field what previous function has.

Accepted Solutions (0)

Answers (3)

Answers (3)

deviprasad_pothireddy
Active Participant
0 Kudos

Hi all,

I imported the archive files what previous scenario have and activated the present scenario (not allowing). But i am getting same errors. Can any body tell how to write a new user defined function, which have some packages (not default packages) to use and how to make simple user defined function to global use. Your help is really rewarded.

deviprasad_pothireddy
Active Participant
0 Kudos

Hi all,

I tried with various packages names. But it is giving same error for all packages. Shall I need to change class path? One more thing how do Integration server identify the packages? Can any body give complete information about it and also if want to make the simple user defined function to global user defined function so I can use that function in other scenarios. Your help is reward able.

Former Member
0 Kudos

Hi Deviprasasd,

Can u pls mention the code along with the import statements.

I think it is asking for some jar files.

If u paste the code it will be of more help.

Regards

Neetu

Former Member
0 Kudos

Hi,

Please see this from SAP help

<i>a. You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon:

You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since all message mappings require these packages and therefore import them. You should be able to access standard JDK and J2EE packages of the SAP Web Application Server by simply specifying the package under Import. In other words, you do not have to import it as an archive into the Integration Repository. You can also access classes of the SAP XML Toolkit, the SAP Java Connector, and the SAP Logging Service (see also: Runtime Environment (Java-Mappings)).

In addition to the standard packages, you can also specify Java packages that you have imported as archives and that are located in the same, or in an underlying software component version as the message mapping.

b. Create your Java source text in the editor window or copy source text from another editor.</i>

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

Regards

Vijaya

moorthy
Active Contributor
0 Kudos

Hi,

As it is telling is package is missing, check the package name in the user defined function is correctly given with semicolon etc.

Also while copying user defined functions copy to notepad first and then create a new user defined function and then copy the code. ALso check is there any extra { , } braces are there in the code.. check these

Did you import any imported archive files for your old user defined functions. ? If so import the same into your new SWCV.

Regards,

moorthy