cancel
Showing results for 
Search instead for 
Did you mean: 

java class within user defined function

Former Member
0 Kudos

Hi all,

in order to have a JDBC-lookup java function "globally" in XI i created a java class and imported it to XI as an imported Archive (i have to do the lookup within a mapping). I then can include the class to a user defined function. However the problem is now that this works fine within one Software Component Version but when i want to use it in several SWCV i have to import the jar to every SWCV. My question is therefore if anybody has already had this problem and if there is another possible solution - maybe deploying the class to XI using SDM?

Thank you for your thoughts.

Mathias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Stefan,

doing it with usage dependencies looks quite nice, but did you have a java-mapping or just a java class that you import within a user defined function. it looks like there is a difference as i am getting errors that it cannot find the import package although i have a usage dependency now.

Mathias

MichalKrawczyk
Active Contributor
0 Kudos

hi Markus,

did you specify the dependency correctly?

(I mean are they refresed?)

/people/michal.krawczyk2/blog/2005/08/26/xi-are-you-independentfrom-your-dependencies

Regards,

michal

Former Member
0 Kudos

Mathias,

i have JAVA classes in my archives and they are used in the user defined functions without any issues, also I have XSLTs in them.

Cheers

Stefan

Answers (3)

Answers (3)

Former Member
0 Kudos

Stefan,

you are right, but the thing is you have to create a usage dependency of Dependency Context: InstallationTime and then import the SWCV again to XI. Afterwards you find a folder underneath your SWCV called BASIS Objects, which is basically a copy of your SWCV where you have your usage depency to. Once you have that the imported archive is available within the second SWCV as well. Thank you for the hint!

Markus

Former Member
0 Kudos

for the records - here it explains what jars can be used where...

http://help.sap.com/saphelp_nw04/helpdata/en/a4/64b93d0d4e6b3be10000000a114084/frameset.htm

*underlying meaning exactly the Dependency on Installation time...

regards,

peter

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

I think you will have to import your JAR file into every SWCV.

ASFAIK, if the JAR file is imported into the XI server, it can be accesses like any other normal java package.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

we have created a own Software component and imported the JARs there and then you can assign that SC in the SLD to each other SC through usage dependencies. This solved our problem.

Cheers

Stefan

MichalKrawczyk
Active Contributor
0 Kudos

a very nice solution

you still have to rember to add dependencies but

looks much better then importing archives every time:)

Regards,

michal

MichalKrawczyk
Active Contributor
0 Kudos

hi Markus,

>>>>My question is therefore if anybody has already had this problem and if there is another possible solution - maybe deploying the class to XI using SDM?

if you do that then you'll have to remember about it

every time you import a new SP or upgreade your XI

this is not standard so SAP may always overwrite it

and your interfaces will stop working

consider importing it for every SWCV

Regards,

michal