cancel
Showing results for 
Search instead for 
Did you mean: 

deployment of second J2EE app causes class not found in first J2EE app

Former Member
0 Kudos

Hello,

We are working on SAP CE 71, and NWDI. We have 2 tracks each containing a J2EE application (EJB based).

The first application contains an external libray DC. The ear DC of this app contains dependencies to this external lib DC, and when I deploy this application all works well.

When I deploy a scond application (that also uses an external lib DC), residing in a different track, the proper working of the first application is disturbed: it does not find the classes of its external library anymore.

When I redeploy the first application, it works well again and its finds all its classes.

What am I missing here?

Things I tried to solve this problem:

-


A) I went through the post and tried out storing the external lib DC in a seperate ear but that did not help.

B) I also added a weak reference in my application-j2ee-engine.xml but that did not help:

- the jar file containing the classes to be found is poi-3.6-20091214.jar and is contained in my ear component.

- so I added this to my application-j2ee-engine.xml :

<reference reference-type="weak">

<reference-target

target-type="library">poi-3.6-20091214</reference-target>

</reference>

But when I deploy my application I get an error:

Description:

1. Warning exception has been returned while the [eandis.be/169_sit~ear] was starting. Warnings:[

][

Warning occurred on server 665243852 during startApp eandis.be/169_sitear : Library poi-3.6-20091214 is not deployed or loaded, but resolving of application eandis.be/169_sitear continues because it has weak reference to this library.

Warning occurred on server 665243851 during startApp eandis.be/169_sitear : Library poi-3.6-20091214 is not deployed or loaded, but resolving of application eandis.be/169_sitear continues because it has weak reference to this library.

Warning occurred on server 665243850 during startApp eandis.be/169_sitear : Library poi-3.6-20091214 is not deployed or loaded, but resolving of application eandis.be/169_sitear continues because it has weak reference to this library.

]

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

The first application contains an external libray DC.

I wouldnt do it. Create external library and reuse it from both EJB's

Former Member
0 Kudos

Thank you for the reaction, however what you mean is not completely clear to me.

Do you mean avoiding the use of external library development components and add the external jar file as in http://help.sap.com/saphelp_nwce71/helpdata/en/44/c70ecf53550f2ce10000000a1553f7/frameset.htm ?

I would also like to avoid that I have to add this jar in every application that we develop, just to satisfy the first application.

The reason of having the external library DC is that it resides in another track (a utilities track) that is a basic layer for all our tracks in which we develop applications (layered development). Stopping with external library DC's would make our utilities track less usefull.

former_member182372
Active Contributor
0 Kudos

Avoid including external jars into application, create external library instead

Former Member
0 Kudos

I use external libary develop components. By setting dependencies from my ear DC to the external lib DC, I get the jars in my ear file. But it still gives the problem.

Former Member
0 Kudos

I added a dependency from the webdynpro project to the ear DC of the business logic and this seemed to solve the problem