Jump to content
We've recently updated our Privacy Statement, available here ×

Problem Running WebApp Sample


Recommended Posts

By: Karl Adam Diethrick - karld1

Problem Running WebApp Sample

2003-10-07 13:28

I created a .EAR file using the contents of demosampleswebapp in the JasperReports installation.

 

I then installed the .EAR into my WebSphere 5 Application Server. It works, however, when running servlet and jsp samples, occasionaly, a page will not display. I then hit refresh in the browser and it comes right up. This happens quite often in the html paging example. My WebSphere Server is not being used by anyone else, and it is a very beefy machine with 1.5 GB of RAM and dual Xenon processors.

 

What would be causing these pages not to be served? For example, if I go to the paging example, and click on the button to go to the second page, it almost always results in Page not Found error. But then when I use the browser's refresh button, the page comes up instantly.

 

 

 

 

 

 

By: Karl Adam Diethrick - karld1

RE: Problem Running WebApp Sample

2003-10-07 14:01

I tried accessing the sample in Netscape 7.1 and got a little more info. IE 6 was just saying "Page can not be displayed". However, Netscape says Error 500: Output stream already received.

 

Does this give anybody any clue as to what is wrong?

 

 

 

 

By: Karl Adam Diethrick - karld1

RE: Problem Running WebApp Sample

2003-10-09 07:09

Here is from my AppServer's Log File

 

[10/9/03 9:05:43:406 EDT] 719b8bab WebGroup E SRVE0026E: [servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained

at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:514)

at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Compiled Code))

at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:193)

at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:246)

at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:197)

at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:255)

at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:249)

at org.apache.jsp._image._jspService(_image.java:114)

at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:694)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:792)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:923)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:528)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:516)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

[10/9/03 9:05:43:422 EDT] 719b8bab TraceNLS u No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.1367.response.bytes.written,.but.Content-Length.header.equals.1325 in bundle com.ibm.ejs.resources.seriousMessages

[10/9/03 9:05:43:422 EDT] 719b8bab HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: 1367 response bytes written, but Content-Length header equals 1325

[10/9/03 9:05:43:422 EDT] 719b8bab SystemOut O java.lang.IllegalStateException: 1367 response bytes written, but Content-Length header equals 1325

[10/9/03 9:05:43:422 EDT] 719b8bab SystemOut O at com.ibm.ws.http.HttpResponse.finish(HttpResponse.java:89)

[10/9/03 9:05:43:422 EDT] 719b8bab SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:565)

[10/9/03 9:05:43:422 EDT] 719b8bab SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

[10/9/03 9:05:43:422 EDT] 719b8bab SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/9/03 9:05:43:469 EDT] 45658bb9 WebGroup E SRVE0026E: [servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained

at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:514)

at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Compiled Code))

at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:193)

at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:246)

at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:197)

at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:255)

at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:249)

at org.apache.jsp._image._jspService(_image.java:114)

at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:694)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:792)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:923)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:528)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:516)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

[10/9/03 9:05:43:469 EDT] 45658bb9 TraceNLS u No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.849.response.bytes.written,.but.Content-Length.header.equals.807 in bundle com.ibm.ejs.resources.seriousMessages

[10/9/03 9:05:43:469 EDT] 45658bb9 HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:43:484 EDT] 45658bb9 SystemOut O java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:43:484 EDT] 45658bb9 SystemOut O at com.ibm.ws.http.HttpResponse.finish(HttpResponse.java:89)

[10/9/03 9:05:43:484 EDT] 45658bb9 SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:565)

[10/9/03 9:05:43:484 EDT] 45658bb9 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

[10/9/03 9:05:43:484 EDT] 45658bb9 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 WebGroup E SRVE0026E: [servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained

at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:514)

at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Compiled Code))

at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:193)

at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:246)

at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:197)

at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:255)

at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:249)

at org.apache.jsp._image._jspService(_image.java:114)

at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:694)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:792)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:923)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:528)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:516)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

[10/9/03 9:05:45:750 EDT] 4f280ba5 WebGroup E SRVE0026E: [servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained

at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:514)

at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Compiled Code))

at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:193)

at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:246)

at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:197)

at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:255)

at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:249)

