cancel
Showing results for 
Search instead for 
Did you mean: 

Using external libraries in Web Dynpro DCs

Former Member
0 Kudos

Hi,

I've followed the example in the following blog for using external libraries in my Web Dynpro (WD) DCs:

/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro and some other messages in the forums. However, it isn't working exactly as described in the blog. I have to twist it a bit to get it work. I were wondering if anyone has any better solution for this problem?

The senario is like this:

- External libraries: a.jar, b.jar

- WD DCs: wd1, wd2 in that wd1 and wd2 are both using external libraries a.jar and b.jar; wd1 is a library DC that can be reused in wd2.

According to the example in the blog, the following steps are carried out:

- Step 1. Create an external library DC, add a.jar and b.jar to public part "ExternalLibs" as described in the blog.

- Step 2: Create, build, deploy “J2EE Server / Library” DC. (Add reference to the public part of the external library DC as a used DC, with both Build-time and Run-time dependency).

- Step 3: Create WD DC wd1, add used DCs and WD reference libraries as described in the blog. Add WD components as public part. Build and deploy WD DC wd1.

All are ok so far!

- Step 4: Create WD DC wd2, add used DCs and WD reference libraries as before. Try to build and FAIL!

The error occurs here because wd2 cannot access to the classes in the external libraries, similar to the problems described in thread .

I've found a workaround, although quite tedious and cumbersom, but it works. My solution so far is:

- Round 1: Perform those 4 steps above, but in step 1, after adding the jars to the public part "ExternalLibs", set the property of the public part "purpose" to "compilation", then build and deploy all other DCs accordingly.

- Round 2: Change the public part "ExternalLibs" property to "assembly", then bulid and deploy all other DCs again.

And now I can reuse the external libraries in my WD DCs as well as WD DCs as library in other WD DCs.

I know it's not an elegant solution. So I were wondering if the experts out there can help me with better solutions?

Many thanks in advance for your help.

Regards,

Van

Edited by: Van Hai Ho on Dec 18, 2007 3:30 PM

Edited by: Van Hai Ho on Dec 18, 2007 3:31 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create 2 pp's in your External Library DC, 'compilation' and 'assembly'. Add your jars to both public parts. Reference the public part for compilation in the J2EE Library DC.

Former Member
0 Kudos

Hi Pascal,

Thank you so much for your help. Your suggestion has helped to make my life a lot easier.

Regards,

Van

Answers (0)