Using exported jars from j2ee module dependency [message #193463] |
Tue, 29 May 2007 12:57 |
Eclipse User |
|
|
|
Originally posted by: pakulat.rostock.zgdv.de
Hi,
I've setup a simple java project (TagLib) for some .jar files that
should be shared among several dynamic web projects. I selected all
those jars for export in the project properties and building the dynamic
web projects which list TagLib as J2EE Module Dependecy works fine (they
use classes from the exported jars). However starting tomcat with these
Web Projects doesn't work, I get a NoClassDefFound exception as it can't
find any of the classes from the jars that are exported in TagLib.
If I look into the
..metadata/.plugins/org.eclipse.wst.server.core/tmp3/webapps /WebModule/WEB-INF/lib/TagLib.jar
file I know why: None of the .jar's are put into TagLib.jar and thus
they can't be found by the jre that starts tomcat.
Is there a way to solve this so that I don't have to add the jars to
each web project individually?
Andreas
|
|
|
|
|
|
|
Re: Using exported jars from j2ee module dependency [message #193588 is a reply to message #193494] |
Wed, 30 May 2007 08:37 |
Eclipse User |
|
|
|
Originally posted by: pakulat.rostock.zgdv.de
Andreas Pakulat schrieb:
> Konstantin Komissarchik wrote:
>
>> Andreas,
>>
>> Which version of WTP are you using? This should work on version 2.0, but
>> will not work on earlier releases.
>
> I'm using 1.5.4 currently. I'll see if I can do an update to 2.0 tomorrow.
Too bad, that needs eclipse 3.3 apparently which I can't use yet...
|
|
|
Re: Using exported jars from j2ee module dependency [message #194684 is a reply to message #193487] |
Tue, 19 June 2007 14:03 |
Eclipse User |
|
|
|
Originally posted by: pakulat.rostock.zgdv.de
Rob Frost schrieb:
> Assuming I'm interpreting your use case correctly (WEB-INF/lib dependency on
> a utility project that exports a set of library JARs), you need to ensure
> that the "publish/export" classpath entry attribute has been set for each of
> these JAR library cp entries (this will ensure that these JARs are packaged
> with the published/exported web module).
>
> You can do this via the "quick fix" on the warning that is generated for
> each regarding the potential for runtime class resolution issues (using the
> quick fix is necessary since the "J2EE Module Dependencies" UI is not
> supported for utility projects referenced only by a dynamic web project: see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=184094 for more information)
Installed Eclipse 3.3 rc and Webtools rc as well. But I don't see any
warnings that could help here. Let me explain again:
I have project TagLib, which has a few classes (which are properly
exported) and a few jars in it. The jars contain base classes for the
classes in this project. And to ease the use of this TagLib project in
various web applications its a utility module. Now as I said the .jars
inside this utility project are not exported even though I selected them
for importing, this of course creates a problem when using the module in
a webapp.
So what exact warning should I see or what else do I have to do to
resolve this?
Andreas
|
|
|
|
Powered by
FUDForum. Page generated in 0.04165 seconds