at org.apache.jsp._image._jspService(_image.java:114)

at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:694)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:792)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:923)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:528)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:516)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 TraceNLS u No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.1367.response.bytes.written,.but.Content-Length.header.equals.1325 in bundle com.ibm.ejs.resources.seriousMessages

[10/9/03 9:05:45:750 EDT] 4f280ba5 TraceNLS u No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.849.response.bytes.written,.but.Content-Length.header.equals.807 in bundle com.ibm.ejs.resources.seriousMessages

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: 1367 response bytes written, but Content-Length header equals 1325

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 SystemOut O java.lang.IllegalStateException: 1367 response bytes written, but Content-Length header equals 1325

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 SystemOut O at com.ibm.ws.http.HttpResponse.finish(HttpResponse.java:89)

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:565)

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

[10/9/03 9:05:45:750 EDT] 4f2d0ba5 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/9/03 9:05:45:750 EDT] 4f280ba5 HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:45:750 EDT] 4f280ba5 SystemOut O java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:45:750 EDT] 4f280ba5 SystemOut O at com.ibm.ws.http.HttpResponse.finish(HttpResponse.java:89)

[10/9/03 9:05:45:750 EDT] 4f280ba5 SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:565)

[10/9/03 9:05:45:750 EDT] 4f280ba5 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

[10/9/03 9:05:45:750 EDT] 4f280ba5 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/9/03 9:05:46:719 EDT] 45658bb9 WebGroup E SRVE0026E: [servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained

at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:514)

at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Compiled Code))

at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:193)

at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:246)

at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:197)

at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:255)

at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:249)

at org.apache.jsp._image._jspService(_image.java:114)

at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:694)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:792)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:923)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:528)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:516)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

[10/9/03 9:05:46:734 EDT] 45658bb9 TraceNLS u No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.849.response.bytes.written,.but.Content-Length.header.equals.807 in bundle com.ibm.ejs.resources.seriousMessages

[10/9/03 9:05:46:734 EDT] 45658bb9 HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:46:734 EDT] 45658bb9 SystemOut O java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:46:734 EDT] 45658bb9 SystemOut O at com.ibm.ws.http.HttpResponse.finish(HttpResponse.java:89)

[10/9/03 9:05:46:734 EDT] 45658bb9 SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:565)

[10/9/03 9:05:46:734 EDT] 45658bb9 SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

[10/9/03 9:05:46:734 EDT] 45658bb9 SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[10/9/03 9:05:47:859 EDT] 719b8bab WebGroup E SRVE0026E: [servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained

at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:514)

at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Compiled Code))

at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:193)

at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:246)

at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:197)

at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:255)

at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:249)

at org.apache.jsp._image._jspService(_image.java:114)

at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:694)

at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:792)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:923)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:528)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)

at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)

at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:516)

at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

[10/9/03 9:05:47:875 EDT] 719b8bab TraceNLS u No message text associated with key HttpConnection.run:.java.lang.IllegalStateException:.849.response.bytes.written,.but.Content-Length.header.equals.807 in bundle com.ibm.ejs.resources.seriousMessages

[10/9/03 9:05:47:875 EDT] 719b8bab HttpConnectio E HttpConnection.run: java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:47:875 EDT] 719b8bab SystemOut O java.lang.IllegalStateException: 849 response bytes written, but Content-Length header equals 807

[10/9/03 9:05:47:875 EDT] 719b8bab SystemOut O at com.ibm.ws.http.HttpResponse.finish(HttpResponse.java:89)

[10/9/03 9:05:47:875 EDT] 719b8bab SystemOut O at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:565)

[10/9/03 9:05:47:875 EDT] 719b8bab SystemOut O at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:366)

[10/9/03 9:05:47:875 EDT] 719b8bab SystemOut O at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

 

 

 

 

 

By: Chuck Deal - cdeal

RE: Problem Running WebApp Sample

2003-10-09 07:22

You can't use out and getOutputStream on the same JSP page. Verify that you are using one or the other.

 

 

 

 

By: Karl Adam Diethrick - karld1

RE: Problem Running WebApp Sample

2003-10-09 07:48

What about in a servlet like this. Is what they are doing here OK?

 

