RE: Tomcat does not respond

2009-05-28 Thread Diego Castorina
I use the ServletOutputStream because I need to write binary directly in the 
response while with the PrintWriter I can only write character text to the 
client.
I don't understand the reason for this exception since I don't use the JsonView 
class for the requests that return a binary as output. 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: giovedì 28 maggio 2009 15.15
To: Tomcat Users List
Subject: RE: Tomcat does not respond

 From: Diego Castorina [mailto:di...@quince.nl]
 Subject: RE: Tomcat does not respond
 
 SEVERE: Servlet.service() for servlet springapp threw exception
 java.lang.IllegalStateException: getOutputStream() has already been
 called for this response
 at org.apache.catalina.connector.Response.getWriter(Response.java:604)
 at 
 org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
 at 
 org.springframework.web.servlet.view.json.JsonView.renderMergedOutputModel(JsonView.java:60)

It would seem like the first thing you need to do is fix your webapp so it 
doesn't provoke the above error.  If Spring intends to use the Writer 
associated with the Response object, you cannot use the OutputStream (and vice 
versa).  Fix the other parts of your webapp to use Response.getWriter(), not 
Response.getOutputStream().

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Diego Castorina | quince
--
mobile  
e-mail  di...@quince.nl
web www.quince.nl
--
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopiëren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat does not respond

2009-05-28 Thread Diego Castorina
Thanks for the tip.
How can I write this wrapper?
I can have different kind of client so I cannot encode the binary as string and 
decoding it on the client side.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: giovedì 28 maggio 2009 16.12
To: Tomcat Users List
Subject: RE: Tomcat does not respond

 From: Diego Castorina [mailto:di...@quince.nl]
 Subject: RE: Tomcat does not respond
 
 I use the ServletOutputStream because I need to write binary directly
 in the response while with the PrintWriter I can only write character
 text to the client.

Then you may need to resort to your own wrapper for the Response object, and it 
can coordinate the use of the Writer with the OutputStream.

 I don't understand the reason for this exception since I don't use the
 JsonView class for the requests that return a binary as output.

The stack trace clearly shows you're mistaken.  You may not use it explicitly, 
but something you're using in Spring obviously does.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Diego Castorina | quince
--
mobile  
e-mail  di...@quince.nl
web www.quince.nl
--
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopiëren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat does not respond

2009-05-27 Thread Diego Castorina
Hi everyone,

 

We are currently running Tomcat 6.0.14 on a Ubuntu Server 8.04 and Java
1.6.

Two applications are running: 

-  One of them uses Spring MVC and Jackrabbit providing RESTful
API

-  The second is a client of the former with no database but it
is a Grails application 

 

The server completely stop responding around 2 times a day but nothing
emerges from the logs.

It hangs on every request, even on the index.htm containing a Hello
World

 

Any clues?



Diego Castorina | quince
--
mobile  
e-mail  di...@quince.nl
web www.quince.nl
--
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopieren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions