Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Dependencies not deployed on TomCat(JARs for Eclipse projects used in web project are missing after TomCat deployment)
Dependencies not deployed on TomCat [message #650993] Thu, 27 January 2011 12:11 Go to next message
TSchoeftner is currently offline TSchoeftnerFriend
Messages: 5
Registered: December 2010
Junior Member
Hi everyone,

I'm currently experiencing persistent problems related to Eclipse and WTP.

Scenario:
I have a dynamic webapp project with dependencies to multiple other Eclipse projects.

When I select the webapp project to "run on server" on my TomCat (v6.0.30), the webapp gets deployed (still ok).

During startup, however, TomCat complains that it cannot find any class file from the other projects (outside the webapp). -> ClassNotFoundException

The WEB-INF/lib folder contains all the dependencies (including transitive dependencies) of the web project and the associated Eclipse projects, but the JARs for the Eclipse projects themselves are missing. Sad


I should also mention that the Eclipse projects are created from Maven POMs. (tried both ways: mvn eclipse:eclipse and M2Eclipse plugin - no difference)
I'm not an WTP expert, but I hardly believe this is a Maven-import issue, because sometimes - extremely rarely and very upredictably - the imported webapp-project successfully starts om TomCat?!?!

BTW, I'm running WinXP and I'm now using the latest Eclipse EE 3.6.1 but I have alread had this problem with older Eclipse versions...

Thanks for any help!
-Tom
Re: Dependencies not deployed on TomCat [message #651072 is a reply to message #650993] Thu, 27 January 2011 16:20 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 1/27/2011 7:11 AM, Tom wrote:
> Hi everyone,
>
> I'm currently experiencing persistent problems related to Eclipse and WTP.
>
> Scenario:
> I have a dynamic webapp project with dependencies to multiple other
> Eclipse projects.
> When I select the webapp project to "run on server" on my TomCat
> (v6.0.30), the webapp gets deployed (still ok).
>
> During startup, however, TomCat complains that it cannot find any class
> file from the other projects (outside the webapp). ->
> ClassNotFoundException
>
> The WEB-INF/lib folder contains all the dependencies (including
> transitive dependencies) of the web project and the associated Eclipse
> projects, but the JARs for the Eclipse projects themselves are missing. :(
>
> I should also mention that the Eclipse projects are created from Maven
> POMs. (tried both ways: mvn eclipse:eclipse and M2Eclipse plugin - no
> difference)
> I'm not an WTP expert, but I hardly believe this is a Maven-import
> issue, because sometimes - extremely rarely and very upredictably - the
> imported webapp-project successfully starts om TomCat?!?!
>
> BTW, I'm running WinXP and I'm now using the latest Eclipse EE 3.6.1 but
> I have alread had this problem with older Eclipse versions...
>
> Thanks for any help!
> -Tom
>

If you open the webapp project's Properties dialog and go to the
Deployment Assembly page, do you see the dependent projects listed
there? If so, what are the Deploy Path and Source for these?

Cheers,
Larry
Re: Dependencies not deployed on TomCat [message #651210 is a reply to message #651072] Fri, 28 January 2011 11:26 Go to previous messageGo to next message
TSchoeftner is currently offline TSchoeftnerFriend
Messages: 5
Registered: December 2010
Junior Member
Larry,

thanks for getting back to me so quickly! Smile

The Deployment Assembly contains the dependencies as JAR files - not as Eclipse project dependencies.

If I explicitly remove the dependencies to the JAR-files and instead add dependencies to projects (being copied to WEB-INF/lib folder by Eclipse) in Deployment Assembly, the whole system starts up just fine... Surprised

This is actually pretty weird, because my Eclipse project files are generated from Maven POMs (mvn eclipse:eclipse). - These files are always identical, but sometimes TomCat is actually able to successfully start the app!?!

Larry, thanks for the hint towards the Deployment Assembly settings!
-Tom
Re: Dependencies not deployed on TomCat [message #651229 is a reply to message #651210] Fri, 28 January 2011 13:18 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 1/28/2011 6:26 AM, Tom wrote:
> Larry,
>
> thanks for getting back to me so quickly! :)
> The Deployment Assembly contains the dependencies as JAR files - not as
> Eclipse project dependencies.
>
> If I explicitly remove the dependencies to the JAR-files and instead add
> dependencies to projects (being copied to WEB-INF/lib folder by Eclipse)
> in Deployment Assembly, the whole system starts up just fine... :o
> This is actually pretty weird, because my Eclipse project files are
> generated from Maven POMs (mvn eclipse:eclipse). - These files are
> always identical, but sometimes TomCat is actually able to successfully
> start the app!?!
> Larry, thanks for the hint towards the Deployment Assembly settings!
> -Tom

Dependencies in a webapp project on other "utility" projects are assumed
to be "jar like" dependencies. The output artifacts from the Java
source folders are "assembled" into a jar and placed in the published
webapp's WEB-INF/lib. As long as maven isn't building into it's version
of the jar resources that WTP isn't aware of, the jar WTP "assembles"
should be fine.

Cheers,
Larry
Previous Topic:WSDL Editor -> RCP
Next Topic:Dynamic Web Project - Old files on Tomcat Server
Goto Forum:
  


Current Time: Sat Apr 20 05:10:46 GMT 2024

Powered by FUDForum. Page generated in 0.04328 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top