cancel
Showing results for 
Search instead for 
Did you mean: 

external jars not added to war during build

Former Member
0 Kudos

Hi,

I'm trying to port a (very simple) Webapplication to NWDI.

I have the following scenario:

3 Development components (thus far under my LocalDevelopment) directory.

1. J2EE ear file

2. Web application war file containing a single Servlet

3. An external library containg a jar file in which the Servlet depends.

For the Library DC i created 2 public parts one for compilation and one for assembly.

I added these public parts in the "Used DC's" folder of the Webapplication.

Compiling and Building the EAR file works fine the jar is included in the WEB-INF/lib directory on assembly.

I have now been given a track in an NWDI envrironment. I guess my first question is:

Is it possible to import projects into NWDI form LocalDevelopment ?

Anyway, given that the Project was rather trival recreating the 3 projects in NWDI wasn't that much work. I repeated all the steps: creating public parts etc. and activating as I went pretty much according to

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/194bdc4f-0901-0010-82ba-bf7...

With the exception that I had to create an additional public part for assembly.

The problem is that the JAR file does not get included into the WAR on assembly.

Is the development process different when dealing with DC's locally and via NWDI ? Do I need to add addtional references or assembly instructions.

I'm working with NWDS 7.0.09

I have to say I am at a complete loss why the Jars aren't included.

Thanks very much in advance for any hints.

cheers

Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Michael,

Pls make sure the PP (public part) files has the JAR entries as Archive.

ie.,

<entity-type>Archive</entity-type>

it happens that by default entity type would be of 'file'. Just check if its Archive or not.. else modify those PP files with this.

it should be like below in your PP (public part) files of your library dc:

<entities>

<entity>

<name>xxx.jar</name>

<package></package>

<caption>xxxx.jar</caption>

<description></description>

<entity-type>Archive</entity-type>

<entity-sub-type>Java Library</entity-sub-type>

</entity>

</entities>

Thanks,

Raags

Former Member
0 Kudos

Hi Raags,

thanks for your reply. The XML files your refering to are in the External Library Project under _comp\def with a .pp extension. I checked them and both the file intended for compilation and assembly have entity type Archive.

This is the first time I've used NWDI is the development process analogous to that of developing DC's in a local environment ? Is it sufficient to create the public parts in the the external library and add/use these in the WAR DC ? Or do in need additional references etc ?

I just want to make sure that i didn't miss a step.

thanks,

Michael

Former Member
0 Kudos

Hi Raags,

I went over all the public parts again and after recompiling and resychronizing it worked!

Unfortunately, I can't say for sure where the problem was. Perhaps there was a mistake in creating the pp's or synchronisation ... but then again I recreated the and synchronized all components over a dozen times...

thank you for your help

michael

Former Member
0 Kudos

There is an issue in SP09 regarding packaging jars from External Library DCs into other DCs. An patch was released for this, but that's part of the base SCA's for trackbased development. This issue may be present in NWDS SP09 (7.0.09)as well.

Can you try with NWDS 7.0.10 (SP10)?

Message was edited by:

Pascal Willemsen

I'm slow today

Former Member
0 Kudos

hi Pascal,

I installed NWDS 7.0.10 and the builds worked fine ! It seems it was a NWDS problem. Thanks for that.

Is there a 'known bugs/issues' list or the like ?

cheers,

Michael

Former Member
0 Kudos

I've never seen a known issues list for any SAP product. The only thing to do in case of troubles is to check if there are any SAP notes released for the involved productversion.

Answers (0)