|
Re: Dependencies not deployed on TomCat [message #651072 is a reply to message #650993] |
Thu, 27 January 2011 11:20   |
Eclipse User |
|
|
|
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 #651229 is a reply to message #651210] |
Fri, 28 January 2011 08:18  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08566 seconds