You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Armstrong <er...@sun.com> on 2002/06/14 01:27:12 UTC

Tomcat 4.0 Manager Install -- Brittle??

I've been using the ant install task to add a servlet
to a Tomcat 4.0 container.

Symptoms:
    1) The install script hangs.
    2) Tomcat crashes.
    3) Catalina.out shows that the app threw an
        exception at startup.

I understand having to fix my application, but its
weird that I have to restart Tomcat after each
failed attempt.

Is that a known problem with the Manager?

In 3.1, it was possible to update an app without having
to restart Tomcat. Does that feature exist in 4.0?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0 Manager Install -- Brittle??

Posted by Eric Armstrong <er...@sun.com>.
Yes, validation may have been one issue. Although I made
no substantive changes of which I was aware, it was one of
the ways I could cause the install to hang, and crash tomcat
in the process.

However, the install task hung and crashed tomcat in two
other ways, as well:
   a) An exception was thrown when a file was not found
       as the servlet was inititializing.
   b) An XML parsing exception was thrown when the
       XML data file turned out to be ill-formed.
---------------
I had this:
<!DOCTYPE name>
 <!ELEMENT ...>
</DOCTYPE>

instead of this:
<!DOCTYPE name
[
   <!ELEMENT ...>
]>
------------------------
Remy Maucherat wrote:

> Eric Armstrong wrote:
> > There was another error I was seeing that went away,
> > for no apparent reason. But it may help you reproduce
> > the hang I was seeing.
> >
> > I was seeing an XML validation error on the web.xml file.
> > It showed the allowable DTD structure for the web-app
> > element, but careful inspection of that file multiple times
> > didn't turn up anything wrong with it. (It was the same file
> > I had used successfully with 3.1)
> >
> > I reformated a bit for readability, and after saving the file,
> > the error went away. Strange and mysterious for me,
> > but it may be another way to reproduce the install-hangs-
> > and-crashes-Tomcat problem.
>
> Tomcat 3.1 didn't do proper validation of the web.xml. Tomcat 4.x does,
> and this includes the element order.
> That may have been the problem.
>
> Remy
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0 Manager Install -- Brittle??

Posted by Remy Maucherat <re...@apache.org>.
Eric Armstrong wrote:
> There was another error I was seeing that went away,
> for no apparent reason. But it may help you reproduce
> the hang I was seeing.
> 
> I was seeing an XML validation error on the web.xml file.
> It showed the allowable DTD structure for the web-app
> element, but careful inspection of that file multiple times
> didn't turn up anything wrong with it. (It was the same file
> I had used successfully with 3.1)
> 
> I reformated a bit for readability, and after saving the file,
> the error went away. Strange and mysterious for me,
> but it may be another way to reproduce the install-hangs-
> and-crashes-Tomcat problem.

Tomcat 3.1 didn't do proper validation of the web.xml. Tomcat 4.x does, 
and this includes the element order.
That may have been the problem.

Remy



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0 Manager Install -- Brittle??

Posted by Eric Armstrong <er...@sun.com>.
There was another error I was seeing that went away,
for no apparent reason. But it may help you reproduce
the hang I was seeing.

I was seeing an XML validation error on the web.xml file.
It showed the allowable DTD structure for the web-app
element, but careful inspection of that file multiple times
didn't turn up anything wrong with it. (It was the same file
I had used successfully with 3.1)

I reformated a bit for readability, and after saving the file,
the error went away. Strange and mysterious for me,
but it may be another way to reproduce the install-hangs-
and-crashes-Tomcat problem.

Eric Armstrong wrote:

