cancel
Showing results for 
Search instead for 
Did you mean: 

External Jars... again

former_member190457
Contributor
0 Kudos

Hi everybody,

I need to use several xml utilities distributed as jars. Following this [blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/12177] [original link is broken] [original link is broken] [original link is broken]; I did as follows:

- copied my jars in the libraries folder of an external library DC

- added all of them to both assembly and compilation public part

- referenced the api pp from my WD client (build dep)

- referenced the ass pp from a J2EE server component (library) (build dep)

- referenced the library from my WD client from project properties-> library references etc.

[I have already used this procedure for java classes and it works]

When it comes to jars it will give class not found.

What I noticed is that the J2EE library .sda deployable archive does not include the ass_pp nor the jars from the external library.

In the J2EE library project the .jars are actually there in the folder:

<project path>\_compgendefaultpublicdefLiblibjava

however the sda will only have

- META-INF folder

- server folder

Appearently the library will only correctly include assembly public parts from DCs of type other than External Library (i.e. it works ok with assembly pp from WDJ DCs).

Can anyone please help?

Thanks

Vincenzo

Accepted Solutions (1)

Accepted Solutions (1)

siddharth_jain
Active Contributor
0 Kudos

Hi,

Earlier i face the similar Problem ,Which i resolved by including Both Assembly an Compilation PP in WD dc.

i have not tried this approach in 7.0 for External libs but you can try the following locally for NW 7.0 and see if it works:

if you have any EA DC in the Architecture you can replace the SDA(J2EE Server Component DC) with EA Dc and follow the approach mentioned in the Blog for CE 7.1.

instead of giving DC Run Time usage,you have to specify the EA dc shared reference in WD Application property.

Siddharth

former_member190457
Contributor
0 Kudos

Hi Siddhart, I actually tried and use an Enterprise Application DC, but with the same outcome.

The resulting .ear does not include the expected jars nor are they found anywhere in the project folder structure.

Did anyone solve this?

Thanks, regards

Vincenzo

former_member190457
Contributor
0 Kudos

Hi,

I tried this as well, but it is very empirical, and it didn't work for me either:

unzip your jars

recursively decompile all the .class

add the obtained .java files to your project with their respective folders.

however your decompiler might generate odd java sources which often won't compile at all and need manual editing (!).

Any suggestion?

Thanks, Vincenzo

Former Member
0 Kudos

Hi Vincenzo,

You can give a try to the blog mentioned by Durga.

In this approach, the J2EE server library is not required at all. You just need to create compilation (API) and Assembly (SDA) type of Public Parts of the External Library DC, and consume them as Used DC in your Web Dynpro Project, with Build Time Checked.

In case of Java project, your technique may have worked because, Java projects are not deployables, while using Web Dynpro and EA projects, the JARS to be used must also be available in a Deployable format for use. Hence, remember to add the SDA type public part to the Web Dynpro DC.

Regards,

Alka.

Answers (5)

Answers (5)

former_member190457
Contributor
0 Kudos

I manually added the required jars to the root of the .ear. Of course you have to do this every time you rebuild the DC.

Moreover, you cannot use the autogenerated archive from DI. I tried every other option, but only this worked.

Thanks, regards, Vincenzo

siddharth_jain
Active Contributor
0 Kudos

Hi,

Have you checked the following SAP Note for the same:

993799

Also see Bertram's Reply in the end of the following Blog :

Siddharth

Former Member
0 Kudos

Hi,

Go through this thread

Regards

padma N

lokesh_kamana
Active Contributor
0 Kudos

Hi,

Which service pack are you using?

Thanks & Regards,

Lokesh

former_member190457
Contributor
0 Kudos

Hi I'm on NWDS 7.0.11, AS 7 SP14

I'll give a try also to the procedure about EA.

Thanks, Vincenzo

former_member254270
Participant
0 Kudos

Hi,

Check this link.

former_member190457
Contributor
0 Kudos

Hi, thanks for replying.

I have used that technique several times before, with java classes, and it actually works.

However in this case I can see that the jars are correctly packed in the WDJ archive, but the error is there all the same.

Appearently jars aren't searched through during classloading.

Any suggestion?

Thanks kind regards

Vincenzo