servlet output stream error

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

servlet output stream error

Guy McArthur
Greetings, I'm having trouble with a servlet previously running on
tomcat and resin.
The servlet performs an xsl transform, sending the result to the
response's output stream, e.g.

transformer.transform(source, new StreamResult(response.getWriter()));

In jetty (5.1.3), this always results in a mysterious array index out of
bounds exception (-1).

Is there another way I should send the output?




-------------------------------------------------------
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: servlet output stream error

Chris Haynes
Guy,

We'd have a better chance of working out what the problem is if you were to post
a full stack trace.

Chris Haynes



"Guy McArthur" reported:

> Greetings, I'm having trouble with a servlet previously running on
> tomcat and resin.
> The servlet performs an xsl transform, sending the result to the
> response's output stream, e.g.
>
> transformer.transform(source, new StreamResult(response.getWriter()));
>
> In jetty (5.1.3), this always results in a mysterious array index out of
> bounds exception (-1).
>
> Is there another way I should send the output?
>




-------------------------------------------------------
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: servlet output stream error

Guy McArthur
Chris Haynes wrote:

>Guy,
>
>We'd have a better chance of working out what the problem is if you were to post
>a full stack trace.
>
>  
>

No problem. Here it is.

14:43:54.259 WARN!! [P1-19]
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
 >11> /:
javax.servlet.ServletException: java.lang.ArrayIndexOutOfBoundsException: -1
        at servlets.ContentController3.doGet(ContentController3.java:360)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
        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.dispatch(WebApplicationHandler.java:475)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:275)
        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:169)
        at org.mortbay.jetty.servlet.Default.handleGet(Default.java:312)
        at org.mortbay.jetty.servlet.Default.service(Default.java:232)
        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.dispatch(WebApplicationHandler.java:475)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:556)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1563)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:623)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1515)
        at org.mortbay.http.HttpServer.service(HttpServer.java:956)
        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)

I have a servlet-mapping of *.xml to this servlet, and index.xml at the
top of the welcome-file-list, so a request of / becomes index.xml (from
the log, everything appears to be working up until the transform.

--
Guy




-------------------------------------------------------
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: servlet output stream error

Chris Haynes
The array index problem is at

servlets.ContentController3.doGet(ContentController3.java:360)


The class 'servlets.ContentController3' is not a Jetty or Java class. You need
to refer the problem to whoever wrote that class, or get access to its source
code yourself and work out what happens at line 360.

If it's your code, and you can't see why there should be a problem, post it here
and we'll take a look.

Chris Haynes


"Guy McArthur" responded:


> Chris Haynes wrote:
>
> >Guy,
> >
> >We'd have a better chance of working out what the problem is if you were to
post

> >a full stack trace.
> >
> >
> >
>
> No problem. Here it is.
>
> 14:43:54.259 WARN!! [P1-19]
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
>  >11> /:
> javax.servlet.ServletException: java.lang.ArrayIndexOutOfBoundsException: -1
>         at servlets.ContentController3.doGet(ContentController3.java:360)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
>         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.dispatch(WebApplicationHandler.j
ava:475)

>         at
> org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:275)
>         at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:169)
>         at org.mortbay.jetty.servlet.Default.handleGet(Default.java:312)
>         at org.mortbay.jetty.servlet.Default.service(Default.java:232)
>         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.dispatch(WebApplicationHandler.j
ava:475)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:556)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1563)
>         at
>
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.jav
a:623)

>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1515)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:956)
>         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)
>
> I have a servlet-mapping of *.xml to this servlet, and index.xml at the
> top of the welcome-file-list, so a request of / becomes index.xml (from
> the log, everything appears to be working up until the transform.
>
> --
> Guy




-------------------------------------------------------
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: servlet output stream error

Guy McArthur
Chris Haynes wrote:

>The array index problem is at
>
>servlets.ContentController3.doGet(ContentController3.java:360)
>
>
>The class 'servlets.ContentController3' is not a Jetty or Java class. You need
>to refer the problem to whoever wrote that class, or get access to its source
>code yourself and work out what happens at line 360.
>
>If it's your code, and you can't see why there should be a problem, post it here
>and we'll take a look.
>
>  
>
It turns out the problem was in the xsl files, something xalan doesn't
like....

--
Guy


-------------------------------------------------------
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