cancel
Showing results for 
Search instead for 
Did you mean: 

How I can add library external references in my EAR DC

former_member207329
Participant
0 Kudos

I guru, I have a BIG problem wiht EJB,EAR and NWDI.

I working with MDM api and I have created "LOCAL" EJB and "LOCAL" EAR (for to create a simple web service).

In application-j2ee-engine.xml file I have added the library external references to <b>com.sap.mdm.tech.mdm4j</b>(<b>this library exist in J2ee</b>).

After Deploy, it works fine! The web services is OK.

But...

In <h3>NWDI</h3> scenario:

1) I have created EJB DC

2) I have created EAR DC

3) I have added library external references <b>com.sap.mdm.tech.mdm4j</b>

Resut: I have any error and my web services doesn't works!

<h3>The problem is: In NWDI scenario How I can add library external references in my EAR DC????</h3>

Help me, please!!!

Edited by: ROCCO MARINO on Oct 17, 2008 11:57 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

paulsauthoff1
Explorer
0 Kudos

Hi Rocco

The error is because during deploy and/or run the files that you have referenced cannot be found.

I have had this problem before and I resolved as follows:

1. In your external library define the added mdm jars as two public parts, say one for ASSEMBLY and one for COMPLIATION.

2. Add both of these as a used DC

3. In the COMPLIATION used DC set only Build Time = true

4. In the ASSEMBLY used DC set only Run Time = true

5. In your DC make sure you set a reference to where the MDM APIs are on your server - you can do this by right clicking on teh DC and choosing Web Dynpro References >> Library References tab and adding a reference. MDM APIs are usually sap.com/com.sap.mdm.tech.mdm4j, but may be different for you.

It was this last step that was my problem.

Hope that this helps

Regards

Paul

Former Member
0 Kudos

Hello,

Try adding a J2EE Library DC project and add the mdm library you want on the used DCs of the library dc project. Though, I haven't used an MDM library/api - you might want to add an External Library DC (where you add the mdm jar file as a public part) alongside the Library DC..

Add a public part to the Library - build and deploy.

Add a used DC in your EJB DC - build.

Build EAR DC, and deploy.

Cheers!

Regards,

Jan

former_member207329
Participant
0 Kudos

Hi,

we have used Library DC but it's doesn't work....

snehal_kendre
Active Contributor
0 Kudos

HI,

If you have used the library DC, then give its refernce in application-j2ee-engine.xml as a library.

former_member207329
Participant
0 Kudos

I done it but...

...it doesn't work...

The library DC it's work fine in BUILD phase but it doesn't work in DEPLOY/RUNNING phase , I always have the same error:

<b>cannot create an instance of the stateless bean.->java.lang.NoClassDefFoundError: com.sapportals.connector.ConnectorException </b>(for example).