Home » Language IDEs » ServerTools (WTP) » I200511162235 - Problem adding additional modules to web project
| |
Re: I200511162235 - Problem adding additional modules to web project [message #148493 is a reply to message #148484] |
Wed, 23 November 2005 13:35 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Russell Dodd![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=Russell.Dodd%40scisys.co.uk) Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Darryl L. Miles wrote:
> Russell Dodd wrote:
>
>>
>> Using latest build I200511162335.
>>
>> I have a dynamic web project A that I created with dependencies on
>> project B and C. When I published it to Tomcat 5.5 on my localhost,
>> everything seemed to be working ok.
>>
>> However, I know wish to add another (pre-existing) project D to the
>> list of dependencies, but do not seem to be able to get the project to
>> be published. As far as I can tell, I have done everything possible to
>> turn project D into a modules that can be published on Tomcat, this
>> includes manually hacking some of the config files so that they
>> copy/resemble the config files in projects B and C, but this has not
>> been successful.
>>
>> Two questions:
>>
>> 1. Is this a known problem that is being worked upon?
>>
>> 2. Is there any way that I can manually hack/force project D to be
>> acceptable as a publishable module (upon which project A depends)?
>
>
> How did you add Project D into the list of dependancies ? which
> dependancies was it added to Classpath dependancies or J2EE dependancies ?
>
> Does it show up if you remove the web-app from the Tomcat Server Runtime
> and delete the Tomcat Server Runtime. Then re-create ithe runtime and
> added web-app's from scratch ?
>
> Darryl
Project D was added to the classpath dependencies. I have just double-checked, but it is no longer (not sure if
it was in the first place) available to add as a J2EE Module Dependency in the web library section (although my
projects E, F and G are!)
Previously, I have tried removing the web-app from the Tomcat Server Runtime and re-adding it with no luck. I
have just tried the same again, but deleted the Tomcat server in the middle of the process and re-created a new
one, but this did not make any difference. Project D did not show up as a module under project A (B and C are
still there) which was published on the server.
If I could speculate, it would be to say that because I did not add the module as a J2EE dependency, but as a
classpath one, it has 'half-mutated' to a web module. It can no longer be recognized as a full J2EE web module
for inclusion in publishing to the server, or as a standard Java project ripe for conversion to a web module.
Don't know if that makes sense in any way - that's just the way it seems to be working.
Rus.
|
|
|
Re: I200511162235 - Problem adding additional modules to web project [message #148533 is a reply to message #148493] |
Wed, 23 November 2005 16:15 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Darryl Miles![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=darryl%40netbauds.net) Messages: 123 Registered: July 2009 |
Senior Member |
|
|
Russell Dodd wrote:
> Darryl L. Miles wrote:
>
>> Russell Dodd wrote:
>>
>>>
>>> Using latest build I200511162335.
>>>
>>> I have a dynamic web project A that I created with dependencies on
>>> project B and C. When I published it to Tomcat 5.5 on my localhost,
>>> everything seemed to be working ok.
>>>
>>> However, I know wish to add another (pre-existing) project D to the
>>> list of dependencies, but do not seem to be able to get the project
>>> to be published. As far as I can tell, I have done everything
>>> possible to turn project D into a modules that can be published on
>>> Tomcat, this includes manually hacking some of the config files so
>>> that they copy/resemble the config files in projects B and C, but
>>> this has not been successful.
>>>
>>> Two questions:
>>>
>>> 1. Is this a known problem that is being worked upon?
>>>
>>> 2. Is there any way that I can manually hack/force project D to be
>>> acceptable as a publishable module (upon which project A depends)?
>>
>>
>>
>> How did you add Project D into the list of dependancies ? which
>> dependancies was it added to Classpath dependancies or J2EE
>> dependancies ?
>>
>> Does it show up if you remove the web-app from the Tomcat Server
>> Runtime and delete the Tomcat Server Runtime. Then re-create ithe
>> runtime and added web-app's from scratch ?
>>
>> Darryl
>
>
>
> Project D was added to the classpath dependencies. I have just
> double-checked, but it is no longer (not sure if it was in the first
> place) available to add as a J2EE Module Dependency in the web library
> section (although my projects E, F and G are!)
Okay in the Project D. Goto Properties -> Server, what is the project
description ?
The problem maybe that Project D is being detected as the wrong project
type, not as a J2EE Utility Jar project. This is why it does not show
up in J2EE Dependancies.
Please confirm what the contents of the Project D facet file is:
workspace/ProjectD/.settings/org.eclipse.wst.common.project. facet.core.xml
Please confirm what the "fgrep wb-module ProjectD/.settings/.component"
reports, there should be ONE module per project now. I've only seen an
incorrectly reported J2EE project type due to having multiple modules
per project setup.
I have written a 0.7.1 to M9 manual upgrade crib sheet for just this
problem, I have held off publishing it as I dont wish to alarm users
upgrading that problems may occur. But ths crib sheet at least can give
someone an idea of what to check and look for and how to fix their
eclipse config files manually.
> Previously, I have tried removing the web-app from the Tomcat Server
> Runtime and re-adding it with no luck. I have just tried the same again,
> but deleted the Tomcat server in the middle of the process and
> re-created a new one, but this did not make any difference. Project D
> did not show up as a module under project A (B and C are still there)
> which was published on the server.
Now you've said Project D does not show up in J2EE Dependaices, this
points to a different problem to the one I'm thinking of.
> If I could speculate, it would be to say that because I did not add the
> module as a J2EE dependency, but as a classpath one, it has
> 'half-mutated' to a web module. It can no longer be recognized as a full
> J2EE web module for inclusion in publishing to the server, or as a
> standard Java project ripe for conversion to a web module. Don't know if
> that makes sense in any way - that's just the way it seems to be working.
Class path dependacies (as I see them) are dependancies that a project
needs but it does not provide itself. Its expects the runtime to
provide them, so they are never put into a deployable unit (like a WAR
and have no place in WEB-INF/lib).
J2EE Dependancies are what you need.
Please take a look at my comments in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=116856 on this confusing
issue with container based class paths.
Darryl
|
|
|
Re: I200511162235 - Problem adding additional modules to web project [message #148549 is a reply to message #148533] |
Wed, 23 November 2005 16:40 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Russell Dodd![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=Russell.Dodd%40scisys.co.uk) Messages: 27 Registered: July 2009 |
Junior Member |
|
|
>
>
> Okay in the Project D. Goto Properties -> Server, what is the project
> description ?
'This project cannot be deployed to a server.'
>
> The problem maybe that Project D is being detected as the wrong project
> type, not as a J2EE Utility Jar project. This is why it does not show
> up in J2EE Dependancies.
>
>
> Please confirm what the contents of the Project D facet file is:
>
> workspace/ProjectD/.settings/org.eclipse.wst.common.project. facet.core.xml
Paste:
<faceted-project>
<fixed facet="jst.java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.java" version="1.4"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>
>
>
> Please confirm what the "fgrep wb-module ProjectD/.settings/.component"
> reports, there should be ONE module per project now. I've only seen an
> incorrectly reported J2EE project type due to having multiple modules
> per project setup.
I'll paste the contents of the .component file for you:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId">
<wb-module deploy-name="ProjectD">
<wb-resource deploy-path="/" source-path="/src"/>
</wb-module>
</project-modules>
As I recall, this file is one of the ones I manually hacked earlier in order to try and force it to be
recognized as a J2EE web module (after I had already tried various other options). I had copied it from ProjectB.
>
>
> I have written a 0.7.1 to M9 manual upgrade crib sheet for just this
> problem, I have held off publishing it as I dont wish to alarm users
> upgrading that problems may occur. But ths crib sheet at least can give
> someone an idea of what to check and look for and how to fix their
> eclipse config files manually.
>
>
>
>> Previously, I have tried removing the web-app from the Tomcat Server
>> Runtime and re-adding it with no luck. I have just tried the same
>> again, but deleted the Tomcat server in the middle of the process and
>> re-created a new one, but this did not make any difference. Project D
>> did not show up as a module under project A (B and C are still there)
>> which was published on the server.
>
>
> Now you've said Project D does not show up in J2EE Dependaices, this
> points to a different problem to the one I'm thinking of.
Sorry! :-(
>
>
>> If I could speculate, it would be to say that because I did not add
>> the module as a J2EE dependency, but as a classpath one, it has
>> 'half-mutated' to a web module. It can no longer be recognized as a
>> full J2EE web module for inclusion in publishing to the server, or as
>> a standard Java project ripe for conversion to a web module. Don't
>> know if that makes sense in any way - that's just the way it seems to
>> be working.
>
>
> Class path dependacies (as I see them) are dependancies that a project
> needs but it does not provide itself. Its expects the runtime to
> provide them, so they are never put into a deployable unit (like a WAR
> and have no place in WEB-INF/lib).
>
> J2EE Dependancies are what you need.
OK, fair enough. The problem is that project D does not now show up in my list of Web libraries for project A,
so I ether need a way to get WTP to re-accept project D as a potential web library/module or possibly some other
advice on the best way to proceed. Either way, (and I accept that the builds I am using are not 'release'
versions) WTP has got a bit confused over the status of Project D, and it might be worthwhile knowing how that
status is determined.
>
> Please take a look at my comments in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=116856 on this confusing
> issue with container based class paths.
>
>
> Darryl
It is confusing, but slowly becoming clearer :-)
Rus.
|
|
| | | | | |
Re: I200511162235 - Problem adding additional modules to web project [message #148838 is a reply to message #148782] |
Thu, 24 November 2005 08:08 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Russell Dodd![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=Russell.Dodd%40scisys.co.uk) Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Darryl L. Miles wrote:
> Russell Dodd wrote:
>
>> Skip to the BINGO! section below -
>>
>>
>>
>> Ahhh - BINGO !!!
>>
>> Once I remove the .runtime file, and refresh ProjectD, WTP now appears
>> to regard it as a web module. I can deploy it to the server, etc, etc.
>
>
>
> Can I/we open a bug report to describe this problem ?
>
Yes, of course! It might be easier/quicker for you to create the bug report as I have not created one before.
>
> "Workspace upgraded to M9, project type incorrectly detection due to
> .runtime existance"
>
> I loaded my workspace into I20041116xxxx which I had previously used
> with version 0.7.1 so my workspace was automatically upgraded.
>
> However some of my J2EE Utility Jar (jst.utility 1.0) projects were not
> being detected as that project type by the J2EE / Server components.
>
> blah blah....
>
> For me I had to remove the .runtime file that existed in the J2EE
> utility JAR project, I believe this information is now stored as a
> project facet and does not actually need to exist in a utility project
> only a deployable dynamic web project.
>
> blah blah....
>
>
>
>>> Some of my projects (both jst.web and jst.utility) have .runtime
>>> files this does not affect project type detection for me.
>>>
>>
>> It does appear as though that was the case for me, so it might be
>> worth remembering.
>
>
> Hmm.. why does not problem not affect me ? I really do have .runtime
> files in utility projects and those projects still show up in my J2EE
> dependancies in the same version of WTP as you are using.
>
> In your case there must be some other contibuting factor.
>
> Are all your projects inside your $HOME/workspace area or are they
> attached from outside ? I ask this off the cuff as I've witness
> problems with projects outside the $HOME/workspace area being treated
> differently.
>
>
> Darryl
All the projects are in my workspace area under my eclipse directory.
My Projects B & C also have the .runtime files in place, and it does not stop them becoming recognized as web
library modules - just for ProjectD.
I suspect that maybe because I created ProjectD as a classpath dependency for ProjectA (possibly whilst ProjectA
was still running on Tomcat) and failed to see ProjectD become a web library module under ProjectA, I assumed
that the 'I' build of the software was a bit flaky and had failed in it's task. The fact that I then proceeded
to try hacking ProjectD into becoming a web library model may have made the situation worse (although I did try
playing around with project properties, etc before I starting hacking the config files directly).
I guess there is no central property for a project that says for definite what type it is?
Rus.
|
|
| |
Goto Forum:
Current Time: Fri Aug 30 00:04:03 GMT 2024
Powered by FUDForum. Page generated in 0.04305 seconds
|