on 07-08-2009 9:21 AM
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.
> 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.