Skip to Content
author's profile photo Former Member
Former Member

import a external jar in web dynpro project

Hi experts.

I've tried to export a external jar in my web dynpro component.

i found in forum some thread about that, for example this thread:

Link: [https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2361] [original link is broken] [original link is broken] [original link is broken];

this is my steps:

1 - create a new component External Lybrary.

2 - put the jar file in the libraries directory

3 - create the public part

4 - make the build

5 - in my web dynpro project i create the used component dependency.

In design, build and deploy all is OK, but in Runtime happen a exception. All the classes that i have in jar file, the web dynpro component don't found and cause a ClassNotFoundException in runtime.

Can anyone help me?

Marcos

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2009 at 04:07 AM

    Hii,

    While u add the external jar file in ur 'Used Dc's ' refernce make sure u tick only build time and not runtime .choose only the build time option.

    Hope ur issue will get resolved with this.

    Thanks,

    Parama.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Satish Jhariya

      Hi Peoples...

      Actualy, i use NWDS 7.1 EHP, and don't have some option that you describe above. It's a little different.

      I've created the public parts adding it in Development Infrastructure perspective, but this never worked. Than i tried to do what satish jhariya post above. In my External Library DC i publish as archive the jar files, one as compilation and other as assemply. Then my component works.

      Thanks for all the replies.

      There are some difference about the way that you include a public part?

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2009 at 12:40 AM

    hi,

    u have to add two Public Parts one for assembly and one for Compile,.

    chk this out,

    /people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas

    1. Create an External Library DC

    2. Copy all of the Jars needed to the libraries folder of this DC

    3. Create two Public Parts (right click on the jar files in Package Explorer)

    i) compilePart (with purpose compilation)

    ii) assemblyPart (with purpose assembly)

    4 Create a new DC of type J2EE Server Component / Library

    5. Add a Used DC to the J2EE Library, reference the compilePart from previous step, and set Dependency type to Build

    6. Add another Used DC, reference the assemblePart, this time select both Build and Runtime Dependency Types

    7. Build and deploy.

    Regards

    Jay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2009 at 04:56 AM

    Please look at the below thread for help

    -new-web-dynpro-weblogs

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 24, 2009 at 06:35 AM

    Hi Marcos,

    In addition to the above, do this also.

    - Right click on the project. Select Properties.

    - Select 'Web Dynpro References'

    - Select 'Sharing Reference'

    - Click on Add & add a sharing reference.

    Hope that should help you.

    Regards

    Chander Kararia

    # Please close the thread once get the correct answer. Give rewards for answers.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.