Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Eclipse Helios Deployment Assembly not working for Webapps(Classpath not working right for dependent projects)
Eclipse Helios Deployment Assembly not working for Webapps [message #739581] Mon, 17 October 2011 16:16 Go to next message
Bruno Melloni is currently offline Bruno MelloniFriend
Messages: 12
Registered: July 2009
Junior Member
Since I moved to Eclipse Helios (from Ganymede) I have not been able to run/debug webapps successfully from within Eclipse. Classes from dependent projects throw the infamous ClassNotFoundException, even after adding the projects to the Deployment Assembly.

I could manually JAR the dependent projects and deploy them in WEB-INF/lib or deploy everything to Tomcat by hand... but that defeats the purpose. Previous versions allowed us to do quite painlessly.

Clearly, Helios requires "something else" besides defining dependent projects in the Deployment Assembly, but I can't seem to find what. Any suggestions?

I am running Eclipse Helios, Java 6, Servlet 2.4 (old webapp), Tomcat 6.

[Updated on: Mon, 17 October 2011 18:10]

Report message to a moderator

Re: Eclipse Helios Deployment Assembly not working for Webapps [message #739742 is a reply to message #739581] Mon, 17 October 2011 20:10 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 10/17/2011 12:16 PM, Bruno Melloni wrote:
> Since I moved to Eclipse Helios (from Ganymede) I have not been able to
> run/debug webapps successfully from within Eclipse. Classes from
> dependent projects throw the infamous ClassNotFoundException, even after
> adding the projects to the Deployment Assembly.
>
> I could manually JAR the dependent projects and deploy them in
> WEB-INF/lib or deploy everything to Tomcat by hand... but that defeats
> the purpose. Previous versions allowed us to do quite painlessly.
>
> Clearly, Helios requires "something else" besides defining dependent
> projects in the Deployment Assembly, but I can't seem to find what. Any
> suggestions?
>
> I am running Eclipse Helios, Java 6, Servlet 2.4 (old webapp), Tomcat 6.

Try right-clicking on the server in the Servers view and select
"Clean..." to force a full publish. See if that helps. Out of
curiosity, is this a new Helios workspace with brand new projects that
is not working? If not, did you open the Ganymede workspace with Helios
or did you import projects into a new Helios workspace?

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #740558 is a reply to message #739742] Tue, 18 October 2011 16:37 Go to previous messageGo to next message
Bruno Melloni is currently offline Bruno MelloniFriend
Messages: 12
Registered: July 2009
Junior Member
Brand new workspace (I learned years ago to not port projects between Eclipse versions - only source code). I have forced full publishes.

This problem seems to be something introduced with Helios. I've seen many people reporting it and even a couple band-aids (like not relying on Eclipse and putting exported dependencies into WEB-INF/lib), but I have not seen a proper solution.
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #741363 is a reply to message #740558] Wed, 19 October 2011 13:07 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 10/18/2011 12:37 PM, Bruno Melloni wrote:
> Brand new workspace (I learned years ago to not port projects between
> Eclipse versions - only source code). I have forced full publishes.
>
> This problem seems to be something introduced with Helios. I've seen
> many people reporting it and even a couple band-aids (like not relying
> on Eclipse and putting exported dependencies into WEB-INF/lib), but I
> have not seen a proper solution.

I have interacted with a number of people who have reported this. So
far, each time the interaction has come to a stop prior to determining a
cause. I assume things mysteriously started working. Thus the problem
and the solution has yet to be found for when this behavior occurs.

Just to be sure, does the forced full publishes get everything
published? If so, does the normal non-forced publishes fail to publish
still fail to publish the updates? Finally, is there anything in the
Error Log view that seems related?

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #755593 is a reply to message #741363] Tue, 08 November 2011 21:40 Go to previous messageGo to next message
Bruno Melloni is currently offline Bruno MelloniFriend
Messages: 12
Registered: July 2009
Junior Member
Larry Isaacs wrote on Wed, 19 October 2011 09:07
On 10/18/2011 12:37 PM, Bruno Melloni wrote:
(snip)

I have interacted with a number of people who have reported this. So
far, each time the interaction has come to a stop prior to determining a
cause. I assume things mysteriously started working.

Not necessarily. Many, like me, might be just giving up and going back to Ganymede - where things worked quite smoothly.

In my own case I am getting annoyed enough at this garbage to consider a return to Netbeans. I rely heavily on project dependencies and I don't have the time to waste on an IDE that can't handle it without jumping through hoops.

For those still struggling and determined to use Helios, I found a couple things that make life slightly better: (1) add every single dependent project to both the project dependencies and the deployment assembly and (b) use Tomcat 7 - NOT Tomcat 6. This doesn't solve all the problems but it is a step in the right direction.

Still, the real fix is to return to Ganymede + Tomcat 6. That setup is pretty much fool-proof.
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #755758 is a reply to message #755593] Wed, 09 November 2011 13:57 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 11/8/2011 4:40 PM, Bruno Melloni wrote:
> Larry Isaacs wrote on Wed, 19 October 2011 09:07
>> On 10/18/2011 12:37 PM, Bruno Melloni wrote:
>> (snip)
>>
>> I have interacted with a number of people who have reported this. So
>> far, each time the interaction has come to a stop prior to determining
>> a cause. I assume things mysteriously started working.
>
> Not necessarily. Many, like me, might be just giving up and going back
> to Ganymede - where things worked quite smoothly.
> In my own case I am getting annoyed enough at this garbage to consider a
> return to Netbeans. I rely heavily on project dependencies and I don't
> have the time to waste on an IDE that can't handle it without jumping
> through hoops.
>
> For those still struggling and determined to use Helios, I found a
> couple things that make life slightly better: (1) add every single
> dependent project to both the project dependencies and the deployment
> assembly and (b) use Tomcat 7 - NOT Tomcat 6. This doesn't solve all the
> problems but it is a step in the right direction.
>
> Still, the real fix is to return to Ganymede + Tomcat 6. That setup is
> pretty much fool-proof.

If you, or someone else experiencing this issue, is willing to invest
some time, I will try to help determine the cause. I've been unable to
duplicate this problem, so I will need to work with someone to gather
clues about why this happens.

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #789241 is a reply to message #755758] Thu, 02 February 2012 19:24 Go to previous messageGo to next message
Bruno Eberhard is currently offline Bruno EberhardFriend
Messages: 4
Registered: February 2012
Location: Switzerland
Junior Member
Same problem with SpringSource Tools 2.9.0.M1 (Eclipse 3.7.1). Dependency doesnt work with J2EE Preview Server but does work with VMware vFabric tc Server. But startup of vFabric tc Server is far too slow.

My quick hack solution is to export the project as .jar to to WEB-INF/lib directory. Does the trick as long as you have not too many changes in other projects.

BTW: When you export the project with the dependency the other projects are included in the .war file correctly.

[Updated on: Thu, 02 February 2012 19:27]

Report message to a moderator

Re: Eclipse Helios Deployment Assembly not working for Webapps [message #789253 is a reply to message #755758] Thu, 02 February 2012 19:37 Go to previous messageGo to next message
Bruno Melloni is currently offline Bruno MelloniFriend
Messages: 12
Registered: July 2009
Junior Member
Larry Isaacs wrote on Wed, 09 November 2011 08:57

If you, or someone else experiencing this issue, is willing to invest
some time, I will try to help determine the cause. I've been unable to
duplicate this problem, so I will need to work with someone to gather
clues about why this happens.

Cheers,
Larry

I have been extremely tied up but I foresee having time to focus on this over the next week or so.

I also have setup a Java7/EclipseIndigo environment where I can work on this issue with no concern over hurting my normal work.

If the offer is still on, I volunteer myself as guinea pig.

Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792436 is a reply to message #789253] Tue, 07 February 2012 01:42 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 2/2/2012 2:37 PM, Bruno Melloni wrote:
> Larry Isaacs wrote on Wed, 09 November 2011 08:57
>> If you, or someone else experiencing this issue, is willing to invest
>> some time, I will try to help determine the cause. I've been unable to
>> duplicate this problem, so I will need to work with someone to gather
>> clues about why this happens.
>>
>> Cheers,
>> Larry
>
> I have been extremely tied up but I foresee having time to focus on this
> over the next week or so.
> I also have setup a Java7/EclipseIndigo environment where I can work on
> this issue with no concern over hurting my normal work.
>
> If the offer is still on, I volunteer myself as guinea pig.
>
>

Hi Bruno,

Since it seems to reliably not work for you, if you can create a simple
pair of projects (web and utility) that exhibit this problem, it would
worthwhile to open a bug and attach a zip with the projects to the bug.
The Product would be "WTP ServerTools" and the Component "jst.server".
Preferably this would be projects that only require the Eclipse Java
EE Developers package to run. If more is required, please list what
else is needed. This would allow me to check and see if there is
something different about your projects and the projects that work for
me. If this doesn't seem feasible, then we'll come up with another
approach.

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792437 is a reply to message #789241] Tue, 07 February 2012 01:42 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 2/2/2012 2:24 PM, Bruno Eberhard wrote:
> Same problem with SpringSource Tools 2.9.0.M1 (Eclipse 3.7.1).
> Dependency doesnt work with J2EE Preview Server but does work with
> VMware vFabric tc Server. But startup of vFabric tc Server is far too slow.
>
> My quick hack solution is to export a project as .jar to to WEB-INF/lib
> directory. Does the trick as long as you have not too many changes in
> other projects.

I believe SpringSource Tools 2.9.0.M2 is out. I'll try to find time to
give it a try and see if I can duplicate this problem. It would help if
you could also try 2.9.0.M2 and confirm you are still seeing the issue
with your projects in case my simple test doesn't expose the issue.

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792632 is a reply to message #792436] Tue, 07 February 2012 08:04 Go to previous messageGo to next message
Bruno Eberhard is currently offline Bruno EberhardFriend
Messages: 4
Registered: February 2012
Location: Switzerland
Junior Member
Hi Larry,

I've created the two projects and could reproduce the effect. I don't fully understand what you mean with the described Product and Component name, but I hope the two zip-files will do for you. In the working version I've exported the helper project to the lib directory of the web proejct. In the not working version this hast not be done and the dependency should work with the Deployment Assembly settings.

Bruno
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792644 is a reply to message #792437] Tue, 07 February 2012 08:22 Go to previous messageGo to next message
Bruno Eberhard is currently offline Bruno EberhardFriend
Messages: 4
Registered: February 2012
Location: Switzerland
Junior Member
Downloaded and installed SpringSource Tools 2.9.0.M2. Everything stays the same, dependency still not working.
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792873 is a reply to message #792436] Tue, 07 February 2012 14:14 Go to previous messageGo to next message
Bruno Melloni is currently offline Bruno MelloniFriend
Messages: 12
Registered: July 2009
Junior Member
Larry Isaacs wrote on Mon, 06 February 2012 20:42
On 2/2/2012 2:37 PM, Bruno Melloni wrote:
> Larry Isaacs wrote on Wed, 09 November 2011 08:57
>> If you, or someone else experiencing this issue, is willing to invest
>> some time, I will try to help determine the cause. I've been unable to
>> duplicate this problem, so I will need to work with someone to gather
>> clues about why this happens.
>>
>> Cheers,
>> Larry
>
> I have been extremely tied up but I foresee having time to focus on this
> over the next week or so.
> I also have setup a Java7/EclipseIndigo environment where I can work on
> this issue with no concern over hurting my normal work.
>
> If the offer is still on, I volunteer myself as guinea pig.
>
>

Hi Bruno,

Since it seems to reliably not work for you, if you can create a simple
pair of projects (web and utility) that exhibit this problem, it would
worthwhile to open a bug and attach a zip with the projects to the bug.
The Product would be "WTP ServerTools" and the Component "jst.server".
Preferably this would be projects that only require the Eclipse Java
EE Developers package to run. If more is required, please list what
else is needed. This would allow me to check and see if there is
something different about your projects and the projects that work for
me. If this doesn't seem feasible, then we'll come up with another
approach.

Cheers,
Larry


It seems that the other Bruno beat me to it. I am back to being fully busy right now but I should get freed up in a few days. If still needed then I will make the sample projects in Indigo. They will be vanilla JEE plus Spring, one web project and two regular. They will demonstrate how a regular project can easily load classes and spring context files from the others in both Eclipse and web server, and how the web project does too when run directly on the server or from Eclipse Ganymede - while failing when run from Eclipse Helios or Indigo.
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792874 is a reply to message #792632] Tue, 07 February 2012 14:11 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 2/7/2012 3:04 AM, Bruno Eberhard wrote:
> Hi Larry,
>
> I've created the two projects and could reproduce the effect. I don't fully understand what you mean with the described Product and Component name, but I hope the two zip-files will do for you. In the working version I've exported the helper project to the lib directory of the web proejct. In the not working version this hast not be done and the dependency should work with the Deployment Assembly settings.
>
> Bruno

Oops, I forgot that as an Eclipse committer you will see different UI in
Bugzilla when creating bugs than I will. You can start here:
https://bugs.eclipse.org/bugs/. Once you have an account and have
logged in, click "File a Bug". You will then click "Other projects".
Very near the bottom of the page, select the Product by clicking "WTP
ServerTools". You can skip Step 1 since you are providing a zip and
need a new bug. In Step 2, select "jst.server" for the Component and
provide a Summary and brief Description. Then create the Bug in Step 3.
I'm not sure what you will see next, but hopefully is the bug report
page where you will be able to add an attachment for your zip. It is
best if you create the bug so you will be logged as the reporter. Post
here with the bug number and I will assign the bug to me and try out
your zip.

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792875 is a reply to message #792644] Tue, 07 February 2012 14:13 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
On 2/7/2012 3:22 AM, Bruno Eberhard wrote:
> Downloaded and installed SpringSource Tools 2.9.0.M2. Everything stays
> the same, dependency still not working.

Thanks. I'll give it a try, probably today or tomorrow.

Cheers,
Larry
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #792931 is a reply to message #792873] Tue, 07 February 2012 15:28 Go to previous messageGo to next message
Bruno Eberhard is currently offline Bruno EberhardFriend
Messages: 4
Registered: February 2012
Location: Switzerland
Junior Member
bug 370839 created
Re: Eclipse Helios Deployment Assembly not working for Webapps [message #797724 is a reply to message #792874] Mon, 13 February 2012 21:01 Go to previous message
Bruno Melloni is currently offline Bruno MelloniFriend
Messages: 12
Registered: July 2009
Junior Member
I think I found a solution. It is probably inefficient and overkill, but I just got it to work on Indigo, with Java 7, Tomcat 7, and using the "Dynamic Web Module" version 3.0.

I will have to do more testing using Java 6, Tomcat 7 and Dynamic Web Module version 2.4... our current deployment environment.

The key elements in the solution were:

1) I had a TestWeb and a TestUtility applications. Dynamic Web Project and Java EE Utility Project respectively. They both had Spring Context files.

2) In TestWeb I added TestUtility to both the Java Build Path and the Deployment Assembly.

3) In the TestWeb context I made sure to (a) have an import statement and (b) make sure the import statement used the format:

<import resource="classpath*:TestUtilityContext.xml" />


The "classpath*:" was the critical bit. In Ganymede you didn't need it and yet TestUtilityContext.xml would be found in the classpath. In Helios and Indigo that is no longer so.

My guess is that the standard became more rigid in the newer version and that Eclipse simply followed it.

[Updated on: Mon, 13 February 2012 21:03]

Report message to a moderator

Previous Topic:[eclipse 3.6 WPE] How to control the display order of the category in the Properties view.
Next Topic:How to install org.eclipse.wst.sse.core component?
Goto Forum:
  


Current Time: Fri Nov 28 11:33:25 GMT 2014

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

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