Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JSP save causes re-deployment and restart
JSP save causes re-deployment and restart [message #190152] Tue, 20 March 2007 07:12 Go to next message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Hello,

it'd be great if somebody could help me to understand what's going on
here...
I have a fairly large dynamic web project featuring some JSPs, a large
Java code base and lots of support libraries. The problem is, when I save
a JSP page WTP thinks it has to trigger a complete rebuild, republish and
server restart. Naturally this takes ages (and my box is fast).
I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
When I took up development a few weeks ago I used Exadel Studio Pro which
worked fine. JSP saving caused immediate replacement of the page only -
all happiness. Suddenly the behaviour changed; I'm not quite sure but it
may be after I added Struts support (from the Exadel plugin). Since then
I've tried the following:
- Uninstalled and re-installed the Exadel plugin
- Removed Struts support
- Removed the project from the server and added it again
- Deleted the server runtime and configured it again; deleted temp0
directories and publish.xml files several times
- Switched to another workspace and re-configured from scratch
- Re-installed Eclipse and used a new, clean workspace
- Got rid of the Exadel plugin and installed WTP 1.5.3 directly
- Starting Eclipse with and without option "-clean"
- Changed global preference settings and validation/builder settings in
the project preferences; disabled all validators
... all to no avail.

I have a separate test project with only one test JSP; even saving this
page restarts and republishes the other project (the big one) if the test
project is registered with the same server.

Maybe somebody can tell me what's going on behind the curtains. WTP seems
to have become confused somewhere, but I don't know where to look further.
I have taken a look at the config files but these are not
self-documenting. If you know the rules for the project rebuild, please
let me know where to look; I don't mind looking at the source code if I
only knew where to start.

This issue has been described previously in this group but nobody took the
trouble to reply. Sorry for posting it again - I'd be grateful for your
advice.

Thanks & regards, Leo
Re: JSP save causes re-deployment and restart [message #190168 is a reply to message #190152] Tue, 20 March 2007 09:40 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1304
Registered: July 2009
Senior Member
The problem is that is that no one really knows exactly what's "special"
about your Eclipse setup and workspace that's leading to this behavior.
I'm afraid I don't have any good guesses. If you are willing, I would
recommended installing or upgrading to the JST SDK to get source for the
org.eclipse.jst.server.tomcat.core plug-in, if you don't have the SDK
already. You could then create a new workspace and import this plug-in.
The next step would be to run that plug-in in a debug session and
under that debug session's workspace, import your project and see if you
can duplicate the problem. If so I can help with debugging to see if
more than just the changed JSP is being copied during the publish.
Maybe what is being published will provide a clue as to who's making
changes beyond the saved JSP. My only shot in the dark is that it
sounds like some builder in your project is making changes, perhaps
unnecessarily, that is triggering this behavior.

Cheers,
Larry

Leo wrote:
> Hello,
>
> it'd be great if somebody could help me to understand what's going on
> here...
> I have a fairly large dynamic web project featuring some JSPs, a large
> Java code base and lots of support libraries. The problem is, when I
> save a JSP page WTP thinks it has to trigger a complete rebuild,
> republish and server restart. Naturally this takes ages (and my box is
> fast).
> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
> When I took up development a few weeks ago I used Exadel Studio Pro
> which worked fine. JSP saving caused immediate replacement of the page
> only - all happiness. Suddenly the behaviour changed; I'm not quite sure
> but it may be after I added Struts support (from the Exadel plugin).
> Since then I've tried the following:
> - Uninstalled and re-installed the Exadel plugin
> - Removed Struts support
> - Removed the project from the server and added it again
> - Deleted the server runtime and configured it again; deleted temp0
> directories and publish.xml files several times
> - Switched to another workspace and re-configured from scratch
> - Re-installed Eclipse and used a new, clean workspace
> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
> - Starting Eclipse with and without option "-clean"
> - Changed global preference settings and validation/builder settings in
> the project preferences; disabled all validators
> .. all to no avail.
>
> I have a separate test project with only one test JSP; even saving this
> page restarts and republishes the other project (the big one) if the
> test project is registered with the same server.
>
> Maybe somebody can tell me what's going on behind the curtains. WTP
> seems to have become confused somewhere, but I don't know where to look
> further. I have taken a look at the config files but these are not
> self-documenting. If you know the rules for the project rebuild, please
> let me know where to look; I don't mind looking at the source code if I
> only knew where to start.
>
> This issue has been described previously in this group but nobody took
> the trouble to reply. Sorry for posting it again - I'd be grateful for
> your advice.
>
> Thanks & regards, Leo
>
>
>
>
Re: JSP save causes re-deployment and restart [message #190177 is a reply to message #190168] Tue, 20 March 2007 11:35 Go to previous messageGo to next message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Hi Larry,

thanks for your help. I appreciate that you take the problem seriously.

"Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
news:etoo8d$hgn$1@utils.eclipse.org...
> The problem is that is that no one really knows exactly what's "special"
> about your Eclipse setup and workspace that's leading to this behavior.
Yes. I know that the matter is complicated, and that I can't expect
definitive answers. I'm also willing to put some more effort into this.

> I'm afraid I don't have any good guesses. If you are willing, I would
> recommended installing or upgrading to the JST SDK to get source for the
> org.eclipse.jst.server.tomcat.core plug-in, if you don't have the SDK
> already. You could then create a new workspace and import this plug-in.
> The next step would be to run that plug-in in a debug session and under
> that debug session's workspace, import your project and see if you can
> duplicate the problem. If so I can help with debugging to see if more
> than just the changed JSP is being copied during the publish. Maybe what
> is being published will provide a clue as to who's making changes beyond
> the saved JSP. My only shot in the dark is that it sounds like some
> builder in your project is making changes, perhaps unnecessarily, that is
> triggering this behavior.

The strange thing is: only the JSP is being replaced. I have checked the
timestamps of the files. Even more confusing (for me) is the fact that some
_folders_ below WEB-INF/classes have their "modified" timestamps changed to
the publish time - but none of the files within these folders are changed,
though Windows indicates that they have been accessed at publish time.
The publish.xml file gets a new timestamp, too. I have diffed two subsequent
versions of publish.xml. The only difference is the entry for the JSP.
It looks like something causes a WTP component to recursively traverse the
folder structure and modify the timestamps of the folders (or has this been
done by the OS?) while not touching the files at all (maybe it's doing a
comparison).
In my opinion there is nothing wrong with the publishing process at all -
the problem seems to be in the triggering logic.

There are three builders configured for the project: Java Builder, Faceted
Project Validation Builder, and Validation. I have disabled all of them and
still get the same behaviour. I have also suspended all validators, with no
improvement.

Thanks for your help offer. I will get the JST sources and try to debug
them; however, I foresee that it might be a rather lengthy undertaking ;-)
I'll post again here if I have more questions or answers.

Regards,
Leo


>
> Cheers,
> Larry
>
> Leo wrote:
>> Hello,
>>
>> it'd be great if somebody could help me to understand what's going on
>> here...
>> I have a fairly large dynamic web project featuring some JSPs, a large
>> Java code base and lots of support libraries. The problem is, when I save
>> a JSP page WTP thinks it has to trigger a complete rebuild, republish and
>> server restart. Naturally this takes ages (and my box is fast).
>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>> When I took up development a few weeks ago I used Exadel Studio Pro which
>> worked fine. JSP saving caused immediate replacement of the page only -
>> all happiness. Suddenly the behaviour changed; I'm not quite sure but it
>> may be after I added Struts support (from the Exadel plugin). Since then
>> I've tried the following:
>> - Uninstalled and re-installed the Exadel plugin
>> - Removed Struts support
>> - Removed the project from the server and added it again
>> - Deleted the server runtime and configured it again; deleted temp0
>> directories and publish.xml files several times
>> - Switched to another workspace and re-configured from scratch
>> - Re-installed Eclipse and used a new, clean workspace
>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>> - Starting Eclipse with and without option "-clean"
>> - Changed global preference settings and validation/builder settings in
>> the project preferences; disabled all validators
>> .. all to no avail.
>>
>> I have a separate test project with only one test JSP; even saving this
>> page restarts and republishes the other project (the big one) if the test
>> project is registered with the same server.
>>
>> Maybe somebody can tell me what's going on behind the curtains. WTP seems
>> to have become confused somewhere, but I don't know where to look
>> further. I have taken a look at the config files but these are not
>> self-documenting. If you know the rules for the project rebuild, please
>> let me know where to look; I don't mind looking at the source code if I
>> only knew where to start.
>>
>> This issue has been described previously in this group but nobody took
>> the trouble to reply. Sorry for posting it again - I'd be grateful for
>> your advice.
>>
>> Thanks & regards, Leo
>>
>>
>>
Re: JSP save causes re-deployment and restart [message #190188 is a reply to message #190177] Tue, 20 March 2007 12:11 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1304
Registered: July 2009
Senior Member
If you don't already have the JST SDK, you can use the Update Manager to
get it from the Web Tools Platform Update site. Once you have the
SDK, use File -> Switch Workspace to create new workspace. After any
routine setup you do for your workspaces, select File -> Import ->
"Plug-in Development" -> "Plug-ins and Fragments" and click Next.
Change "Import as" to "Projects with source folders" and click Next.
Wait for the "Plug-ins and Fragments Found" list to fully populate, then
scroll down and double-click org.eclipse.jst.server.tomcat.core, then
click Finish. Ignore the "Discouraged Access" warnings that may appear
in the Problems view. Right-click on the new project and select "Debug
As" -> "Eclipse Application". It will start a debug session of Eclipse
using a workspace named "runtime-EclipseApplication" located as a
sibling of the workspace containing the tomcat plug-in. Getting to this
point is fairly simple. The trick now is to duplicate the problem in
this debug workspace. Once you get that point, post back and we'll
figure out the next step.

Cheers,
Larry

Leo Meyer wrote:
> Hi Larry,
>
> thanks for your help. I appreciate that you take the problem seriously.
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
> news:etoo8d$hgn$1@utils.eclipse.org...
>> The problem is that is that no one really knows exactly what's "special"
>> about your Eclipse setup and workspace that's leading to this behavior.
> Yes. I know that the matter is complicated, and that I can't expect
> definitive answers. I'm also willing to put some more effort into this.
>
>> I'm afraid I don't have any good guesses. If you are willing, I would
>> recommended installing or upgrading to the JST SDK to get source for the
>> org.eclipse.jst.server.tomcat.core plug-in, if you don't have the SDK
>> already. You could then create a new workspace and import this plug-in.
>> The next step would be to run that plug-in in a debug session and under
>> that debug session's workspace, import your project and see if you can
>> duplicate the problem. If so I can help with debugging to see if more
>> than just the changed JSP is being copied during the publish. Maybe what
>> is being published will provide a clue as to who's making changes beyond
>> the saved JSP. My only shot in the dark is that it sounds like some
>> builder in your project is making changes, perhaps unnecessarily, that is
>> triggering this behavior.
>
> The strange thing is: only the JSP is being replaced. I have checked the
> timestamps of the files. Even more confusing (for me) is the fact that some
> _folders_ below WEB-INF/classes have their "modified" timestamps changed to
> the publish time - but none of the files within these folders are changed,
> though Windows indicates that they have been accessed at publish time.
> The publish.xml file gets a new timestamp, too. I have diffed two subsequent
> versions of publish.xml. The only difference is the entry for the JSP.
> It looks like something causes a WTP component to recursively traverse the
> folder structure and modify the timestamps of the folders (or has this been
> done by the OS?) while not touching the files at all (maybe it's doing a
> comparison).
> In my opinion there is nothing wrong with the publishing process at all -
> the problem seems to be in the triggering logic.
>
> There are three builders configured for the project: Java Builder, Faceted
> Project Validation Builder, and Validation. I have disabled all of them and
> still get the same behaviour. I have also suspended all validators, with no
> improvement.
>
> Thanks for your help offer. I will get the JST sources and try to debug
> them; however, I foresee that it might be a rather lengthy undertaking ;-)
> I'll post again here if I have more questions or answers.
>
> Regards,
> Leo
>
>
>> Cheers,
>> Larry
>>
>> Leo wrote:
>>> Hello,
>>>
>>> it'd be great if somebody could help me to understand what's going on
>>> here...
>>> I have a fairly large dynamic web project featuring some JSPs, a large
>>> Java code base and lots of support libraries. The problem is, when I save
>>> a JSP page WTP thinks it has to trigger a complete rebuild, republish and
>>> server restart. Naturally this takes ages (and my box is fast).
>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>> When I took up development a few weeks ago I used Exadel Studio Pro which
>>> worked fine. JSP saving caused immediate replacement of the page only -
>>> all happiness. Suddenly the behaviour changed; I'm not quite sure but it
>>> may be after I added Struts support (from the Exadel plugin). Since then
>>> I've tried the following:
>>> - Uninstalled and re-installed the Exadel plugin
>>> - Removed Struts support
>>> - Removed the project from the server and added it again
>>> - Deleted the server runtime and configured it again; deleted temp0
>>> directories and publish.xml files several times
>>> - Switched to another workspace and re-configured from scratch
>>> - Re-installed Eclipse and used a new, clean workspace
>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>> - Starting Eclipse with and without option "-clean"
>>> - Changed global preference settings and validation/builder settings in
>>> the project preferences; disabled all validators
>>> .. all to no avail.
>>>
>>> I have a separate test project with only one test JSP; even saving this
>>> page restarts and republishes the other project (the big one) if the test
>>> project is registered with the same server.
>>>
>>> Maybe somebody can tell me what's going on behind the curtains. WTP seems
>>> to have become confused somewhere, but I don't know where to look
>>> further. I have taken a look at the config files but these are not
>>> self-documenting. If you know the rules for the project rebuild, please
>>> let me know where to look; I don't mind looking at the source code if I
>>> only knew where to start.
>>>
>>> This issue has been described previously in this group but nobody took
>>> the trouble to reply. Sorry for posting it again - I'd be grateful for
>>> your advice.
>>>
>>> Thanks & regards, Leo
>>>
>>>
>>>
>
Re: JSP save causes re-deployment and restart [message #190195 is a reply to message #190188] Tue, 20 March 2007 12:22 Go to previous messageGo to next message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Thanks for the instructions!
I'll post back.

Regards, Leo

"Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
news:etp134$lop$1@utils.eclipse.org...
> If you don't already have the JST SDK, you can use the Update Manager to
> get it from the Web Tools Platform Update site. Once you have the SDK,
> use File -> Switch Workspace to create new workspace. After any routine
> setup you do for your workspaces, select File -> Import -> "Plug-in
> Development" -> "Plug-ins and Fragments" and click Next. Change "Import
> as" to "Projects with source folders" and click Next. Wait for the
> "Plug-ins and Fragments Found" list to fully populate, then scroll down
> and double-click org.eclipse.jst.server.tomcat.core, then click Finish.
> Ignore the "Discouraged Access" warnings that may appear in the Problems
> view. Right-click on the new project and select "Debug As" -> "Eclipse
> Application". It will start a debug session of Eclipse using a workspace
> named "runtime-EclipseApplication" located as a sibling of the workspace
> containing the tomcat plug-in. Getting to this point is fairly simple.
> The trick now is to duplicate the problem in this debug workspace. Once
> you get that point, post back and we'll figure out the next step.
>
> Cheers,
> Larry
>
> Leo Meyer wrote:
>> Hi Larry,
>>
>> thanks for your help. I appreciate that you take the problem seriously.
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>> news:etoo8d$hgn$1@utils.eclipse.org...
>>> The problem is that is that no one really knows exactly what's "special"
>>> about your Eclipse setup and workspace that's leading to this behavior.
>> Yes. I know that the matter is complicated, and that I can't expect
>> definitive answers. I'm also willing to put some more effort into this.
>>
>>> I'm afraid I don't have any good guesses. If you are willing, I would
>>> recommended installing or upgrading to the JST SDK to get source for the
>>> org.eclipse.jst.server.tomcat.core plug-in, if you don't have the SDK
>>> already. You could then create a new workspace and import this plug-in.
>>> The next step would be to run that plug-in in a debug session and under
>>> that debug session's workspace, import your project and see if you can
>>> duplicate the problem. If so I can help with debugging to see if more
>>> than just the changed JSP is being copied during the publish. Maybe what
>>> is being published will provide a clue as to who's making changes beyond
>>> the saved JSP. My only shot in the dark is that it sounds like some
>>> builder in your project is making changes, perhaps unnecessarily, that
>>> is triggering this behavior.
>>
>> The strange thing is: only the JSP is being replaced. I have checked the
>> timestamps of the files. Even more confusing (for me) is the fact that
>> some _folders_ below WEB-INF/classes have their "modified" timestamps
>> changed to the publish time - but none of the files within these folders
>> are changed, though Windows indicates that they have been accessed at
>> publish time.
>> The publish.xml file gets a new timestamp, too. I have diffed two
>> subsequent versions of publish.xml. The only difference is the entry for
>> the JSP.
>> It looks like something causes a WTP component to recursively traverse
>> the folder structure and modify the timestamps of the folders (or has
>> this been done by the OS?) while not touching the files at all (maybe
>> it's doing a comparison).
>> In my opinion there is nothing wrong with the publishing process at all -
>> the problem seems to be in the triggering logic.
>>
>> There are three builders configured for the project: Java Builder,
>> Faceted Project Validation Builder, and Validation. I have disabled all
>> of them and still get the same behaviour. I have also suspended all
>> validators, with no improvement.
>>
>> Thanks for your help offer. I will get the JST sources and try to debug
>> them; however, I foresee that it might be a rather lengthy undertaking
>> ;-)
>> I'll post again here if I have more questions or answers.
>>
>> Regards,
>> Leo
>>
>>
>>> Cheers,
>>> Larry
>>>
>>> Leo wrote:
>>>> Hello,
>>>>
>>>> it'd be great if somebody could help me to understand what's going on
>>>> here...
>>>> I have a fairly large dynamic web project featuring some JSPs, a large
>>>> Java code base and lots of support libraries. The problem is, when I
>>>> save a JSP page WTP thinks it has to trigger a complete rebuild,
>>>> republish and server restart. Naturally this takes ages (and my box is
>>>> fast).
>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>> When I took up development a few weeks ago I used Exadel Studio Pro
>>>> which worked fine. JSP saving caused immediate replacement of the page
>>>> only - all happiness. Suddenly the behaviour changed; I'm not quite
>>>> sure but it may be after I added Struts support (from the Exadel
>>>> plugin). Since then I've tried the following:
>>>> - Uninstalled and re-installed the Exadel plugin
>>>> - Removed Struts support
>>>> - Removed the project from the server and added it again
>>>> - Deleted the server runtime and configured it again; deleted temp0
>>>> directories and publish.xml files several times
>>>> - Switched to another workspace and re-configured from scratch
>>>> - Re-installed Eclipse and used a new, clean workspace
>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>> - Starting Eclipse with and without option "-clean"
>>>> - Changed global preference settings and validation/builder settings in
>>>> the project preferences; disabled all validators
>>>> .. all to no avail.
>>>>
>>>> I have a separate test project with only one test JSP; even saving this
>>>> page restarts and republishes the other project (the big one) if the
>>>> test project is registered with the same server.
>>>>
>>>> Maybe somebody can tell me what's going on behind the curtains. WTP
>>>> seems to have become confused somewhere, but I don't know where to look
>>>> further. I have taken a look at the config files but these are not
>>>> self-documenting. If you know the rules for the project rebuild, please
>>>> let me know where to look; I don't mind looking at the source code if I
>>>> only knew where to start.
>>>>
>>>> This issue has been described previously in this group but nobody took
>>>> the trouble to reply. Sorry for posting it again - I'd be grateful for
>>>> your advice.
>>>>
>>>> Thanks & regards, Leo
>>>>
>>>>
>>>>
>>
Re: JSP save causes re-deployment and restart [message #190225 is a reply to message #190188] Wed, 21 March 2007 04:11 Go to previous messageGo to next message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Hi Larry,

thanks for your excellent instructions. I have been able to set up the debug
workspace and I can reproduce the problem.
I have set the "Restart server when necessary" preference to on. Just for
clarity, here's the behaviour again:
When I edit and save a JSP page the project is being rebuilt ("Building
workspace" appears for a moment in the task panel), though all builders and
validators are deactivated. The server is being stopped and restarted.
The expected behaviour is: Publish JSP page to the web content folder, and
nothing more.
I have been able to set a breakpoint in PublishTask.getTask(), and I'm now
trying to track down the problem.

I'll post back if I find out more.

Regards, Leo



"Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
news:etp134$lop$1@utils.eclipse.org...
> If you don't already have the JST SDK, you can use the Update Manager to
> get it from the Web Tools Platform Update site. Once you have the SDK,
> use File -> Switch Workspace to create new workspace. After any routine
> setup you do for your workspaces, select File -> Import -> "Plug-in
> Development" -> "Plug-ins and Fragments" and click Next. Change "Import
> as" to "Projects with source folders" and click Next. Wait for the
> "Plug-ins and Fragments Found" list to fully populate, then scroll down
> and double-click org.eclipse.jst.server.tomcat.core, then click Finish.
> Ignore the "Discouraged Access" warnings that may appear in the Problems
> view. Right-click on the new project and select "Debug As" -> "Eclipse
> Application". It will start a debug session of Eclipse using a workspace
> named "runtime-EclipseApplication" located as a sibling of the workspace
> containing the tomcat plug-in. Getting to this point is fairly simple.
> The trick now is to duplicate the problem in this debug workspace. Once
> you get that point, post back and we'll figure out the next step.
>
> Cheers,
> Larry
>
> Leo Meyer wrote:
>> Hi Larry,
>>
>> thanks for your help. I appreciate that you take the problem seriously.
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>> news:etoo8d$hgn$1@utils.eclipse.org...
>>> The problem is that is that no one really knows exactly what's "special"
>>> about your Eclipse setup and workspace that's leading to this behavior.
>> Yes. I know that the matter is complicated, and that I can't expect
>> definitive answers. I'm also willing to put some more effort into this.
>>
>>> I'm afraid I don't have any good guesses. If you are willing, I would
>>> recommended installing or upgrading to the JST SDK to get source for the
>>> org.eclipse.jst.server.tomcat.core plug-in, if you don't have the SDK
>>> already. You could then create a new workspace and import this plug-in.
>>> The next step would be to run that plug-in in a debug session and under
>>> that debug session's workspace, import your project and see if you can
>>> duplicate the problem. If so I can help with debugging to see if more
>>> than just the changed JSP is being copied during the publish. Maybe what
>>> is being published will provide a clue as to who's making changes beyond
>>> the saved JSP. My only shot in the dark is that it sounds like some
>>> builder in your project is making changes, perhaps unnecessarily, that
>>> is triggering this behavior.
>>
>> The strange thing is: only the JSP is being replaced. I have checked the
>> timestamps of the files. Even more confusing (for me) is the fact that
>> some _folders_ below WEB-INF/classes have their "modified" timestamps
>> changed to the publish time - but none of the files within these folders
>> are changed, though Windows indicates that they have been accessed at
>> publish time.
>> The publish.xml file gets a new timestamp, too. I have diffed two
>> subsequent versions of publish.xml. The only difference is the entry for
>> the JSP.
>> It looks like something causes a WTP component to recursively traverse
>> the folder structure and modify the timestamps of the folders (or has
>> this been done by the OS?) while not touching the files at all (maybe
>> it's doing a comparison).
>> In my opinion there is nothing wrong with the publishing process at all -
>> the problem seems to be in the triggering logic.
>>
>> There are three builders configured for the project: Java Builder,
>> Faceted Project Validation Builder, and Validation. I have disabled all
>> of them and still get the same behaviour. I have also suspended all
>> validators, with no improvement.
>>
>> Thanks for your help offer. I will get the JST sources and try to debug
>> them; however, I foresee that it might be a rather lengthy undertaking
>> ;-)
>> I'll post again here if I have more questions or answers.
>>
>> Regards,
>> Leo
>>
>>
>>> Cheers,
>>> Larry
>>>
>>> Leo wrote:
>>>> Hello,
>>>>
>>>> it'd be great if somebody could help me to understand what's going on
>>>> here...
>>>> I have a fairly large dynamic web project featuring some JSPs, a large
>>>> Java code base and lots of support libraries. The problem is, when I
>>>> save a JSP page WTP thinks it has to trigger a complete rebuild,
>>>> republish and server restart. Naturally this takes ages (and my box is
>>>> fast).
>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>> When I took up development a few weeks ago I used Exadel Studio Pro
>>>> which worked fine. JSP saving caused immediate replacement of the page
>>>> only - all happiness. Suddenly the behaviour changed; I'm not quite
>>>> sure but it may be after I added Struts support (from the Exadel
>>>> plugin). Since then I've tried the following:
>>>> - Uninstalled and re-installed the Exadel plugin
>>>> - Removed Struts support
>>>> - Removed the project from the server and added it again
>>>> - Deleted the server runtime and configured it again; deleted temp0
>>>> directories and publish.xml files several times
>>>> - Switched to another workspace and re-configured from scratch
>>>> - Re-installed Eclipse and used a new, clean workspace
>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>> - Starting Eclipse with and without option "-clean"
>>>> - Changed global preference settings and validation/builder settings in
>>>> the project preferences; disabled all validators
>>>> .. all to no avail.
>>>>
>>>> I have a separate test project with only one test JSP; even saving this
>>>> page restarts and republishes the other project (the big one) if the
>>>> test project is registered with the same server.
>>>>
>>>> Maybe somebody can tell me what's going on behind the curtains. WTP
>>>> seems to have become confused somewhere, but I don't know where to look
>>>> further. I have taken a look at the config files but these are not
>>>> self-documenting. If you know the rules for the project rebuild, please
>>>> let me know where to look; I don't mind looking at the source code if I
>>>> only knew where to start.
>>>>
>>>> This issue has been described previously in this group but nobody took
>>>> the trouble to reply. Sorry for posting it again - I'd be grateful for
>>>> your advice.
>>>>
>>>> Thanks & regards, Leo
>>>>
>>>>
>>>>
>>
Re: JSP save causes re-deployment and restart [message #190236 is a reply to message #190225] Wed, 21 March 2007 05:59 Go to previous messageGo to next message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Hi Larry,

I have found out that the server restart is handled by the class
RestartServerJob in the package org.eclipse.wst.server.core.internal. I
can't say, however, how this job is put into the job pool.
I haven't found any references to it in the
org.eclipse.jst.server.tomcat.core plugin. Since the publish task seems to
be triggered by the RestartServerJob (via Server.restart()) I suspect that
nothing is wrong with the tomcat plugin but the fault is with the component
that places the RestartServerJob in the worker pool.
If possible, please point me to the location where the saving of JSPs is
handled. I suppose that the rub is there.
Many thanks for your help so far!

Regards, Leo



"Leo Meyer" <leomeyer@gmx.de> schrieb im Newsbeitrag
news:etqp77$nsh$1@utils.eclipse.org...
> Hi Larry,
>
> thanks for your excellent instructions. I have been able to set up the
> debug workspace and I can reproduce the problem.
> I have set the "Restart server when necessary" preference to on. Just for
> clarity, here's the behaviour again:
> When I edit and save a JSP page the project is being rebuilt ("Building
> workspace" appears for a moment in the task panel), though all builders
> and validators are deactivated. The server is being stopped and restarted.
> The expected behaviour is: Publish JSP page to the web content folder, and
> nothing more.
> I have been able to set a breakpoint in PublishTask.getTask(), and I'm now
> trying to track down the problem.
>
> I'll post back if I find out more.
>
> Regards, Leo
>
>
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
> news:etp134$lop$1@utils.eclipse.org...
>> If you don't already have the JST SDK, you can use the Update Manager to
>> get it from the Web Tools Platform Update site. Once you have the SDK,
>> use File -> Switch Workspace to create new workspace. After any routine
>> setup you do for your workspaces, select File -> Import -> "Plug-in
>> Development" -> "Plug-ins and Fragments" and click Next. Change "Import
>> as" to "Projects with source folders" and click Next. Wait for the
>> "Plug-ins and Fragments Found" list to fully populate, then scroll down
>> and double-click org.eclipse.jst.server.tomcat.core, then click Finish.
>> Ignore the "Discouraged Access" warnings that may appear in the Problems
>> view. Right-click on the new project and select "Debug As" -> "Eclipse
>> Application". It will start a debug session of Eclipse using a workspace
>> named "runtime-EclipseApplication" located as a sibling of the workspace
>> containing the tomcat plug-in. Getting to this point is fairly simple.
>> The trick now is to duplicate the problem in this debug workspace. Once
>> you get that point, post back and we'll figure out the next step.
>>
>> Cheers,
>> Larry
>>
>> Leo Meyer wrote:
>>> Hi Larry,
>>>
>>> thanks for your help. I appreciate that you take the problem seriously.
>>>
>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>> news:etoo8d$hgn$1@utils.eclipse.org...
>>>> The problem is that is that no one really knows exactly what's
>>>> "special" about your Eclipse setup and workspace that's leading to this
>>>> behavior.
>>> Yes. I know that the matter is complicated, and that I can't expect
>>> definitive answers. I'm also willing to put some more effort into this.
>>>
>>>> I'm afraid I don't have any good guesses. If you are willing, I would
>>>> recommended installing or upgrading to the JST SDK to get source for
>>>> the org.eclipse.jst.server.tomcat.core plug-in, if you don't have the
>>>> SDK already. You could then create a new workspace and import this
>>>> plug-in. The next step would be to run that plug-in in a debug session
>>>> and under that debug session's workspace, import your project and see
>>>> if you can duplicate the problem. If so I can help with debugging to
>>>> see if more than just the changed JSP is being copied during the
>>>> publish. Maybe what is being published will provide a clue as to who's
>>>> making changes beyond the saved JSP. My only shot in the dark is that
>>>> it sounds like some builder in your project is making changes, perhaps
>>>> unnecessarily, that is triggering this behavior.
>>>
>>> The strange thing is: only the JSP is being replaced. I have checked the
>>> timestamps of the files. Even more confusing (for me) is the fact that
>>> some _folders_ below WEB-INF/classes have their "modified" timestamps
>>> changed to the publish time - but none of the files within these folders
>>> are changed, though Windows indicates that they have been accessed at
>>> publish time.
>>> The publish.xml file gets a new timestamp, too. I have diffed two
>>> subsequent versions of publish.xml. The only difference is the entry for
>>> the JSP.
>>> It looks like something causes a WTP component to recursively traverse
>>> the folder structure and modify the timestamps of the folders (or has
>>> this been done by the OS?) while not touching the files at all (maybe
>>> it's doing a comparison).
>>> In my opinion there is nothing wrong with the publishing process at
>>> all - the problem seems to be in the triggering logic.
>>>
>>> There are three builders configured for the project: Java Builder,
>>> Faceted Project Validation Builder, and Validation. I have disabled all
>>> of them and still get the same behaviour. I have also suspended all
>>> validators, with no improvement.
>>>
>>> Thanks for your help offer. I will get the JST sources and try to debug
>>> them; however, I foresee that it might be a rather lengthy undertaking
>>> ;-)
>>> I'll post again here if I have more questions or answers.
>>>
>>> Regards,
>>> Leo
>>>
>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> Leo wrote:
>>>>> Hello,
>>>>>
>>>>> it'd be great if somebody could help me to understand what's going on
>>>>> here...
>>>>> I have a fairly large dynamic web project featuring some JSPs, a large
>>>>> Java code base and lots of support libraries. The problem is, when I
>>>>> save a JSP page WTP thinks it has to trigger a complete rebuild,
>>>>> republish and server restart. Naturally this takes ages (and my box is
>>>>> fast).
>>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>>> When I took up development a few weeks ago I used Exadel Studio Pro
>>>>> which worked fine. JSP saving caused immediate replacement of the page
>>>>> only - all happiness. Suddenly the behaviour changed; I'm not quite
>>>>> sure but it may be after I added Struts support (from the Exadel
>>>>> plugin). Since then I've tried the following:
>>>>> - Uninstalled and re-installed the Exadel plugin
>>>>> - Removed Struts support
>>>>> - Removed the project from the server and added it again
>>>>> - Deleted the server runtime and configured it again; deleted temp0
>>>>> directories and publish.xml files several times
>>>>> - Switched to another workspace and re-configured from scratch
>>>>> - Re-installed Eclipse and used a new, clean workspace
>>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>>> - Starting Eclipse with and without option "-clean"
>>>>> - Changed global preference settings and validation/builder settings
>>>>> in the project preferences; disabled all validators
>>>>> .. all to no avail.
>>>>>
>>>>> I have a separate test project with only one test JSP; even saving
>>>>> this page restarts and republishes the other project (the big one) if
>>>>> the test project is registered with the same server.
>>>>>
>>>>> Maybe somebody can tell me what's going on behind the curtains. WTP
>>>>> seems to have become confused somewhere, but I don't know where to
>>>>> look further. I have taken a look at the config files but these are
>>>>> not self-documenting. If you know the rules for the project rebuild,
>>>>> please let me know where to look; I don't mind looking at the source
>>>>> code if I only knew where to start.
>>>>>
>>>>> This issue has been described previously in this group but nobody took
>>>>> the trouble to reply. Sorry for posting it again - I'd be grateful for
>>>>> your advice.
>>>>>
>>>>> Thanks & regards, Leo
>>>>>
>>>>>
>>>>>
>>>
>
>
Re: JSP save causes re-deployment and restart [message #190264 is a reply to message #190236] Wed, 21 March 2007 08:42 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1304
Registered: July 2009
Senior Member
You may want to import the org.eclipse.wst.server.core plug-in as well
since that is where a lot of the server infrastructure is found,
including RestartServerJob. Just to be sure, if you double-click the
Tomcat server in the Servers view to open the server editor, is the "Run
modules directly..." checkbox checked or unchecked? If checked, you
could put a breakpoint in the execute() method of PublishOperation2 to
step through exactly what is being published for a module. If the
checkbox is unchecked, the breakpoint would go in the publishModule()
method of TomcatServerBehavior.

Cheers,
Larry

Leo Meyer wrote:
> Hi Larry,
>
> I have found out that the server restart is handled by the class
> RestartServerJob in the package org.eclipse.wst.server.core.internal. I
> can't say, however, how this job is put into the job pool.
> I haven't found any references to it in the
> org.eclipse.jst.server.tomcat.core plugin. Since the publish task seems to
> be triggered by the RestartServerJob (via Server.restart()) I suspect that
> nothing is wrong with the tomcat plugin but the fault is with the component
> that places the RestartServerJob in the worker pool.
> If possible, please point me to the location where the saving of JSPs is
> handled. I suppose that the rub is there.
> Many thanks for your help so far!
>
> Regards, Leo
>
>
>
> "Leo Meyer" <leomeyer@gmx.de> schrieb im Newsbeitrag
> news:etqp77$nsh$1@utils.eclipse.org...
>> Hi Larry,
>>
>> thanks for your excellent instructions. I have been able to set up the
>> debug workspace and I can reproduce the problem.
>> I have set the "Restart server when necessary" preference to on. Just for
>> clarity, here's the behaviour again:
>> When I edit and save a JSP page the project is being rebuilt ("Building
>> workspace" appears for a moment in the task panel), though all builders
>> and validators are deactivated. The server is being stopped and restarted.
>> The expected behaviour is: Publish JSP page to the web content folder, and
>> nothing more.
>> I have been able to set a breakpoint in PublishTask.getTask(), and I'm now
>> trying to track down the problem.
>>
>> I'll post back if I find out more.
>>
>> Regards, Leo
>>
>>
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>> news:etp134$lop$1@utils.eclipse.org...
>>> If you don't already have the JST SDK, you can use the Update Manager to
>>> get it from the Web Tools Platform Update site. Once you have the SDK,
>>> use File -> Switch Workspace to create new workspace. After any routine
>>> setup you do for your workspaces, select File -> Import -> "Plug-in
>>> Development" -> "Plug-ins and Fragments" and click Next. Change "Import
>>> as" to "Projects with source folders" and click Next. Wait for the
>>> "Plug-ins and Fragments Found" list to fully populate, then scroll down
>>> and double-click org.eclipse.jst.server.tomcat.core, then click Finish.
>>> Ignore the "Discouraged Access" warnings that may appear in the Problems
>>> view. Right-click on the new project and select "Debug As" -> "Eclipse
>>> Application". It will start a debug session of Eclipse using a workspace
>>> named "runtime-EclipseApplication" located as a sibling of the workspace
>>> containing the tomcat plug-in. Getting to this point is fairly simple.
>>> The trick now is to duplicate the problem in this debug workspace. Once
>>> you get that point, post back and we'll figure out the next step.
>>>
>>> Cheers,
>>> Larry
>>>
>>> Leo Meyer wrote:
>>>> Hi Larry,
>>>>
>>>> thanks for your help. I appreciate that you take the problem seriously.
>>>>
>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>>> news:etoo8d$hgn$1@utils.eclipse.org...
>>>>> The problem is that is that no one really knows exactly what's
>>>>> "special" about your Eclipse setup and workspace that's leading to this
>>>>> behavior.
>>>> Yes. I know that the matter is complicated, and that I can't expect
>>>> definitive answers. I'm also willing to put some more effort into this.
>>>>
>>>>> I'm afraid I don't have any good guesses. If you are willing, I would
>>>>> recommended installing or upgrading to the JST SDK to get source for
>>>>> the org.eclipse.jst.server.tomcat.core plug-in, if you don't have the
>>>>> SDK already. You could then create a new workspace and import this
>>>>> plug-in. The next step would be to run that plug-in in a debug session
>>>>> and under that debug session's workspace, import your project and see
>>>>> if you can duplicate the problem. If so I can help with debugging to
>>>>> see if more than just the changed JSP is being copied during the
>>>>> publish. Maybe what is being published will provide a clue as to who's
>>>>> making changes beyond the saved JSP. My only shot in the dark is that
>>>>> it sounds like some builder in your project is making changes, perhaps
>>>>> unnecessarily, that is triggering this behavior.
>>>> The strange thing is: only the JSP is being replaced. I have checked the
>>>> timestamps of the files. Even more confusing (for me) is the fact that
>>>> some _folders_ below WEB-INF/classes have their "modified" timestamps
>>>> changed to the publish time - but none of the files within these folders
>>>> are changed, though Windows indicates that they have been accessed at
>>>> publish time.
>>>> The publish.xml file gets a new timestamp, too. I have diffed two
>>>> subsequent versions of publish.xml. The only difference is the entry for
>>>> the JSP.
>>>> It looks like something causes a WTP component to recursively traverse
>>>> the folder structure and modify the timestamps of the folders (or has
>>>> this been done by the OS?) while not touching the files at all (maybe
>>>> it's doing a comparison).
>>>> In my opinion there is nothing wrong with the publishing process at
>>>> all - the problem seems to be in the triggering logic.
>>>>
>>>> There are three builders configured for the project: Java Builder,
>>>> Faceted Project Validation Builder, and Validation. I have disabled all
>>>> of them and still get the same behaviour. I have also suspended all
>>>> validators, with no improvement.
>>>>
>>>> Thanks for your help offer. I will get the JST sources and try to debug
>>>> them; however, I foresee that it might be a rather lengthy undertaking
>>>> ;-)
>>>> I'll post again here if I have more questions or answers.
>>>>
>>>> Regards,
>>>> Leo
>>>>
>>>>
>>>>> Cheers,
>>>>> Larry
>>>>>
>>>>> Leo wrote:
>>>>>> Hello,
>>>>>>
>>>>>> it'd be great if somebody could help me to understand what's going on
>>>>>> here...
>>>>>> I have a fairly large dynamic web project featuring some JSPs, a large
>>>>>> Java code base and lots of support libraries. The problem is, when I
>>>>>> save a JSP page WTP thinks it has to trigger a complete rebuild,
>>>>>> republish and server restart. Naturally this takes ages (and my box is
>>>>>> fast).
>>>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>>>> When I took up development a few weeks ago I used Exadel Studio Pro
>>>>>> which worked fine. JSP saving caused immediate replacement of the page
>>>>>> only - all happiness. Suddenly the behaviour changed; I'm not quite
>>>>>> sure but it may be after I added Struts support (from the Exadel
>>>>>> plugin). Since then I've tried the following:
>>>>>> - Uninstalled and re-installed the Exadel plugin
>>>>>> - Removed Struts support
>>>>>> - Removed the project from the server and added it again
>>>>>> - Deleted the server runtime and configured it again; deleted temp0
>>>>>> directories and publish.xml files several times
>>>>>> - Switched to another workspace and re-configured from scratch
>>>>>> - Re-installed Eclipse and used a new, clean workspace
>>>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>>>> - Starting Eclipse with and without option "-clean"
>>>>>> - Changed global preference settings and validation/builder settings
>>>>>> in the project preferences; disabled all validators
>>>>>> .. all to no avail.
>>>>>>
>>>>>> I have a separate test project with only one test JSP; even saving
>>>>>> this page restarts and republishes the other project (the big one) if
>>>>>> the test project is registered with the same server.
>>>>>>
>>>>>> Maybe somebody can tell me what's going on behind the curtains. WTP
>>>>>> seems to have become confused somewhere, but I don't know where to
>>>>>> look further. I have taken a look at the config files but these are
>>>>>> not self-documenting. If you know the rules for the project rebuild,
>>>>>> please let me know where to look; I don't mind looking at the source
>>>>>> code if I only knew where to start.
>>>>>>
>>>>>> This issue has been described previously in this group but nobody took
>>>>>> the trouble to reply. Sorry for posting it again - I'd be grateful for
>>>>>> your advice.
>>>>>>
>>>>>> Thanks & regards, Leo
>>>>>>
>>>>>>
>>>>>>
>>
>
>
Re: JSP save causes re-deployment and restart [message #190281 is a reply to message #190264] Wed, 21 March 2007 11:08 Go to previous messageGo to next message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Hi Larry,

I have imported the plugin you suggested.
The "Run modules directly..." box is checked, so I debugged
PublishOperation2.execute().
Somewhere down the line there's an instruction:
IModuleResourceDelta[] delta = server.getPublishedResourceDelta(module);

After execution delta contains two elements: a ModuleFolder "WEB-INF" (!)
with sub-elements and my modified JSP file.

I have stepped through the code a bit and found the following:

publish.xml contains duplicate entries, e.g.:

<folder name="util" path="WEB-INF/classes/com/***/action/custom/***">
<file name="FieldNameFunction.class"
path="WEB-INF/classes/com/***/action/custom/***/util"
stamp="1174411121871"/>
<file name="FieldNameFunction.class"
path="WEB-INF/classes/com/***/action/custom/***/util"
stamp="1174410533354"/>
</folder>

The timestamp of the file FieldNameFunction.class in the build output folder
is 1174410533(xxx) (2007-03-20 18:08:53). The timestamp of the published
file is the same. This corresponds with the second entry.

The first timestamp (1174411121871) corresponds to the date "Tue Mar 20
18:18:41". I have closed the workbench, deleted the publish.xml file,
started up and published again. The duplicate entries were there again, with
the identical timestamp (Tue Mar 20 18:18:41).

There are many more duplicate entries, but all are below the com package
folder. Other top level folders are not affected.

Now I realize what happened. I had two versions of the compiled classes in
my project: one in the build/classes folder (which was set as the output
folder) and one in the folder WEB-INF/classes. The WEB-INF/classes folder
does not show up in the Package Explorer view, which is why I didn't realize
it was there. It shows up in the Navigator view, however. For some reason
the file list that goes into publish.xml contains entries for all of the
paths.

I don't know how I managed to get these two output folders. Maybe the
settings were changed when I added Struts support from the Exadel plugin.

At first I thought it was a bug in WTP but now I see that it was a curious
coincidence. Add my inexperience to it and you get those strange effects.

Still I suggest that WTP may be modified such that duplicate entries in
publish.xml are prohibited. Logically it makes no sense to have two sources
for the same target, and their presence may indicate that something is wrong
with the project configuration.

I will try to file a feature request. Many thanks for your help again!

Regards, Leo









"Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
news:etr984$qcb$1@utils.eclipse.org...
> You may want to import the org.eclipse.wst.server.core plug-in as well
> since that is where a lot of the server infrastructure is found, including
> RestartServerJob. Just to be sure, if you double-click the Tomcat server
> in the Servers view to open the server editor, is the "Run modules
> directly..." checkbox checked or unchecked? If checked, you could put a
> breakpoint in the execute() method of PublishOperation2 to step through
> exactly what is being published for a module. If the checkbox is
> unchecked, the breakpoint would go in the publishModule() method of
> TomcatServerBehavior.
>
> Cheers,
> Larry
>
> Leo Meyer wrote:
>> Hi Larry,
>>
>> I have found out that the server restart is handled by the class
>> RestartServerJob in the package org.eclipse.wst.server.core.internal. I
>> can't say, however, how this job is put into the job pool.
>> I haven't found any references to it in the
>> org.eclipse.jst.server.tomcat.core plugin. Since the publish task seems
>> to be triggered by the RestartServerJob (via Server.restart()) I suspect
>> that nothing is wrong with the tomcat plugin but the fault is with the
>> component that places the RestartServerJob in the worker pool.
>> If possible, please point me to the location where the saving of JSPs is
>> handled. I suppose that the rub is there.
>> Many thanks for your help so far!
>>
>> Regards, Leo
>>
>>
>>
>> "Leo Meyer" <leomeyer@gmx.de> schrieb im Newsbeitrag
>> news:etqp77$nsh$1@utils.eclipse.org...
>>> Hi Larry,
>>>
>>> thanks for your excellent instructions. I have been able to set up the
>>> debug workspace and I can reproduce the problem.
>>> I have set the "Restart server when necessary" preference to on. Just
>>> for clarity, here's the behaviour again:
>>> When I edit and save a JSP page the project is being rebuilt ("Building
>>> workspace" appears for a moment in the task panel), though all builders
>>> and validators are deactivated. The server is being stopped and
>>> restarted.
>>> The expected behaviour is: Publish JSP page to the web content folder,
>>> and nothing more.
>>> I have been able to set a breakpoint in PublishTask.getTask(), and I'm
>>> now trying to track down the problem.
>>>
>>> I'll post back if I find out more.
>>>
>>> Regards, Leo
>>>
>>>
>>>
>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>> news:etp134$lop$1@utils.eclipse.org...
>>>> If you don't already have the JST SDK, you can use the Update Manager
>>>> to get it from the Web Tools Platform Update site. Once you have the
>>>> SDK, use File -> Switch Workspace to create new workspace. After any
>>>> routine setup you do for your workspaces, select File -> Import ->
>>>> "Plug-in Development" -> "Plug-ins and Fragments" and click Next.
>>>> Change "Import as" to "Projects with source folders" and click Next.
>>>> Wait for the "Plug-ins and Fragments Found" list to fully populate,
>>>> then scroll down and double-click org.eclipse.jst.server.tomcat.core,
>>>> then click Finish. Ignore the "Discouraged Access" warnings that may
>>>> appear in the Problems view. Right-click on the new project and select
>>>> "Debug As" -> "Eclipse Application". It will start a debug session of
>>>> Eclipse using a workspace named "runtime-EclipseApplication" located as
>>>> a sibling of the workspace containing the tomcat plug-in. Getting to
>>>> this point is fairly simple. The trick now is to duplicate the problem
>>>> in this debug workspace. Once you get that point, post back and we'll
>>>> figure out the next step.
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> Leo Meyer wrote:
>>>>> Hi Larry,
>>>>>
>>>>> thanks for your help. I appreciate that you take the problem
>>>>> seriously.
>>>>>
>>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>>>> news:etoo8d$hgn$1@utils.eclipse.org...
>>>>>> The problem is that is that no one really knows exactly what's
>>>>>> "special" about your Eclipse setup and workspace that's leading to
>>>>>> this behavior.
>>>>> Yes. I know that the matter is complicated, and that I can't expect
>>>>> definitive answers. I'm also willing to put some more effort into
>>>>> this.
>>>>>
>>>>>> I'm afraid I don't have any good guesses. If you are willing, I
>>>>>> would recommended installing or upgrading to the JST SDK to get
>>>>>> source for the org.eclipse.jst.server.tomcat.core plug-in, if you
>>>>>> don't have the SDK already. You could then create a new workspace
>>>>>> and import this plug-in. The next step would be to run that plug-in
>>>>>> in a debug session and under that debug session's workspace, import
>>>>>> your project and see if you can duplicate the problem. If so I can
>>>>>> help with debugging to see if more than just the changed JSP is being
>>>>>> copied during the publish. Maybe what is being published will provide
>>>>>> a clue as to who's making changes beyond the saved JSP. My only shot
>>>>>> in the dark is that it sounds like some builder in your project is
>>>>>> making changes, perhaps unnecessarily, that is triggering this
>>>>>> behavior.
>>>>> The strange thing is: only the JSP is being replaced. I have checked
>>>>> the timestamps of the files. Even more confusing (for me) is the fact
>>>>> that some _folders_ below WEB-INF/classes have their "modified"
>>>>> timestamps changed to the publish time - but none of the files within
>>>>> these folders are changed, though Windows indicates that they have
>>>>> been accessed at publish time.
>>>>> The publish.xml file gets a new timestamp, too. I have diffed two
>>>>> subsequent versions of publish.xml. The only difference is the entry
>>>>> for the JSP.
>>>>> It looks like something causes a WTP component to recursively traverse
>>>>> the folder structure and modify the timestamps of the folders (or has
>>>>> this been done by the OS?) while not touching the files at all (maybe
>>>>> it's doing a comparison).
>>>>> In my opinion there is nothing wrong with the publishing process at
>>>>> all - the problem seems to be in the triggering logic.
>>>>>
>>>>> There are three builders configured for the project: Java Builder,
>>>>> Faceted Project Validation Builder, and Validation. I have disabled
>>>>> all of them and still get the same behaviour. I have also suspended
>>>>> all validators, with no improvement.
>>>>>
>>>>> Thanks for your help offer. I will get the JST sources and try to
>>>>> debug them; however, I foresee that it might be a rather lengthy
>>>>> undertaking ;-)
>>>>> I'll post again here if I have more questions or answers.
>>>>>
>>>>> Regards,
>>>>> Leo
>>>>>
>>>>>
>>>>>> Cheers,
>>>>>> Larry
>>>>>>
>>>>>> Leo wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> it'd be great if somebody could help me to understand what's going
>>>>>>> on here...
>>>>>>> I have a fairly large dynamic web project featuring some JSPs, a
>>>>>>> large Java code base and lots of support libraries. The problem is,
>>>>>>> when I save a JSP page WTP thinks it has to trigger a complete
>>>>>>> rebuild, republish and server restart. Naturally this takes ages
>>>>>>> (and my box is fast).
>>>>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>>>>> When I took up development a few weeks ago I used Exadel Studio Pro
>>>>>>> which worked fine. JSP saving caused immediate replacement of the
>>>>>>> page only - all happiness. Suddenly the behaviour changed; I'm not
>>>>>>> quite sure but it may be after I added Struts support (from the
>>>>>>> Exadel plugin). Since then I've tried the following:
>>>>>>> - Uninstalled and re-installed the Exadel plugin
>>>>>>> - Removed Struts support
>>>>>>> - Removed the project from the server and added it again
>>>>>>> - Deleted the server runtime and configured it again; deleted temp0
>>>>>>> directories and publish.xml files several times
>>>>>>> - Switched to another workspace and re-configured from scratch
>>>>>>> - Re-installed Eclipse and used a new, clean workspace
>>>>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>>>>> - Starting Eclipse with and without option "-clean"
>>>>>>> - Changed global preference settings and validation/builder settings
>>>>>>> in the project preferences; disabled all validators
>>>>>>> .. all to no avail.
>>>>>>>
>>>>>>> I have a separate test project with only one test JSP; even saving
>>>>>>> this page restarts and republishes the other project (the big one)
>>>>>>> if the test project is registered with the same server.
>>>>>>>
>>>>>>> Maybe somebody can tell me what's going on behind the curtains. WTP
>>>>>>> seems to have become confused somewhere, but I don't know where to
>>>>>>> look further. I have taken a look at the config files but these are
>>>>>>> not self-documenting. If you know the rules for the project rebuild,
>>>>>>> please let me know where to look; I don't mind looking at the source
>>>>>>> code if I only knew where to start.
>>>>>>>
>>>>>>> This issue has been described previously in this group but nobody
>>>>>>> took the trouble to reply. Sorry for posting it again - I'd be
>>>>>>> grateful for your advice.
>>>>>>>
>>>>>>> Thanks & regards, Leo
>>>>>>>
>>>>>>>
>>>>>>>
>>>
>>
Re: JSP save causes re-deployment and restart [message #190288 is a reply to message #190281] Wed, 21 March 2007 12:28 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1304
Registered: July 2009
Senior Member
Good work! I'm glad you were able to find the cause. It's probably a
bug that publishing is silent about multiple files in a module being
copied to the same destination file. Please do file a report. Thanks.

Cheers,
Larry

Leo Meyer wrote:
> Hi Larry,
>
> I have imported the plugin you suggested.
> The "Run modules directly..." box is checked, so I debugged
> PublishOperation2.execute().
> Somewhere down the line there's an instruction:
> IModuleResourceDelta[] delta = server.getPublishedResourceDelta(module);
>
> After execution delta contains two elements: a ModuleFolder "WEB-INF" (!)
> with sub-elements and my modified JSP file.
>
> I have stepped through the code a bit and found the following:
>
> publish.xml contains duplicate entries, e.g.:
>
> <folder name="util" path="WEB-INF/classes/com/***/action/custom/***">
> <file name="FieldNameFunction.class"
> path="WEB-INF/classes/com/***/action/custom/***/util"
> stamp="1174411121871"/>
> <file name="FieldNameFunction.class"
> path="WEB-INF/classes/com/***/action/custom/***/util"
> stamp="1174410533354"/>
> </folder>
>
> The timestamp of the file FieldNameFunction.class in the build output folder
> is 1174410533(xxx) (2007-03-20 18:08:53). The timestamp of the published
> file is the same. This corresponds with the second entry.
>
> The first timestamp (1174411121871) corresponds to the date "Tue Mar 20
> 18:18:41". I have closed the workbench, deleted the publish.xml file,
> started up and published again. The duplicate entries were there again, with
> the identical timestamp (Tue Mar 20 18:18:41).
>
> There are many more duplicate entries, but all are below the com package
> folder. Other top level folders are not affected.
>
> Now I realize what happened. I had two versions of the compiled classes in
> my project: one in the build/classes folder (which was set as the output
> folder) and one in the folder WEB-INF/classes. The WEB-INF/classes folder
> does not show up in the Package Explorer view, which is why I didn't realize
> it was there. It shows up in the Navigator view, however. For some reason
> the file list that goes into publish.xml contains entries for all of the
> paths.
>
> I don't know how I managed to get these two output folders. Maybe the
> settings were changed when I added Struts support from the Exadel plugin.
>
> At first I thought it was a bug in WTP but now I see that it was a curious
> coincidence. Add my inexperience to it and you get those strange effects.
>
> Still I suggest that WTP may be modified such that duplicate entries in
> publish.xml are prohibited. Logically it makes no sense to have two sources
> for the same target, and their presence may indicate that something is wrong
> with the project configuration.
>
> I will try to file a feature request. Many thanks for your help again!
>
> Regards, Leo
>
>
>
>
>
>
>
>
>
> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
> news:etr984$qcb$1@utils.eclipse.org...
>> You may want to import the org.eclipse.wst.server.core plug-in as well
>> since that is where a lot of the server infrastructure is found, including
>> RestartServerJob. Just to be sure, if you double-click the Tomcat server
>> in the Servers view to open the server editor, is the "Run modules
>> directly..." checkbox checked or unchecked? If checked, you could put a
>> breakpoint in the execute() method of PublishOperation2 to step through
>> exactly what is being published for a module. If the checkbox is
>> unchecked, the breakpoint would go in the publishModule() method of
>> TomcatServerBehavior.
>>
>> Cheers,
>> Larry
>>
>> Leo Meyer wrote:
>>> Hi Larry,
>>>
>>> I have found out that the server restart is handled by the class
>>> RestartServerJob in the package org.eclipse.wst.server.core.internal. I
>>> can't say, however, how this job is put into the job pool.
>>> I haven't found any references to it in the
>>> org.eclipse.jst.server.tomcat.core plugin. Since the publish task seems
>>> to be triggered by the RestartServerJob (via Server.restart()) I suspect
>>> that nothing is wrong with the tomcat plugin but the fault is with the
>>> component that places the RestartServerJob in the worker pool.
>>> If possible, please point me to the location where the saving of JSPs is
>>> handled. I suppose that the rub is there.
>>> Many thanks for your help so far!
>>>
>>> Regards, Leo
>>>
>>>
>>>
>>> "Leo Meyer" <leomeyer@gmx.de> schrieb im Newsbeitrag
>>> news:etqp77$nsh$1@utils.eclipse.org...
>>>> Hi Larry,
>>>>
>>>> thanks for your excellent instructions. I have been able to set up the
>>>> debug workspace and I can reproduce the problem.
>>>> I have set the "Restart server when necessary" preference to on. Just
>>>> for clarity, here's the behaviour again:
>>>> When I edit and save a JSP page the project is being rebuilt ("Building
>>>> workspace" appears for a moment in the task panel), though all builders
>>>> and validators are deactivated. The server is being stopped and
>>>> restarted.
>>>> The expected behaviour is: Publish JSP page to the web content folder,
>>>> and nothing more.
>>>> I have been able to set a breakpoint in PublishTask.getTask(), and I'm
>>>> now trying to track down the problem.
>>>>
>>>> I'll post back if I find out more.
>>>>
>>>> Regards, Leo
>>>>
>>>>
>>>>
>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>>> news:etp134$lop$1@utils.eclipse.org...
>>>>> If you don't already have the JST SDK, you can use the Update Manager
>>>>> to get it from the Web Tools Platform Update site. Once you have the
>>>>> SDK, use File -> Switch Workspace to create new workspace. After any
>>>>> routine setup you do for your workspaces, select File -> Import ->
>>>>> "Plug-in Development" -> "Plug-ins and Fragments" and click Next.
>>>>> Change "Import as" to "Projects with source folders" and click Next.
>>>>> Wait for the "Plug-ins and Fragments Found" list to fully populate,
>>>>> then scroll down and double-click org.eclipse.jst.server.tomcat.core,
>>>>> then click Finish. Ignore the "Discouraged Access" warnings that may
>>>>> appear in the Problems view. Right-click on the new project and select
>>>>> "Debug As" -> "Eclipse Application". It will start a debug session of
>>>>> Eclipse using a workspace named "runtime-EclipseApplication" located as
>>>>> a sibling of the workspace containing the tomcat plug-in. Getting to
>>>>> this point is fairly simple. The trick now is to duplicate the problem
>>>>> in this debug workspace. Once you get that point, post back and we'll
>>>>> figure out the next step.
>>>>>
>>>>> Cheers,
>>>>> Larry
>>>>>
>>>>> Leo Meyer wrote:
>>>>>> Hi Larry,
>>>>>>
>>>>>> thanks for your help. I appreciate that you take the problem
>>>>>> seriously.
>>>>>>
>>>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>>>>> news:etoo8d$hgn$1@utils.eclipse.org...
>>>>>>> The problem is that is that no one really knows exactly what's
>>>>>>> "special" about your Eclipse setup and workspace that's leading to
>>>>>>> this behavior.
>>>>>> Yes. I know that the matter is complicated, and that I can't expect
>>>>>> definitive answers. I'm also willing to put some more effort into
>>>>>> this.
>>>>>>
>>>>>>> I'm afraid I don't have any good guesses. If you are willing, I
>>>>>>> would recommended installing or upgrading to the JST SDK to get
>>>>>>> source for the org.eclipse.jst.server.tomcat.core plug-in, if you
>>>>>>> don't have the SDK already. You could then create a new workspace
>>>>>>> and import this plug-in. The next step would be to run that plug-in
>>>>>>> in a debug session and under that debug session's workspace, import
>>>>>>> your project and see if you can duplicate the problem. If so I can
>>>>>>> help with debugging to see if more than just the changed JSP is being
>>>>>>> copied during the publish. Maybe what is being published will provide
>>>>>>> a clue as to who's making changes beyond the saved JSP. My only shot
>>>>>>> in the dark is that it sounds like some builder in your project is
>>>>>>> making changes, perhaps unnecessarily, that is triggering this
>>>>>>> behavior.
>>>>>> The strange thing is: only the JSP is being replaced. I have checked
>>>>>> the timestamps of the files. Even more confusing (for me) is the fact
>>>>>> that some _folders_ below WEB-INF/classes have their "modified"
>>>>>> timestamps changed to the publish time - but none of the files within
>>>>>> these folders are changed, though Windows indicates that they have
>>>>>> been accessed at publish time.
>>>>>> The publish.xml file gets a new timestamp, too. I have diffed two
>>>>>> subsequent versions of publish.xml. The only difference is the entry
>>>>>> for the JSP.
>>>>>> It looks like something causes a WTP component to recursively traverse
>>>>>> the folder structure and modify the timestamps of the folders (or has
>>>>>> this been done by the OS?) while not touching the files at all (maybe
>>>>>> it's doing a comparison).
>>>>>> In my opinion there is nothing wrong with the publishing process at
>>>>>> all - the problem seems to be in the triggering logic.
>>>>>>
>>>>>> There are three builders configured for the project: Java Builder,
>>>>>> Faceted Project Validation Builder, and Validation. I have disabled
>>>>>> all of them and still get the same behaviour. I have also suspended
>>>>>> all validators, with no improvement.
>>>>>>
>>>>>> Thanks for your help offer. I will get the JST sources and try to
>>>>>> debug them; however, I foresee that it might be a rather lengthy
>>>>>> undertaking ;-)
>>>>>> I'll post again here if I have more questions or answers.
>>>>>>
>>>>>> Regards,
>>>>>> Leo
>>>>>>
>>>>>>
>>>>>>> Cheers,
>>>>>>> Larry
>>>>>>>
>>>>>>> Leo wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> it'd be great if somebody could help me to understand what's going
>>>>>>>> on here...
>>>>>>>> I have a fairly large dynamic web project featuring some JSPs, a
>>>>>>>> large Java code base and lots of support libraries. The problem is,
>>>>>>>> when I save a JSP page WTP thinks it has to trigger a complete
>>>>>>>> rebuild, republish and server restart. Naturally this takes ages
>>>>>>>> (and my box is fast).
>>>>>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>>>>>> When I took up development a few weeks ago I used Exadel Studio Pro
>>>>>>>> which worked fine. JSP saving caused immediate replacement of the
>>>>>>>> page only - all happiness. Suddenly the behaviour changed; I'm not
>>>>>>>> quite sure but it may be after I added Struts support (from the
>>>>>>>> Exadel plugin). Since then I've tried the following:
>>>>>>>> - Uninstalled and re-installed the Exadel plugin
>>>>>>>> - Removed Struts support
>>>>>>>> - Removed the project from the server and added it again
>>>>>>>> - Deleted the server runtime and configured it again; deleted temp0
>>>>>>>> directories and publish.xml files several times
>>>>>>>> - Switched to another workspace and re-configured from scratch
>>>>>>>> - Re-installed Eclipse and used a new, clean workspace
>>>>>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>>>>>> - Starting Eclipse with and without option "-clean"
>>>>>>>> - Changed global preference settings and validation/builder settings
>>>>>>>> in the project preferences; disabled all validators
>>>>>>>> .. all to no avail.
>>>>>>>>
>>>>>>>> I have a separate test project with only one test JSP; even saving
>>>>>>>> this page restarts and republishes the other project (the big one)
>>>>>>>> if the test project is registered with the same server.
>>>>>>>>
>>>>>>>> Maybe somebody can tell me what's going on behind the curtains. WTP
>>>>>>>> seems to have become confused somewhere, but I don't know where to
>>>>>>>> look further. I have taken a look at the config files but these are
>>>>>>>> not self-documenting. If you know the rules for the project rebuild,
>>>>>>>> please let me know where to look; I don't mind looking at the source
>>>>>>>> code if I only knew where to start.
>>>>>>>>
>>>>>>>> This issue has been described previously in this group but nobody
>>>>>>>> took the trouble to reply. Sorry for posting it again - I'd be
>>>>>>>> grateful for your advice.
>>>>>>>>
>>>>>>>> Thanks & regards, Leo
>>>>>>>>
>>>>>>>>
>>>>>>>>
>
Re: JSP save causes re-deployment and restart [message #190334 is a reply to message #190288] Thu, 22 March 2007 05:28 Go to previous message
Leo Meyer is currently offline Leo Meyer
Messages: 7
Registered: July 2009
Junior Member
Hi Larry,

the bug ID is 178586. Thanks for giving me a tutorial about how to debug
Eclipse plugins ;-)

Regards, Leo

"Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
news:etrmfu$m48$1@utils.eclipse.org...
> Good work! I'm glad you were able to find the cause. It's probably a bug
> that publishing is silent about multiple files in a module being copied to
> the same destination file. Please do file a report. Thanks.
>
> Cheers,
> Larry
>
> Leo Meyer wrote:
>> Hi Larry,
>>
>> I have imported the plugin you suggested.
>> The "Run modules directly..." box is checked, so I debugged
>> PublishOperation2.execute().
>> Somewhere down the line there's an instruction:
>> IModuleResourceDelta[] delta = server.getPublishedResourceDelta(module);
>>
>> After execution delta contains two elements: a ModuleFolder "WEB-INF" (!)
>> with sub-elements and my modified JSP file.
>>
>> I have stepped through the code a bit and found the following:
>>
>> publish.xml contains duplicate entries, e.g.:
>>
>> <folder name="util" path="WEB-INF/classes/com/***/action/custom/***">
>> <file name="FieldNameFunction.class"
>> path="WEB-INF/classes/com/***/action/custom/***/util"
>> stamp="1174411121871"/>
>> <file name="FieldNameFunction.class"
>> path="WEB-INF/classes/com/***/action/custom/***/util"
>> stamp="1174410533354"/>
>> </folder>
>>
>> The timestamp of the file FieldNameFunction.class in the build output
>> folder is 1174410533(xxx) (2007-03-20 18:08:53). The timestamp of the
>> published file is the same. This corresponds with the second entry.
>>
>> The first timestamp (1174411121871) corresponds to the date "Tue Mar 20
>> 18:18:41". I have closed the workbench, deleted the publish.xml file,
>> started up and published again. The duplicate entries were there again,
>> with the identical timestamp (Tue Mar 20 18:18:41).
>>
>> There are many more duplicate entries, but all are below the com package
>> folder. Other top level folders are not affected.
>>
>> Now I realize what happened. I had two versions of the compiled classes
>> in my project: one in the build/classes folder (which was set as the
>> output folder) and one in the folder WEB-INF/classes. The WEB-INF/classes
>> folder does not show up in the Package Explorer view, which is why I
>> didn't realize it was there. It shows up in the Navigator view, however.
>> For some reason the file list that goes into publish.xml contains entries
>> for all of the paths.
>>
>> I don't know how I managed to get these two output folders. Maybe the
>> settings were changed when I added Struts support from the Exadel plugin.
>>
>> At first I thought it was a bug in WTP but now I see that it was a
>> curious coincidence. Add my inexperience to it and you get those strange
>> effects.
>>
>> Still I suggest that WTP may be modified such that duplicate entries in
>> publish.xml are prohibited. Logically it makes no sense to have two
>> sources for the same target, and their presence may indicate that
>> something is wrong with the project configuration.
>>
>> I will try to file a feature request. Many thanks for your help again!
>>
>> Regards, Leo
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>> news:etr984$qcb$1@utils.eclipse.org...
>>> You may want to import the org.eclipse.wst.server.core plug-in as well
>>> since that is where a lot of the server infrastructure is found,
>>> including RestartServerJob. Just to be sure, if you double-click the
>>> Tomcat server in the Servers view to open the server editor, is the "Run
>>> modules directly..." checkbox checked or unchecked? If checked, you
>>> could put a breakpoint in the execute() method of PublishOperation2 to
>>> step through exactly what is being published for a module. If the
>>> checkbox is unchecked, the breakpoint would go in the publishModule()
>>> method of TomcatServerBehavior.
>>>
>>> Cheers,
>>> Larry
>>>
>>> Leo Meyer wrote:
>>>> Hi Larry,
>>>>
>>>> I have found out that the server restart is handled by the class
>>>> RestartServerJob in the package org.eclipse.wst.server.core.internal. I
>>>> can't say, however, how this job is put into the job pool.
>>>> I haven't found any references to it in the
>>>> org.eclipse.jst.server.tomcat.core plugin. Since the publish task seems
>>>> to be triggered by the RestartServerJob (via Server.restart()) I
>>>> suspect that nothing is wrong with the tomcat plugin but the fault is
>>>> with the component that places the RestartServerJob in the worker pool.
>>>> If possible, please point me to the location where the saving of JSPs
>>>> is handled. I suppose that the rub is there.
>>>> Many thanks for your help so far!
>>>>
>>>> Regards, Leo
>>>>
>>>>
>>>>
>>>> "Leo Meyer" <leomeyer@gmx.de> schrieb im Newsbeitrag
>>>> news:etqp77$nsh$1@utils.eclipse.org...
>>>>> Hi Larry,
>>>>>
>>>>> thanks for your excellent instructions. I have been able to set up the
>>>>> debug workspace and I can reproduce the problem.
>>>>> I have set the "Restart server when necessary" preference to on. Just
>>>>> for clarity, here's the behaviour again:
>>>>> When I edit and save a JSP page the project is being rebuilt
>>>>> ("Building workspace" appears for a moment in the task panel), though
>>>>> all builders and validators are deactivated. The server is being
>>>>> stopped and restarted.
>>>>> The expected behaviour is: Publish JSP page to the web content folder,
>>>>> and nothing more.
>>>>> I have been able to set a breakpoint in PublishTask.getTask(), and I'm
>>>>> now trying to track down the problem.
>>>>>
>>>>> I'll post back if I find out more.
>>>>>
>>>>> Regards, Leo
>>>>>
>>>>>
>>>>>
>>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>>>> news:etp134$lop$1@utils.eclipse.org...
>>>>>> If you don't already have the JST SDK, you can use the Update Manager
>>>>>> to get it from the Web Tools Platform Update site. Once you have the
>>>>>> SDK, use File -> Switch Workspace to create new workspace. After any
>>>>>> routine setup you do for your workspaces, select File -> Import ->
>>>>>> "Plug-in Development" -> "Plug-ins and Fragments" and click Next.
>>>>>> Change "Import as" to "Projects with source folders" and click Next.
>>>>>> Wait for the "Plug-ins and Fragments Found" list to fully populate,
>>>>>> then scroll down and double-click org.eclipse.jst.server.tomcat.core,
>>>>>> then click Finish. Ignore the "Discouraged Access" warnings that may
>>>>>> appear in the Problems view. Right-click on the new project and
>>>>>> select "Debug As" -> "Eclipse Application". It will start a debug
>>>>>> session of Eclipse using a workspace named
>>>>>> "runtime-EclipseApplication" located as a sibling of the workspace
>>>>>> containing the tomcat plug-in. Getting to this point is fairly
>>>>>> simple. The trick now is to duplicate the problem in this debug
>>>>>> workspace. Once you get that point, post back and we'll figure out
>>>>>> the next step.
>>>>>>
>>>>>> Cheers,
>>>>>> Larry
>>>>>>
>>>>>> Leo Meyer wrote:
>>>>>>> Hi Larry,
>>>>>>>
>>>>>>> thanks for your help. I appreciate that you take the problem
>>>>>>> seriously.
>>>>>>>
>>>>>>> "Larry Isaacs" <Larry.Isaacs@sas.com> schrieb im Newsbeitrag
>>>>>>> news:etoo8d$hgn$1@utils.eclipse.org...
>>>>>>>> The problem is that is that no one really knows exactly what's
>>>>>>>> "special" about your Eclipse setup and workspace that's leading to
>>>>>>>> this behavior.
>>>>>>> Yes. I know that the matter is complicated, and that I can't expect
>>>>>>> definitive answers. I'm also willing to put some more effort into
>>>>>>> this.
>>>>>>>
>>>>>>>> I'm afraid I don't have any good guesses. If you are willing, I
>>>>>>>> would recommended installing or upgrading to the JST SDK to get
>>>>>>>> source for the org.eclipse.jst.server.tomcat.core plug-in, if you
>>>>>>>> don't have the SDK already. You could then create a new workspace
>>>>>>>> and import this plug-in. The next step would be to run that plug-in
>>>>>>>> in a debug session and under that debug session's workspace, import
>>>>>>>> your project and see if you can duplicate the problem. If so I can
>>>>>>>> help with debugging to see if more than just the changed JSP is
>>>>>>>> being copied during the publish. Maybe what is being published will
>>>>>>>> provide a clue as to who's making changes beyond the saved JSP. My
>>>>>>>> only shot in the dark is that it sounds like some builder in your
>>>>>>>> project is making changes, perhaps unnecessarily, that is
>>>>>>>> triggering this behavior.
>>>>>>> The strange thing is: only the JSP is being replaced. I have checked
>>>>>>> the timestamps of the files. Even more confusing (for me) is the
>>>>>>> fact that some _folders_ below WEB-INF/classes have their "modified"
>>>>>>> timestamps changed to the publish time - but none of the files
>>>>>>> within these folders are changed, though Windows indicates that they
>>>>>>> have been accessed at publish time.
>>>>>>> The publish.xml file gets a new timestamp, too. I have diffed two
>>>>>>> subsequent versions of publish.xml. The only difference is the entry
>>>>>>> for the JSP.
>>>>>>> It looks like something causes a WTP component to recursively
>>>>>>> traverse the folder structure and modify the timestamps of the
>>>>>>> folders (or has this been done by the OS?) while not touching the
>>>>>>> files at all (maybe it's doing a comparison).
>>>>>>> In my opinion there is nothing wrong with the publishing process at
>>>>>>> all - the problem seems to be in the triggering logic.
>>>>>>>
>>>>>>> There are three builders configured for the project: Java Builder,
>>>>>>> Faceted Project Validation Builder, and Validation. I have disabled
>>>>>>> all of them and still get the same behaviour. I have also suspended
>>>>>>> all validators, with no improvement.
>>>>>>>
>>>>>>> Thanks for your help offer. I will get the JST sources and try to
>>>>>>> debug them; however, I foresee that it might be a rather lengthy
>>>>>>> undertaking ;-)
>>>>>>> I'll post again here if I have more questions or answers.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Leo
>>>>>>>
>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Larry
>>>>>>>>
>>>>>>>> Leo wrote:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> it'd be great if somebody could help me to understand what's going
>>>>>>>>> on here...
>>>>>>>>> I have a fairly large dynamic web project featuring some JSPs, a
>>>>>>>>> large Java code base and lots of support libraries. The problem
>>>>>>>>> is, when I save a JSP page WTP thinks it has to trigger a complete
>>>>>>>>> rebuild, republish and server restart. Naturally this takes ages
>>>>>>>>> (and my box is fast).
>>>>>>>>> I'm using Eclipse 3.2.2, WTP 1.5.3 and Tomcat 4.1.
>>>>>>>>> When I took up development a few weeks ago I used Exadel Studio
>>>>>>>>> Pro which worked fine. JSP saving caused immediate replacement of
>>>>>>>>> the page only - all happiness. Suddenly the behaviour changed; I'm
>>>>>>>>> not quite sure but it may be after I added Struts support (from
>>>>>>>>> the Exadel plugin). Since then I've tried the following:
>>>>>>>>> - Uninstalled and re-installed the Exadel plugin
>>>>>>>>> - Removed Struts support
>>>>>>>>> - Removed the project from the server and added it again
>>>>>>>>> - Deleted the server runtime and configured it again; deleted
>>>>>>>>> temp0 directories and publish.xml files several times
>>>>>>>>> - Switched to another workspace and re-configured from scratch
>>>>>>>>> - Re-installed Eclipse and used a new, clean workspace
>>>>>>>>> - Got rid of the Exadel plugin and installed WTP 1.5.3 directly
>>>>>>>>> - Starting Eclipse with and without option "-clean"
>>>>>>>>> - Changed global preference settings and validation/builder
>>>>>>>>> settings in the project preferences; disabled all validators
>>>>>>>>> .. all to no avail.
>>>>>>>>>
>>>>>>>>> I have a separate test project with only one test JSP; even saving
>>>>>>>>> this page restarts and republishes the other project (the big one)
>>>>>>>>> if the test project is registered with the same server.
>>>>>>>>>
>>>>>>>>> Maybe somebody can tell me what's going on behind the curtains.
>>>>>>>>> WTP seems to have become confused somewhere, but I don't know
>>>>>>>>> where to look further. I have taken a look at the config files but
>>>>>>>>> these are not self-documenting. If you know the rules for the
>>>>>>>>> project rebuild, please let me know where to look; I don't mind
>>>>>>>>> looking at the source code if I only knew where to start.
>>>>>>>>>
>>>>>>>>> This issue has been described previously in this group but nobody
>>>>>>>>> took the trouble to reply. Sorry for posting it again - I'd be
>>>>>>>>> grateful for your advice.
>>>>>>>>>
>>>>>>>>> Thanks & regards, Leo
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>
Previous Topic:Announcing some changes to WTP Project Management
Next Topic:Changing format automatic <%@page import=... insertion to include space after @ delimiter
Goto Forum:
  


Current Time: Sat Aug 02 02:36:03 EDT 2014

Powered by FUDForum. Page generated in 0.02020 seconds