cancel
Showing results for 
Search instead for 
Did you mean: 

Problem In Deploying External Jars

Former Member
0 Kudos

I am using SAP NetWeaver 2004s Sp 09.I have to use external jar in my project .I followed the following steps:

1.Created a External Library DC and added the jars in its libraries folder.

2.Created two public parts api and sda .

3.Exposed the jars to the public part.

4.Created a J2EE Server Component Library DC and added the sda of external library Dc to its used DC.

5.Deployed the Library.

When I was using the library in my web Dc ,I followed the following steps:

1.Added the api in my web module DC

2.Added the run-time reference of the library in my EAR

but i found an exception "ClassNotFoundException".The application was unable to find the jar at runtime.So please help me out.

Accepted Solutions (0)

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

> 1.Created a External Library DC and added the jars in its libraries folder.

> 2.Created two public parts api and sda .

Here you have to create two PP: Compilation and Assembly one.

> 4.Created a J2EE Server Component Library DC and added the sda of external library Dc to its used DC.

This is not necessary. If you are not going to reuse the external JAR in other applications you should not create the J2EE Library.

> 5.Deployed the Library.

This is not necessary.

> When I was using the library in my web Dc ,I followed the following steps:

>

> 1.Added the api in my web module DC

Add both Compilation PP and Assembly PP to your web module DC. When you'll build the DC the external JAR will be included into output WAR.

> 2.Added the run-time reference of the library in my EAR

No run-time references are required.

> but i found an exception "ClassNotFoundException".The application was unable to find the jar at runtime.So please help me out.

That's because you compiled your DC with one JAR, but on run-time established a reference to another JAR. Follow my comments above to avoid this.

BR, Sergei