/*

* ============================================================================

* The JasperReports License, Version 1.0

* ============================================================================

*

* Copyright © 2001-2003 Teodor Danciu (teodord@hotmail.com). All rights reserved.

*

* Redistribution and use in source and binary forms, with or without modification,

* are permitted provided that the following conditions are met:

*

* 1. Redistributions of source code must retain the above copyright notice,

* this list of conditions and the following disclaimer.

*

* 2. Redistributions in binary form must reproduce the above copyright notice,

* this list of conditions and the following disclaimer in the documentation

* and/or other materials provided with the distribution.

*

* 3. The end-user documentation included with the redistribution, if any, must

* include the following acknowledgment: "This product includes software

* developed by Teodor Danciu (http://jasperreports.sourceforge.net)."

* Alternately, this acknowledgment may appear in the software itself, if

* and wherever such third-party acknowledgments normally appear.

*

* 4. The name "JasperReports" must not be used to endorse or promote products

* derived from this software without prior written permission. For written

* permission, please contact teodord@hotmail.com.

*

* 5. Products derived from this software may not be called "JasperReports", nor

* may "JasperReports" appear in their name, without prior written permission

* of Teodor Danciu.

*

* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,

* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND

* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,

* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-

* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS

* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON

* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF

* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

 

/*

* ============================================================================

* GNU Lesser General Public License

* ============================================================================

*

* JasperReports - Free Java report-generating library.

* Copyright © 2001-2003 Teodor Danciu teodord@hotmail.com

*

* This library is free software; you can redistribute it and/or

* modify it under the terms of the GNU Lesser General Public

* License as published by the Free Software Foundation; either

* version 2.1 of the License, or (at your option) any later version.

*

* This library is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

* Lesser General Public License for more details.

*

* You should have received a copy of the GNU Lesser General Public

* License along with this library; if not, write to the Free Software

* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

*

* Teodor Danciu

* 173, Calea Calarasilor, Bl. 42, Sc. 1, Ap. 18

* Postal code 741181, Sector 3

* Bucharest, ROMANIA

* Email: teodord@hotmail.com

*/

package servlets;

 

import datasource.*;

import dori.jasper.engine.*;

 

import java.io.*;

import java.util.*;

import javax.servlet.*;

import javax.servlet.http.*;

 

 

/**

*

*/

public class PdfServlet extends HttpServlet

{

 

 

/**

*

*/

public void service(

HttpServletRequest request,

HttpServletResponse response

) throws IOException, ServletException

{

ServletContext context = this.getServletConfig().getServletContext();

 

File reportFile = new File(context.getRealPath("/reports/WebappReport.jasper"));

 

Map parameters = new HashMap();

parameters.put("ReportTitle", "Address Report");

parameters.put("BaseDir", reportFile.getParentFile());

 

byte[] bytes = null;

 

try

{

bytes =

JasperRunManager.runReportToPdf(

reportFile.getPath(),

parameters,

new WebappDataSource()

);

}

catch (JRException e)

{

response.setContentType("text/html");

PrintWriter out = response.getWriter();

out.println("<html>");

out.println("<head>");

out.println("<title>JasperReports - Web Application Sample</title>");

out.println("<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">");

out.println("</head>");

 

out.println("<body bgcolor="white">");

 

out.println("<span class="bnew">JasperReports encountered this error :</span>");

out.println("<pre>");

 

e.printStackTrace(out);

 

out.println("</pre>");

 

out.println("</body>");

out.println("</html>");

 

return;

}

 

if (bytes != null && bytes.length > 0)

{

response.setContentType("application/pdf");

response.setContentLength(bytes.length);

ServletOutputStream ouputStream = response.getOutputStream();

ouputStream.write(bytes, 0, bytes.length);

ouputStream.flush();

ouputStream.close();

}

else

{

response.setContentType("text/html");

PrintWriter out = response.getWriter();

out.println("<html>");

out.println("<head>");

out.println("<title>JasperReports - Web Application Sample</title>");

out.println("<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">");

out.println("</head>");

 

out.println("<body bgcolor="white">");

 

out.println("<span class="bold">Empty response.</span>");

 

out.println("</body>");

out.println("</html>");

}

}

 

 

}

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...