You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by William Jaynes <wj...@mediaone.net> on 2001/01/24 13:59:45 UTC

Tomcat reloading Struts app

The scenario is... while running a Struts app on Tomcat 3.2 with the nightly build from last night
(20010123), recompile one of the classes in the WEB-INF/classes directory, try to continue running
the app (that is, hit a button or link in the app)  The result, for me, is always a thrown exception
of some kind. This happens regardless of whether there was any significant change to the recompiled
class or not.

Clearly Tomcat is detecting the changed class and is doing something, presumably reloading the app.
I would expect that one would be able to continue with the app (presuming that the changes to the
class were not drastic) But, instead, I must always stop and start Tomcat and reenter the app from
the beginning.

Craig has made it clear that Tomcat will reload the app if it detects changes, and that seems to be
happening. I expected that this capability meant I could do hot reloads of the app, but this isn't
the case. I could use some clarification of what might be going on here. Thanks.

Will


Re: Tomcat reloading Struts app

Posted by Andrew Semprebon <se...@eqsystems.com>.
----- Original Message -----
From: "William Jaynes" <wj...@mediaone.net>
To: <st...@jakarta.apache.org>
Sent: Thursday, January 25, 2001 7:14 AM
Subject: Re: Tomcat reloading Struts app


> I haven't moved to Tomcat4 yet. If anyone else is using it I'd like to
know if the reloading of a
> Struts app works. If Tomcat4 is stable enough to develop with Struts, the
reloading feature would be
> a big incentive to move to it.
>
> Will
>
I've been using Tomcat 4, but with an older version of struts (20001218),
and have had similar problems with reloading.  Maybe if the latest version
of struts is stable enough to use with Tomcat 4, I'll try it out and see if
the problems go away.




Re: Tomcat reloading Struts app

Posted by William Jaynes <wj...@mediaone.net>.
----- Original Message -----
From: "Craig R. McClanahan" <Cr...@eng.sun.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, January 24, 2001 1:20 PM
Subject: Re: Tomcat reloading Struts app


> Andreas Joseph Krogh wrote:
>
> > On Wednesday 24 January 2001 13:59, you wrote:
> > > The scenario is... while running a Struts app on Tomcat 3.2 with the
> > > nightly build from last night (20010123), recompile one of the classes in
> > > the WEB-INF/classes directory, try to continue running the app (that is,
> > > hit a button or link in the app)  The result, for me, is always a thrown
> > > exception of some kind. This happens regardless of whether there was any
> > > significant change to the recompiled class or not.
> > >
> > > Clearly Tomcat is detecting the changed class and is doing something,
> > > presumably reloading the app. I would expect that one would be able to
> > > continue with the app (presuming that the changes to the class were not
> > > drastic) But, instead, I must always stop and start Tomcat and reenter the
> > > app from the beginning.
> > >
> > > Craig has made it clear that Tomcat will reload the app if it detects
> > > changes, and that seems to be happening. I expected that this capability
> > > meant I could do hot reloads of the app, but this isn't the case. I could
> > > use some clarification of what might be going on here. Thanks.
> > >
> > > Will
> >
> > I have the same problem, it throws
> > javax.servlet.ServletException:
> > org.apache.struts.util.PropertyMessageResources
> >
> > It seems the classloader has problems reloading the struts.jar for some
> > reason. I would really appreciate an answer to this so I can go on being
> > productive again:-)
> >
>
> This morning I applied a patch that may help ... the PropertyMessageResources
> object was not completely serializable.  Please try it again with tonight's
> nightly build.
>
> There may well be other issues with Tomcat 3.2 not always detecting changes in
> non-servlet classes, and possibly not cleanly restarting the app.  These are
> among the reasons that the internal approach to reloading used in Tomcat 4.0 is
> totally different.

I just tried this whole reloading an app thing with the 20010124 build. I still get an exception
thrown. Tomcat3.2 detects the change to my non-servlet class, but something goes wrong with the
reloading. I get various exceptions depending on where I am in the app. Some of the ones I've seen
are

- javax.servlet.jsp.JspException: object is not an instance of declaring class
- javax.servlet.ServletException: org.apache.struts.action.ActionMappings
- javax.servlet.ServletException: org.apache.struts.util.PropertyMessageResources

I haven't moved to Tomcat4 yet. If anyone else is using it I'd like to know if the reloading of a
Struts app works. If Tomcat4 is stable enough to develop with Struts, the reloading feature would be
a big incentive to move to it.

Will


Re: Tomcat reloading Struts app

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Andreas Joseph Krogh wrote:

> On Wednesday 24 January 2001 13:59, you wrote:
> > The scenario is... while running a Struts app on Tomcat 3.2 with the
> > nightly build from last night (20010123), recompile one of the classes in
> > the WEB-INF/classes directory, try to continue running the app (that is,
> > hit a button or link in the app)  The result, for me, is always a thrown
> > exception of some kind. This happens regardless of whether there was any
> > significant change to the recompiled class or not.
> >
> > Clearly Tomcat is detecting the changed class and is doing something,
> > presumably reloading the app. I would expect that one would be able to
> > continue with the app (presuming that the changes to the class were not
> > drastic) But, instead, I must always stop and start Tomcat and reenter the
> > app from the beginning.
> >
> > Craig has made it clear that Tomcat will reload the app if it detects
> > changes, and that seems to be happening. I expected that this capability
> > meant I could do hot reloads of the app, but this isn't the case. I could
> > use some clarification of what might be going on here. Thanks.
> >
> > Will
>
> I have the same problem, it throws
> javax.servlet.ServletException:
> org.apache.struts.util.PropertyMessageResources
>
> It seems the classloader has problems reloading the struts.jar for some
> reason. I would really appreciate an answer to this so I can go on being
> productive again:-)
>

This morning I applied a patch that may help ... the PropertyMessageResources
object was not completely serializable.  Please try it again with tonight's
nightly build.

There may well be other issues with Tomcat 3.2 not always detecting changes in
non-servlet classes, and possibly not cleanly restarting the app.  These are
among the reasons that the internal approach to reloading used in Tomcat 4.0 is
totally different.

>
> --
> Andreas Joseph Krogh <an...@nettet.no>

Craig



Re: Tomcat reloading Struts app

Posted by Andreas Joseph Krogh <an...@nettet.no>.
On Wednesday 24 January 2001 13:59, you wrote:
> The scenario is... while running a Struts app on Tomcat 3.2 with the
> nightly build from last night (20010123), recompile one of the classes in
> the WEB-INF/classes directory, try to continue running the app (that is,
> hit a button or link in the app)  The result, for me, is always a thrown
> exception of some kind. This happens regardless of whether there was any
> significant change to the recompiled class or not.
>
> Clearly Tomcat is detecting the changed class and is doing something,
> presumably reloading the app. I would expect that one would be able to
> continue with the app (presuming that the changes to the class were not
> drastic) But, instead, I must always stop and start Tomcat and reenter the
> app from the beginning.
>
> Craig has made it clear that Tomcat will reload the app if it detects
> changes, and that seems to be happening. I expected that this capability
> meant I could do hot reloads of the app, but this isn't the case. I could
> use some clarification of what might be going on here. Thanks.
>
> Will

I have the same problem, it throws
javax.servlet.ServletException: 
org.apache.struts.util.PropertyMessageResources

It seems the classloader has problems reloading the struts.jar for some 
reason. I would really appreciate an answer to this so I can go on being 
productive again:-)

-- 
Andreas Joseph Krogh <an...@nettet.no>