[Geoserver-devel] Re: Geoserver and tomcat

Quoting Dünnebeil Gerhard <Gerhard.Duennebeil@anonymised.com>:

Hello everybody,

I installed Geoserver 1.3.0-RC2 today (from the windows *.exe
installer) and found it running (after some clashes with java 1.5 and
xalan.jar).

As I also have a tomcat (on default path 8080 :slight_smile: running I have a
conflict here. The first approach to solve this is to shift the
GeoServer to another port but having to many services running on my
machine is not what I like best. So I tried to let GeoServer run
under tomcat.

This yielded the following error:

java.lang.IllegalStateException: getOutputStream() has already been
called for this response
  org.apache.catalina.connector.Response.getWriter(Response.java:596)

  org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:186)

  org.vfny.geoserver.wfs.servlets.TestWfsPost.processRequest(TestWfsPost.java:241)

  org.vfny.geoserver.wfs.servlets.TestWfsPost.doPost(TestWfsPost.java:73)

  javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Due to sun's documentation it is really forbidden to query both of
getOutputStream and getWriter so tomcat is probably right about
complaining and there is a bug in this code which is only tolerated
in the jetty container.

Is there something I must change to get things running?
Is this really a bug that needs fixing and reporting and if yes, what
is the right way to report it?

Yes, the getoutput stream stuff is forbidden, but afaik geoserver only
gets that error when something goes wrong as it's actually writing. If
you go to the web admin tool to Config->Server and set
VerboseExceptions to true, then we take a safer strategy of writing a
buffer of the response, to ensure that we report any error that occurs,
only writing out after we've done the test run. You can also set the
parameter in the web.xml file of GeoServer. David had a great idea of
doing only buffering the first few lines, as that's where errors really
occur. The buffering slows things down a lot when you're returning
hundreds of megs of GML, so that's why we don't have it on by default.

Changing this will likely reveal another error, but hopefully it should
be a more manageable one. What operation are you doing when you get
that error?

Also, just send these straight to geoserver-devel@lists.sourceforge.net,
instead of to geoserver-devel-admin.

best regards,

Chris

Best regards

Gerhard Dünnebeil
Tel: 050550 - 3173
Gerhard.Duennebeil@anonymised.com

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/