> Remy Maucherat wrote:
>
> > Eric Armstrong wrote:
> > > I've been using the ant install task to add a servlet
> > > to a Tomcat 4.0 container.
> > >
> > > Symptoms:
> > >     1) The install script hangs.
> > >     2) Tomcat crashes.
> > >     3) Catalina.out shows that the app threw an
> > >         exception at startup.
> > >
> > > I understand having to fix my application, but its
> > > weird that I have to restart Tomcat after each
> > > failed attempt.
> > >
> > > Is that a known problem with the Manager?
> > >
> > > In 3.1, it was possible to update an app without having
> > > to restart Tomcat. Does that feature exist in 4.0?
> >
> > How do you reproduce that ?
>
> In my case, the app is throwing an exception because
> a file it was looking for wasn't found. (With the install
> task, I'm no longer copying to the webapps directory.
> That's a good thing, but I've had to figure out where
> files are relative to each other all over again.)
>
> The exception that gets thrown is:
> java.lang.Exception: No data file found:
>    /longPathFromRoot/servlet/build/glossary/main-glossary.xml
>    at pkg.XmlFile.init(Unknown Source)
>
> Where XmlFile is my DOM wrapper.
>
> The full dump from Catalina.out is reproduced below, in case
> it holds any clues.
> ==========================================
> Initializing com.sun.intl.GlossaryServlet at Thu Jun 13 16:24:19 PDT 2002
>   Initializing XmlFile
> java.lang.Exception: No data file found:
> /java/pubs/dev/glossary/servlet/build/glossary/main-glossary.xml
>  at com.sun.intl.XmlFile.init(Unknown Source)
>  at com.sun.intl.XmlFile.<init>(Unknown Source)
>  at com.sun.intl.DataModule.<init>(Unknown Source)
>  at com.sun.intl.GlossaryServlet.init(Unknown Source)
>  at javax.servlet.GenericServlet.init(GenericServlet.java:258)
>  at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:919)
>  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:811)
>  at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3293)
>
>  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3486)
>  at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>  at
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
>
>  at org.apache.catalina.core.StandardHost.install(StandardHost.java:773)
>  at org.apache.catalina.servlets.ManagerServlet.install(ManagerServlet.java:646)
>  at org.apache.catalina.servlets.ManagerServlet.doGet(ManagerServlet.java:339)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
>
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
>
>  at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:527)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
>
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
>  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
>
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
>
>  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
>
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
>
>  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
>
>  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:376)
>
>  at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:518)
>
>  at java.lang.Thread.run(Thread.java:536)
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0 Manager Install -- Brittle??

Posted by Eric Armstrong <er...@sun.com>.
Remy Maucherat wrote:

> Eric Armstrong wrote:
> > I've been using the ant install task to add a servlet
> > to a Tomcat 4.0 container.
> >
> > Symptoms:
> >     1) The install script hangs.
> >     2) Tomcat crashes.
> >     3) Catalina.out shows that the app threw an
> >         exception at startup.
> >
> > I understand having to fix my application, but its
> > weird that I have to restart Tomcat after each
> > failed attempt.
> >
> > Is that a known problem with the Manager?
> >
> > In 3.1, it was possible to update an app without having
> > to restart Tomcat. Does that feature exist in 4.0?
>
> How do you reproduce that ?

In my case, the app is throwing an exception because
a file it was looking for wasn't found. (With the install
task, I'm no longer copying to the webapps directory.
That's a good thing, but I've had to figure out where
files are relative to each other all over again.)

The exception that gets thrown is:
java.lang.Exception: No data file found:
   /longPathFromRoot/servlet/build/glossary/main-glossary.xml
   at pkg.XmlFile.init(Unknown Source)

Where XmlFile is my DOM wrapper.

The full dump from Catalina.out is reproduced below, in case
it holds any clues.
==========================================
Initializing com.sun.intl.GlossaryServlet at Thu Jun 13 16:24:19 PDT 2002
  Initializing XmlFile
java.lang.Exception: No data file found:
/java/pubs/dev/glossary/servlet/build/glossary/main-glossary.xml
 at com.sun.intl.XmlFile.init(Unknown Source)
 at com.sun.intl.XmlFile.<init>(Unknown Source)
 at com.sun.intl.DataModule.<init>(Unknown Source)
 at com.sun.intl.GlossaryServlet.init(Unknown Source)
 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:919)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:811)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3293)

 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3486)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)

 at org.apache.catalina.core.StandardHost.install(StandardHost.java:773)
 at org.apache.catalina.servlets.ManagerServlet.install(ManagerServlet.java:646)
 at org.apache.catalina.servlets.ManagerServlet.doGet(ManagerServlet.java:339)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)

 at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:527)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)

 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)

 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)

 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)

 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:376)

 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:518)

 at java.lang.Thread.run(Thread.java:536)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0 Manager Install -- Brittle??

Posted by Remy Maucherat <re...@apache.org>.
Eric Armstrong wrote:
> I've been using the ant install task to add a servlet
> to a Tomcat 4.0 container.
> 
> Symptoms:
>     1) The install script hangs.
>     2) Tomcat crashes.
>     3) Catalina.out shows that the app threw an
>         exception at startup.
> 
> I understand having to fix my application, but its
> weird that I have to restart Tomcat after each
> failed attempt.
> 
> Is that a known problem with the Manager?
> 
> In 3.1, it was possible to update an app without having
> to restart Tomcat. Does that feature exist in 4.0?

How do you reproduce that ?

You try to install an app which would have an incorrect web.xml, for 
example ?

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>