Encoding ...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Encoding ...

Nicolas Modrzyk-4
Hi list,

I am using jetty 5.1.4rc0 and encounter the following exception
(giving you the full stack trace at the end of this mail).

Is this a jetty problem or a Magnolia problem ?

Thank you for your work ! Of course, I am writing only about what's  
not working ... :)

Regards,

Nicolas Modrzyk,

Error

getReader() or getInputStream() called

java.lang.IllegalStateException: getReader() or getInputStream() called
     at  
org.mortbay.jetty.servlet.ServletHttpRequest.setCharacterEncoding
(ServletHttpRequest.java:602)
     at info.magnolia.cms.servlets.MVCServlet.doGet(MVCServlet.java:81)
     at info.magnolia.cms.servlets.MVCServlet.doPost(MVCServlet.java:48)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
     at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:427)
     at org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:832)
     at info.magnolia.cms.filters.MultipartRequestFilter.doFilter
(MultipartRequestFilter.java:64)
     at org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:823)
     at info.magnolia.cms.filters.ContentTypeFilter.doFilter
(ContentTypeFilter.java:48)
     at org.mortbay.jetty.servlet.WebApplicationHandler
$CachedChain.doFilter(WebApplicationHandler.java:823)
     at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
(WebApplicationHandler.java:473)
     at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:567)
     at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
     at org.mortbay.jetty.servlet.WebApplicationContext.handle
(WebApplicationContext.java:623)
     at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
     at org.mortbay.http.HttpServer.service(HttpServer.java:954)
     at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
     at org.mortbay.http.HttpConnection.handleNext
(HttpConnection.java:981)
     at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
     at org.mortbay.http.SocketListener.handleConnection
(SocketListener.java:244)
     at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
     at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Encoding ...

Chris Haynes
You get this error if you try to call setCharacterEncoding() after having
already read some of the input stream.

So it's almost certainly Magnolia's fault. It should call that API before making
any attempt to read any of the input. If you have access to the Magnolia source
code, check to see if this is what's happening.

Chris Haynes


"Nicolas Modrzyk" asked

> Hi list,
>
> I am using jetty 5.1.4rc0 and encounter the following exception
> (giving you the full stack trace at the end of this mail).
>
> Is this a jetty problem or a Magnolia problem ?
>
> Thank you for your work ! Of course, I am writing only about what's
> not working ... :)
>
> Regards,
>
> Nicolas Modrzyk,
>
> Error
>
> getReader() or getInputStream() called
>
> java.lang.IllegalStateException: getReader() or getInputStream() called
>      at
> org.mortbay.jetty.servlet.ServletHttpRequest.setCharacterEncoding
> (ServletHttpRequest.java:602)
>      at info.magnolia.cms.servlets.MVCServlet.doGet(MVCServlet.java:81)
>      at info.magnolia.cms.servlets.MVCServlet.doPost(MVCServlet.java:48)
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>      at org.mortbay.jetty.servlet.ServletHolder.handle
> (ServletHolder.java:427)
>      at org.mortbay.jetty.servlet.WebApplicationHandler
> $CachedChain.doFilter(WebApplicationHandler.java:832)
>      at info.magnolia.cms.filters.MultipartRequestFilter.doFilter
> (MultipartRequestFilter.java:64)
>      at org.mortbay.jetty.servlet.WebApplicationHandler
> $CachedChain.doFilter(WebApplicationHandler.java:823)
>      at info.magnolia.cms.filters.ContentTypeFilter.doFilter
> (ContentTypeFilter.java:48)
>      at org.mortbay.jetty.servlet.WebApplicationHandler
> $CachedChain.doFilter(WebApplicationHandler.java:823)
>      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
> (WebApplicationHandler.java:473)
>      at org.mortbay.jetty.servlet.ServletHandler.handle
> (ServletHandler.java:567)
>      at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
>      at org.mortbay.jetty.servlet.WebApplicationContext.handle
> (WebApplicationContext.java:623)
>      at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
>      at org.mortbay.http.HttpServer.service(HttpServer.java:954)
>      at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
>      at org.mortbay.http.HttpConnection.handleNext
> (HttpConnection.java:981)
>      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
>      at org.mortbay.http.SocketListener.handleConnection
> (SocketListener.java:244)
>      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Encoding ...

Nicolas Modrzyk-4
Hi Chris,

Yup, Magnolia code is calling the setCharacterEncoding method on the  
request.
Will look deeper into that.

Thank you for your really fast answer ! Really appreciate it.

Nicolas Modrzyk,

On May 19, 2005, at 6:04 PM, Chris Haynes wrote:

> You get this error if you try to call setCharacterEncoding() after  
> having
> already read some of the input stream.
>
> So it's almost certainly Magnolia's fault. It should call that API  
> before making
> any attempt to read any of the input. If you have access to the  
> Magnolia source
> code, check to see if this is what's happening.
>
> Chris Haynes
>
>
> "Nicolas Modrzyk" asked
>
>
>> Hi list,
>>
>> I am using jetty 5.1.4rc0 and encounter the following exception
>> (giving you the full stack trace at the end of this mail).
>>
>> Is this a jetty problem or a Magnolia problem ?
>>
>> Thank you for your work ! Of course, I am writing only about what's
>> not working ... :)
>>
>> Regards,
>>
>> Nicolas Modrzyk,
>>
>> Error
>>
>> getReader() or getInputStream() called
>>
>> java.lang.IllegalStateException: getReader() or getInputStream()  
>> called
>>      at
>> org.mortbay.jetty.servlet.ServletHttpRequest.setCharacterEncoding
>> (ServletHttpRequest.java:602)
>>      at info.magnolia.cms.servlets.MVCServlet.doGet
>> (MVCServlet.java:81)
>>      at info.magnolia.cms.servlets.MVCServlet.doPost
>> (MVCServlet.java:48)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>      at org.mortbay.jetty.servlet.ServletHolder.handle
>> (ServletHolder.java:427)
>>      at org.mortbay.jetty.servlet.WebApplicationHandler
>> $CachedChain.doFilter(WebApplicationHandler.java:832)
>>      at info.magnolia.cms.filters.MultipartRequestFilter.doFilter
>> (MultipartRequestFilter.java:64)
>>      at org.mortbay.jetty.servlet.WebApplicationHandler
>> $CachedChain.doFilter(WebApplicationHandler.java:823)
>>      at info.magnolia.cms.filters.ContentTypeFilter.doFilter
>> (ContentTypeFilter.java:48)
>>      at org.mortbay.jetty.servlet.WebApplicationHandler
>> $CachedChain.doFilter(WebApplicationHandler.java:823)
>>      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
>> (WebApplicationHandler.java:473)
>>      at org.mortbay.jetty.servlet.ServletHandler.handle
>> (ServletHandler.java:567)
>>      at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
>>      at org.mortbay.jetty.servlet.WebApplicationContext.handle
>> (WebApplicationContext.java:623)
>>      at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
>>      at org.mortbay.http.HttpServer.service(HttpServer.java:954)
>>      at org.mortbay.http.HttpConnection.service
>> (HttpConnection.java:814)
>>      at org.mortbay.http.HttpConnection.handleNext
>> (HttpConnection.java:981)
>>      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:
>> 831)
>>      at org.mortbay.http.SocketListener.handleConnection
>> (SocketListener.java:244)
>>      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:
>> 357)
>>      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:
>> 534)
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support