Home » Language IDEs » ServerTools (WTP) » Unexpected context restarts
|
Re: Unexpected context restarts [message #661627 is a reply to message #661613] |
Fri, 25 March 2011 15:27 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
On 3/25/2011 10:59 AM, Julien lott wrote:
> Hi everyone,
>
> I face a problem with the configuration of my server.
>
> I'm using Tomcat 6.0 with an web application made with Cocoon's framework.
>
> With the old version of Eclipse (Galileo), when I run the server. I
> could change dynamically my resources without automatically restart
> context. I didn't loose my session and everything was alright. I just
> needed to restart the context when I changed the Java code.
>
> But now, with the new version (Helios), whatever the change I do, the
> context always restart. And sometime, the restart of the context is
> wrong : I can see a "ClassNotDefFound" exception thrown. In this case, a
> clean action is neccessary in order to run the application without
> problems.
>
> Is there an option existing in Eclipse that can solve my problem ?
>
> Cordialy,
> Julien.
Which version of WTP are you using?
WTP will internally generate a MANIFEST.MF for utility projects to
ensure it contains appropriate dependencies. There was checking in
Galileo to prevent this internally generated MANIFEST.MF from making the
utility project appear to need rebuilding for every publish to the
server. This checking was inadvertently removed in WTP 3.2 and I
believe restored in WTP 3.2.2. Rebuilding of a utility jar in every
publish would trigger this kind of behavior in Tomcat.
Cheers,
Larry
|
|
| |
Re: Unexpected context restarts [message #661857 is a reply to message #661613] |
Mon, 28 March 2011 09:19 |
Mauro Molinari Messages: 285 Registered: July 2009 |
Senior Member |
|
|
Il 25/03/2011 15:59, Julien lott ha scritto:
> But now, with the new version (Helios), whatever the change I do, the
> context always restart. And sometime, the restart of the context is
> wrong : I can see a "ClassNotDefFound" exception thrown. In this case, a
> clean action is neccessary in order to run the application without
> problems.
Unfortunately, this problem in publishing (resources not published,
"NoClassDefFound" errors...) frequently happens to my team members too
and it also happened to me some times. There must be some bug in the
publishing code, but I couldn't reproduce it in a reproducible way in
order to open a bug report :-(
Mauro.
|
|
| | |
Re: Unexpected context restarts [message #661919 is a reply to message #661905] |
Mon, 28 March 2011 14:13 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
On 3/28/2011 9:37 AM, Mauro Molinari wrote:
> Il 28/03/2011 13:34, Julien lott ha scritto:
>> Do you think that the problem is linked to the checking of MANIFEST.MF
>> like Larry ? If it's a code publishing problem, is there anything we
>> could do to solve it ?
>
> If I understood it right, the checking of the MANIFEST.MF could be the
> cause of the publishing occuring when not needed, while I don't know
> what the source of the problem that makes the published webapp to be
> corrupted could be.
> Maybe Larry can help us suggesting some trials we may do to try to
> reproduce...
>
> Mauro.
It turns out Bug 326456 wasn't fixed until WTP 3.2.3[1]. Are either of
you seeing this behavior with that version?
With respect to seeing odd behavior after a context restart, I think the
first step will be to determine if restarting the server fixes the
behavior. If it does, it suggests that publishing was successful, and
the restart is having some problem picking up all the changes that got
published.
Cheers,
Larry
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=326456
|
|
| | |
Re: Unexpected context restarts [message #662667 is a reply to message #662648] |
Thu, 31 March 2011 13:34 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
On 3/31/2011 8:31 AM, Mauro Molinari wrote:
> Il 28/03/2011 16:13, Larry Isaacs ha scritto:
>> With respect to seeing odd behavior after a context restart, I think the
>> first step will be to determine if restarting the server fixes the
>> behavior. If it does, it suggests that publishing was successful, and
>> the restart is having some problem picking up all the changes that got
>> published.
>
> No, when I see the odd behavior, restarting the server doesn't help. I
> have to "clean" the server in order to get contents published back
> correctly. If I have a look to the publishing directory when the odd
> behavior happens, I can see that many classes are missing, while the
> whole directory structure seems ok.
>
> Mauro.
I'm really baffled as to why files would disappear. It suggests the
"delta" publishing is getting confused. The cached information for the
"delta" publishing is stored in a "publish?.dat" file in the
".metadata\.plugins\org.eclipse.wst.server.core\publish" folder in your
workspace, one for each server. Which file belongs with which server is
identified in the "publish.xml" file in the
"org.eclipse.wst.server.core" folder. For your server, how big is this
file for your server?
Cheers,
Larry
|
|
| | | | | | | |
Re: Unexpected context restarts [message #666177 is a reply to message #666045] |
Tue, 19 April 2011 12:13 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
On 4/18/2011 2:47 PM, Ian Brandt wrote:
> As an update it appears that conf/Catalina/localhost/ROOT.xml is being
> watched as both a reload and redeploy resource:
>
> 2011-04-18 09:46:28,068 DEBUG [HostConfig]
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]: Checking
> context[] redeploy resource
> /[...]/tomcat/6.0.26/home/conf/Catalina/localhost/ROOT.xml
> Checking context[] redeploy resource
> /[...]/tomcat/6.0.26/home/wtpwebapps/mycompany-web
> Checking context[] reload resource /[...]/tomcat/6.0.26/home/conf/web.xml
> Checking context[] reload resource
> /[...]/tomcat/6.0.26/home/conf/context.xml
> Checking context[] reload resource
> /[...]/tomcat/6.0.26/home/conf/Catalina/localhost/ROOT.xml
> Checking context[] reload resource
> /[...]/tomcat/6.0.26/home/wtpwebapps/mycompany-web/WEB-INF/w eb.xml
> 2011-04-18 09:46:38,069 INFO [HostConfig]
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]: Undeploying
> context []
> [...]
>
>
> Based on last modified timestamp I'm observing that
> conf/Catalina/localhost/ROOT.xml is updated every time I change a JSP.
> Per
> http://wiki.eclipse.org/WTP_Tomcat_FAQ#Can_I_add_or_remove_a _project_from_a_server.2C_or_publish_changes_for_a_project_a lready_on_a_server.2C_while_that_server_is_running.3F
> it appears my subsequent redeploy kicks off before the publish is
> complete, hence the startup errors.
>
> Is my issue that autoDeploy="true" on my <Host />, or that ROOT.xml is
> being republished for just a JSP change?
One of the reasons the contexts are published to "wtpwebapps" instead of
"webapps" is so that autoDeploy won't apply. Also, there is some effort
made in the WTP Tomcat plug-ins to avoid rewriting configuration files
with identical contents, effectively just updating the timestamp.
However, off the top of my head, I don't recall how far that went with
"Publish module contexts to separate XML files" enabled. I also would
not have expected a context to reload with reloadable="false" set on the
context, but perhaps Tomcat gives special handling for the "ROOT" context.
If you disable the "Publish module contexts to separate XML files"
option, do you still get this behavior?
Cheers,
Larry
|
|
|
Goto Forum:
Current Time: Wed Sep 25 17:28:49 GMT 2024
Powered by FUDForum. Page generated in 0.05416 seconds
|