cancel
Showing results for 
Search instead for 
Did you mean: 

Use external jar wih DCs

Former Member
0 Kudos

Hi,

I need to call 2 external JARs from a DC.

I've tried in several ways following both:

Blog 1: /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro

and

Blog2 : /people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas

but none of it seems to work since I always get the exception ClassNotFound.

I am using:

SAP NetWeaver Developer Studio

Version: 7.0.09

Build id: 200608262203.

In particular SDA file doesn't contain the jar files.

Can you help me?

Regards,

Anita

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anita,

To use external JAR in webdynpro, you have to create a DC of Extenal Library. There you have to add all jars in libraries folder.

Create two public parts with the added jars.

a. Create public part with 'Provides an API for developing/compiling other DCs'. This public part provides build time dependency.

b.Create public part with 'Can be packaged into other build results (SDAs)'. This public part provides deployment time dependency.

then build the DC..

Let me know if you have any doubts

and use this DC where it is required as USED Dc

Former Member
0 Kudos

Hi,

I've already created both public parts, but it is not working.

As workaround I have added JAR files to EAR file but every time I build the component I have to add them again.

Which version of NWDS are you using?

Regards,

Anita

Former Member
0 Kudos

Hi,

<b>Using JAR files in Webdynpro:</b>

The JAR files will be required 2 times.

1) Design time

2) Run time

<b>For Design time</b>, you can add those JAR files to the Project Build path ( Right click on Project -> properties -> JAVA Build Path -> Libraries -> Add External JAR )

<b>For Run time</b>, your JAR files must be present on the server or in the Web Dynpro EAR. So, it is not possible for everyone to have access to put JAR files on server. What you can do here is, put the required JAR in the "lib" folder of Web Dynpro Application. So, the JARS will included in EAR of WDP App.

( go to package explorer -> select your WDP project -> import JARs in "Lib" folder)

<b>Threads:</b>

<b>Inluding External libraries:</b>

http://help.sap.com/saphelp_nw70/helpdata/en/f9/ce747474574fdb8a79fed77ea075f8/frameset.htm

Former Member
0 Kudos

Hi,

as far as I can see the solutions you propose can be used only in JWD projects while I need to use external jar in a Development Component. Isn't it so?

Regards,

Anita

Former Member
0 Kudos

Hi,

Have you created a J2EE library out of the external dc.

Regards

Ayyapparaj