Skip to Content

How I can add library external references in my EAR DC

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></b>(<b>this library exist in J2ee</b>).

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


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></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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 20, 2008 at 05:04 AM


    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.




    Add comment
    10|10000 characters needed characters exceeded

    • I done it but... 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).

  • avatar image
    Former Member
    Nov 17, 2008 at 01:42 PM

    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, but may be different for you.

    It was this last step that was my problem.

    Hope that this helps



    Add comment
    10|10000 characters needed characters exceeded