Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Problems with project references
Problems with project references [message #161601] Wed, 22 February 2006 07:20 Go to next message
Eclipse UserFriend
Originally posted by: reinhard.apache.org

I set up two projects, one is called "myFramework" and the other one
"MyWebProject". I added "myFramework" as required project in Java Build
Path/Projects. This makes a servlet in "MyWebProject" compile which references
one of the classes in "myFramework".

The problem now is that this project reference isn't used when the project is
deployed into a server (I'm using Tomcat 5.5). I've activated the reference to
"myFramework" in J2EE Module Dependencies and in Project References within the
properties of "MyWebProject". I don't want to copy the myFramework library into
the MyWebProject classpath as this is a hack IMHO as I want the context
MyWebProject getting reloaded whenever something in myFramework or MyWebApp gets
changed.

Am I doing something wrong or is it a bug? I'm using the WTP 1.0 release.

Reinhard
Re: Problems with project references [message #161717 is a reply to message #161601] Thu, 23 February 2006 01:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: reinhard.apache.org

Reinhard Pötz wrote:
> I set up two projects, one is called "myFramework" and the other one
> "MyWebProject". I added "myFramework" as required project in Java Build
> Path/Projects. This makes a servlet in "MyWebProject" compile which
> references one of the classes in "myFramework".
>
> The problem now is that this project reference isn't used when the
> project is deployed into a server (I'm using Tomcat 5.5). I've activated
> the reference to "myFramework" in J2EE Module Dependencies and in
> Project References within the properties of "MyWebProject". I don't want
> to copy the myFramework library into the MyWebProject classpath as this
> is a hack IMHO as I want the context MyWebProject getting reloaded
> whenever something in myFramework or MyWebApp gets changed.
>
> Am I doing something wrong or is it a bug? I'm using the WTP 1.0 release.

What I forgot to mention: The problem manifests in a "NoClassDefFoundError"
thrown by the JVM that runs Tomcat.

Reinhard
Re: Problems with project references [message #161736 is a reply to message #161717] Thu, 23 February 2006 09:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

You need to indicate which projects are to be deployed in addition to
your "root" (web) project. Do this as follows:
- select the web project in the explorer
- right-click and select the project's properties
- Select "J2EE Module Dependencies" in the left-hand pane
- Select the projects that need to be deployed also.

This at least works some of the time. If it does not work redeploy to
your server or remove and add back the project. Please note that
deployment is very buggy currently (at least with the Tomcat 5.5 server
I use) so remember to redeploy if you notice that the server does not
pick up your changes.

I don't know why this separate page was needed and why it is not
prepopulated with the project's build path but...

Good luck,
Frits

Reinhard Pötz wrote:
> Reinhard Pötz wrote:
>> I set up two projects, one is called "myFramework" and the other one
>> "MyWebProject". I added "myFramework" as required project in Java
>> Build Path/Projects. This makes a servlet in "MyWebProject" compile
>> which references one of the classes in "myFramework".
>>
>> The problem now is that this project reference isn't used when the
>> project is deployed into a server (I'm using Tomcat 5.5). I've
>> activated the reference to "myFramework" in J2EE Module Dependencies
>> and in Project References within the properties of "MyWebProject". I
>> don't want to copy the myFramework library into the MyWebProject
>> classpath as this is a hack IMHO as I want the context MyWebProject
>> getting reloaded whenever something in myFramework or MyWebApp gets
>> changed.
>>
>> Am I doing something wrong or is it a bug? I'm using the WTP 1.0 release.
>
> What I forgot to mention: The problem manifests in a
> "NoClassDefFoundError" thrown by the JVM that runs Tomcat.
>
> Reinhard
Re: Problems with project references [message #161879 is a reply to message #161736] Fri, 24 February 2006 03:29 Go to previous message
Eclipse UserFriend
Originally posted by: reinhard.apache.org

Frits,

Many thanks for your answer! Indeed, redeployment with Tomcat 5.5 is buggy and
doesn't work for me, but I got the dependencies deployed for the first time. The
difference now is that I converted my framework project into a J2EE project as
it was a normal "Java project" before.

Reinhard

Frits Jalvingh wrote:
> Hi,
>
> You need to indicate which projects are to be deployed in addition to
> your "root" (web) project. Do this as follows:
> - select the web project in the explorer
> - right-click and select the project's properties
> - Select "J2EE Module Dependencies" in the left-hand pane
> - Select the projects that need to be deployed also.
>
> This at least works some of the time. If it does not work redeploy to
> your server or remove and add back the project. Please note that
> deployment is very buggy currently (at least with the Tomcat 5.5 server
> I use) so remember to redeploy if you notice that the server does not
> pick up your changes.
>
> I don't know why this separate page was needed and why it is not
> prepopulated with the project's build path but...
>
> Good luck,
> Frits
>
> Reinhard Pötz wrote:
>
>> Reinhard Pötz wrote:
>>
>>> I set up two projects, one is called "myFramework" and the other one
>>> "MyWebProject". I added "myFramework" as required project in Java
>>> Build Path/Projects. This makes a servlet in "MyWebProject" compile
>>> which references one of the classes in "myFramework".
>>>
>>> The problem now is that this project reference isn't used when the
>>> project is deployed into a server (I'm using Tomcat 5.5). I've
>>> activated the reference to "myFramework" in J2EE Module Dependencies
>>> and in Project References within the properties of "MyWebProject". I
>>> don't want to copy the myFramework library into the MyWebProject
>>> classpath as this is a hack IMHO as I want the context MyWebProject
>>> getting reloaded whenever something in myFramework or MyWebApp gets
>>> changed.
>>>
>>> Am I doing something wrong or is it a bug? I'm using the WTP 1.0
>>> release.
>>
>>
>> What I forgot to mention: The problem manifests in a
>> "NoClassDefFoundError" thrown by the JVM that runs Tomcat.
>>
>> Reinhard
Previous Topic:Opportunity for Early Testers: WTP 101 testUpdates site
Next Topic:WTP refactoring information
Goto Forum:
  


Current Time: Wed Mar 26 00:52:59 EDT 2025

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

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

Back to the top