on 05-04-2006 12:37 PM
Hello!
I've created a Enterprise Application in NWDS consisting of 2 EJB-Modules and 1 Web Module.
Therefore I've created the appropriate projects in NWDS. After deployment to WEB AS the application worked fine.
Now I'm trying to outsource some global utility classes, that should be used by all modules. Therefore I created an additional Java project and the approriate classes and put it all together in one JAR. All references are set, build in NWDS works and the EAR file contains that JAR.
But after deployment, the application fails with a NoClassDefFoundError, when one of the modules tries to access those utility classes.
Does anybody has an idea, what went wrong?
Maybe, a project of type "J2EE Server Component -> Library" is the solution. But I haven't found any documentation about this.
Help is highly appreciated. Thanks in advance!
Regards,
Matthias
Hi Matthias,
Are you familiar with this /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro ?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mattihas,
I hope you must have added the jar file as an external jar. If not then follow these steps:
<b>Project-> Properties -> Java Build Path -> Add External Jar</b>
<a href="http://img207.imageshack.us/img207/2314/jar4om.jpg">Jar in Build Path</a>
After that include the .jar file in the lib folder of your project as well. See this pic for a clear idea.
<a href="http://img142.imageshack.us/img142/8168/solution4gy.jpg">.Jar in the lib folder</a>
I hope this should solve your problem.
Regards
Pravesh
PS: Please consider rewarding points if solved and helpful.
Pravesh,
thanks for your answer. According to your description, I've added a lib folder to the project's META-INF folder, and copied the jar to it. (I have no PORTAL-INF, because it's an EJB application). And it works!
The only problem is, that I have to publish changes in this lib manually to all module projects.
I tried also a second thing, that finally worked out as well (and I'm sure, that I tried it already before 😞
Within the properties of the EAR project, there is a page called "Archive Build Info". There you can specify libraries form other projects, that will be included during EAR generation. So this solution fits better for me.
Thank you all for your answers!!!
Cheers,
Matthias
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.