cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Jar files to a DC

Former Member
0 Kudos

Hi,

I want to know how to add a jar file to a Local DC.

Regards,

Padmalatha.K

Points will be rewarded.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mithu,

I added the jar files following the procedure mentioned by you.........But im getting a "NoClassDefFoundError" at runtime.

Please suggest.

Regards,

Padmalatha.K

Former Member
0 Kudos

Hi

The way you have followed in adding external JAR files is correct

For your information on adding JAR files --

There are two ways in adding the external JAR files in WebDynpro

1) RightClick on the project - > properties-> Java Build Path - >Libraries ->Add External JAR Files

By doing this , your jar will be available only on the local machine. if the path got changed or file got deleted , you will get errors.so to avaoid that

2) Goto Navigation Tab - > navigate through lib directory and paster your .JAR file there

By doing this your jar file will be deployed on to the sever ,so it will be available always as it is on the server

Best Regards

Chaitanya.A

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi Chaitanya,

I checked the extension of the files............they are of type Executable Jar Files..............

Former Member
0 Kudos

Hello

Try this [Link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/194bdc4f-0901-0010-82ba-bf73af5d5f75]

Best Regards

Chaitanya.A

Former Member
0 Kudos

Hi Chaitanya,

I tried to add the jar files in both the ways.........But everytime i choose "Refresh DC Settings" and deploy the application, im getting the "NoClassDefFound Error".

Please Help............

Former Member
0 Kudos

Hello

This might not be the case . can you check the Extension of the file , is it .JAR or anything else

in the newer versions of OS they will save as .ZIP

if this is the case change to .JAR and try to add again.

Regards

Chaitanya.A

Former Member
0 Kudos

Hi Siva,

When i added the jar files to the Java Build path, they are automatically added in that location.

Former Member
0 Kudos

Hi,

I want to add these external jar files:

1. poi-3.0.1-FINAL-20070705

2. poi-contrib-2.5.1-final-20040804

I saved these jar files on my local desktop. And i want to add these to the Local WebDynpro DC.

Please tell me how to do it.

Regards,

Padmalatha.K

former_member197348
Active Contributor
0 Kudos

Hi,

Try this if you are facing when adding as External JAR files.

Copy and paste these two files in the folder

<InstDrive>:\Documents and Settings\<user>\.dtc\LocalDevelopment\DCs\<packge>\<DCName>\_comp\lib.

regards,

Siva

former_member751941
Active Contributor
0 Kudos

Hi padmalatha,

Steps.

1> Right Click on the project name

2> Choose Properties

3> Select Java Build Path

4> Add External JARS...

Regards,

Mithu

Former Member
0 Kudos

But every time i refresh from the DC setting(right click on the prj>Developement Component>refresh from DC setting) ,the jar files are getting lost.But those jar files are available in the lib folder of the project.

Please help.

Thanks in advance.

Regards

-Padmalatha.K

Former Member
0 Kudos

Padmalatha,

if you want to add external jar files to a local project (which is not a DC project), you add using java build path option,

but if you want to add external jars to a DC (Local or non Local), you have to

create a Library DC,

create & expose the public parts

add the public parts in Used DC of the deployable project (webdynpro).

Follow the link [/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro|/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro] for this approach.

Regards

Deepak

former_member751941
Active Contributor
0 Kudos

Hi padmalatha,

It’s a problem of 04's Create an external library DC and use the external library DC in your project.

Just go through this links.

http://help.sap.com/saphelp_nw70/helpdata/EN/5a/2e2f4234135433e10000000a155106/frameset.htm

Regards,

Mithu

Former Member
0 Kudos

I added the Jar files by following the above procedure.........But when i Right click on the Local DC and select the option "Refresh from DC settings" the jar file is lost and if i deploy the application, im getting the error as "NoClassDefFoundError"

Please Help.

Regards,

Padmalatha.K

Former Member
0 Kudos

Hi

A NoClassDefFoundError is thrown when a classloader or the Java Virtual Machine tries to load a class and no definition of the class can be found. This could happen when using the new expression or during a normal method call. The reason this would occur at runtime is because the missing class definition existed when the currently executing class was compiled, but now that definition cannot be found.

So Try to add the JAR file agian and rebuild the project and then deploy.....

Regards

Chandran S

former_member197348
Active Contributor
0 Kudos

Hi Padmalatha,

Right Click on your DC.

Select Properties.

In the wizard select Java Build Path

Go to Libraries Tab (Opens by default)

Select the Ad External JARs button

Browse and select the jar file

You can create External DC and add to your DC as used DC.

You can use this [blog |https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2361] [original link is broken] [original link is broken] [original link is broken];to create external DC.

regards,

Siva