Forward Request giving java.lang.IllegalStateException

Hi Friends,
I am using RequestDispatcher to forwrd my request from one servlet to another
Here's the code
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class TryServlet extends HttpServlet
public void service(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:con";
Connection con= DriverManager.getConnection(url,"scott","tiger");     
Statement stmt=con.createStatement();
ResultSet rst=stmt.executeQuery("select * from Projects");
response.setContentType("text/html");
PrintWriter out=response.getWriter();
while (rst.next())
String firstname=rst.getString("PIN");
String lastname=rst.getString("ProjectTitle");
out.println("<p> Name:"+firstname+" "+lastname+"");     
con.close();
RequestDispatcher rd=getServletContext().getNamedDispatcher("HelloServlet");
rd.forward(request,response);
return;
catch(Exception e)
e.printStackTrace();
I m getting the error
java.lang.IllegalStateException: Cannot forward after response has been committed
i need to include the two rows of tables before i forwad the request to HelloServlet
What needs to be done?
thanx
Pooja

Don't spread the generation of output over several servlets. Your first servlet should retrieve the data and your second servlet should display the data.
Store the data retrieved as a request attribute before forwarding:
// Data.java
public class Data  {
  public String _firstname;
  public String _lastname;
  public data(String firstname, String lastname)  {
    _firstname = firstname;
    _lastname = lastname;
    return;
//  TryServlet.java
public class TryServlet extends HttpServlet
  List list = new ArrayList();
  while (rst.next())  {  //  store data in list
    String firstname=rst.getString("PIN");
    String lastname=rst.getString("ProjectTitle");
    Data data = new data(firstname, lastname);
    list.add(data);
  con.close();
  request.setAttribute("list", list);  //  store list in request
  RequestDispatcher rd=getServletContext().getNamedDispatcher("HelloServlet");
  rd.forward(request,response);  // list is forwarded as well
  return;
}In HelloServlet, you get the request's attribute and display the data:
  List list = (List)request.getAttribute("list");  //  retrieve list from request
  Iterator it = list.iterator();
  while (it.hasNext())  {  //  retrieve data from list and display
    Data data = (Data)it.next();
    out.println("<p>Name: " + data._firstname + " " + data._lastname + "</p>");
  }Btw, for displaying the data, a JSP will do better.
Two Bears.

Similar Messages

  • Java.lang.IllegalStateException when trying to load graphic from KM

    Hello,
    I'm currently facing the following problems.We have a bunch of SVG graphics in a KM-Repository which are displayed to the user. The graphics are embedded in a JSP file. In most of the cases this works fine, but for users with a low bandwith this does not work. An error message is written to the logfile which looks like that:
    serving request (-> 500) - java.lang.IllegalStateException: GET on
    http://ourserver.com/irj/go/km/docs/ourRepository/myGraphic.svg expected 377950 bytes, but got
    262144 bytes and wrote 196608 bytes. The exception message is: Write timeout. HTTP client read
    timeout or callback from dispatcher not received for [120000] milliseconds. -
    com.sap.engine.services.httpserver.exceptions.HttpIOException: Write timeout. HTTP client read
    timeout or callback from dispatcher not received for [120000] milliseconds.
         at com.sap.engine.services.httpserver.server.ResponseImpl.sendResponse(ResponseImpl.java:280)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:440)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:234)
         at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.copy(WDGetHandler.java:744)
         at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.internalHandleWDGetHandler.java:691)
    at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.handle(WDGetHandler.java:263)
         at com.sapportals.wcm.protocol.webdav.server.WDServlet.doGet(WDServlet.java:791)
         at com.sapportals.wcm.protocol.webdav.server.WDServlet.service(WDServlet.java:483)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)+
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:333)+
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ...
    Some more facts:
    The problem occors on different graphics
    The values 262144 and 196608 (from but got 262144 bytes and wrote 196608 bytes) come up in most cases, but sometimes they vary. But all values have in common, that they are a multiple of 4096 (which is the setting of the parameter ServletsLongDataTransferCallbackSize.
    According to the SAP Notes 1014039 and 807000 I adapted some settings in our Testsystem:
    ServletsLongDataTransferCallbackSize: 1024 (which was set to 4096 before)
    ServletInputStreamTimeout: 1728000000 (which was set to 180000 before)
    ServletsLongDataTransferTimeout: 1728000000 (which was set to  120000 before)
    Unfortunatelly setting those parameters didn't fix the problem.
    Does anybody have a clue what I can do? And just for my understanding, what exactly does the parameter, that I have set, effect. The initial values of 180000 (3 Minutes) seem to be enough. Loading 377950 bytes should take much less that 3 Minutes even with a slow connection?
    Kind regards,
    dominik
    Edited by: Dominik Fried on Mar 30, 2009 1:34 PM
    Edited by: Dominik Fried on Mar 30, 2009 1:45 PM

    Hi,
    We are facing exactly the same issue with KM.
    Can anyone assist us?
    Thanks in advance,
    Regina

  • Java.lang.IllegalStateException:  bean  not found in "request" scope

    In jsp,I use javaBean,the statement is following:
    <jsp:useBean id="collectionBean" scope="request" type="view.CollectionBean"/>
    but ,in runtime,there exist following mistakes:
    java.lang.IllegalStateException: bean "collectionBean" not found in "request" scope
         at basicContentSearch.jspService(basicContentSearch.jsp:8)
         [SRC:/basicContentSearch.jsp]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    why?
    Please everyone tell me if you can,thanks a lot.

    I believe, if it is the first time you are referring to the bean, you must use the class attribute rather than type:
    <jsp:useBean id="collectionBean" scope="request" class="view.CollectionBean"/>The type is used to change how the bean is referenced, for instance, in regular Java you might do this:
    // The Type                 The Class
    java.util.List myList = new java.util.ArrayList();In use bean you would do this:
    <jsp:useBean id="myList" class="java.util.ArrayList" type="java.util.List"/>

  • Java.lang.IllegalStateException: Write attempted after request finished

    Hi
    Can anybody explin to me about java.lang.IllegalStateException: Write attempted after request finished.
    I am struggling with this problem. Please help me..
    Thanks in advance.

    try to open the inputStream when you want to read the incoming stream !
    see this for more details...

  • Java.lang.IllegalStateException: Cannot forward a response that is

              Hello,
              Went through the article
              http://dev2dev.bea.com/articles/platform7_feature.jsp
              I thought if you have a workaround for the following issue.
              Any help to solve this issue is much appreciated.
              thx,
              -Sujatha.
              I am using JATO framework and have developed JSP's.
              Running an application on top of weblogic 6.1 sp4 container.
              The OS is Solaris 5.8.
              Every time i access the jsp's, getting the following exception.
              java.lang.IllegalStateException: Cannot forward a response that is
              already committed
              at
              weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:132)
              at
              com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:346)
              at
              com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:267)
              at
              com.iplanet.am.console.base.ConsoleServletBase.onUncaughtException(ConsoleServletBase.java:240)
              at
              com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)
              at
              com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)
              at
              com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
              at
              com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:294)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    thank you  dvohra21  the application is deployed in development .Its not session inactivity because this happen when l'm busy using the application ,reducing the application speed .

  • Java.lang.IllegalStateException: forward() not allowed after buffer has com

    Dear all,
    The error "java.lang.IllegalStateException: forward() not allowed after buffer has committed."
    was reported by my resin-1.2.3 server.
    Can anyone give me a suggestion to overcome this problem.
    Regards
    Ravikumar

    My guess would be that this is not a jdbc error.
    First there is no SQLException.
    Second IllegalStateException is something that can occur in Servlet use for various reasons.
    Perhaps you have other information that suggests it can only be JDBC?

  • Java.lang.IllegalStateException: Cannot forward. Response already committed

    i have deployed my application on Websphere application server 5.0. most of the time my jsp page works properly with any exception, but somtime it give me expeception and display page uncompletely rendered.
    Follwoing exception occure on particual page with particular record and same page works correctly with other reocrds....
    java.lang.IllegalStateException: Cannot forward. Response already committed. (Servlet 2.3, SRV 8.4)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:160)
         at com.mcb.cpms.presentation.controllers.CPMSController.dispatchRequest(CPMSController.java:918)
         at com.mcb.cpms.presentation.controllers.CPMSController.doGet(CPMSController.java:1278)
         at com.mcb.cpms.presentation.controllers.CPMSController.doPost(CPMSController.java:1308)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         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:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         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:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    i will be thankfull if any one have any idea about it.....
    waiting for your immediate response

    Hi Junaid,
    Your code can be work correctly on different servers or with other records but it can not be handled with buffer or autoflush,
    I had same problem a few weeks ago. And lastly I had to control before printing any output. My application was working on WebSphere but not on Tomcat, so it is general problem.
    The only way if you have to put some output before sending redirect:
    When you want to redirect the page, write window.location = ... (javascript code).
    When page is loaded automatically will be redirected to the page you want. But of course it is a bit slow.
    Good Luck,
    isturk.

  • Java.lang.IllegalStateException occurs in jsp page

    Hi,
    I'm having some trouble with my error page, and was wondering if anyone else has run into the problem and has a workaround?
    I have an error page set up to deal with uncaught exceptions,and it seems to work fine for most uncaught JPS exceptions.Except: When the exception is thrown after a lot of HTML
    (dozens of lines of HTML), the servlet engine will not forward to the error page, but complains
    java.lang.IllegalStateException
    here is the error log file:
    Internal error: exception thrown from the servlet service function (uri=/geselfserv/MyProfile.jsp): java.lang.IllegalStateException, stack: java.lang.IllegalStateException
         at com.netscape.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:68)
         at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:355)
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:379)
         at jsps.geselfserv._MyProfile_jsp._jspService(_MyProfile_jsp.java:777)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
         at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:533)
    i increased the buffer till 1024Kb but problem is same, it is giving the same exception.
    I searched the same problem in forum bt i didn't get any satisfacory answer.
    Pls help me out frm this problem.I would really appreciate for ur response.
    Regards
    Sachi

    Hello,
    The error tells you the line that the error is happening on, line 777 in the java file (not the jsp) you can look at that code and try to find the corresponding jsp lines. If you are using the sendRedirect() method, it may be a direct cause. I think since you are:
    Sending a page info, then that page is sending to another page ...
    You are getting an Illegal state because one method is trying to close out beforethe previous finished executing. Try to just switch thre sendRedirect with the <jsp:forward ... > statement. It may not be exact to what you need right now, but you may at least get the errors to start to go away.
    Internal error: exception thrown from the servlet service function (uri=/geselfserv/MyProfile.jsp): java.lang.IllegalStateException, stack: java.lang.IllegalStateException
    at com.netscape.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:68)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:355)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:379)
    at jsps.geselfserv._MyProfile_jsp._jspService(_MyProfile_jsp.java:777)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
    at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:533)

  • Getting java.lang.IllegalStateException error with response.getOutputStream

    Hi,
    I am writer a JSP site for displaying JFreeChart. The main JSP page gets some parameters then the second page out put the chart as binary data with a Java class.
    I've located the part which generated the error, as follows:
    Code:
    OutputStream os = response.getOutputStream(); <--- this line cause the error
    response.setContentType("image/png");
    ChartUtilities.writeChartAsPNG(os, chart, 400, 300);
    (other than it, the JSP does nothing with response or out)
    Error:
    Servlet.service().for servlet jsp threw exception java.lang.IllegalStateException
    at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)
    at org.apache.jsp.build005f005.seriesChart_jsp.jspService(org.apache.jsp.build_005f005.seriesChart_jsp:110)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWarpper.java:325)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    I've searched this forum and google and seeking for solution for thousands times. But sadly, ways such as adding out.reset(); doesn't work.
    Would any one has some suggestion for me? Your help is very appreciated. Thanks!

    A similar question / answers from jGuru.com
    Question I used getOutputStream() of response object in JSP. Below is the code for download a file in JSP.
    %>
    <%@ page import="java.util.*,
                        java.io.*"
    %>
    <%@ page language="java"
              session="false"
              contentType="text/html; charset=8859_1"
    %>
    <%
         //read the file name.
         File fFile = new File ("D:/Ibs/outdir/batchres.conf");
         String stFileName = "batchres.conf";
         //the content type set as excel
         response.setContentType ("application/excel");
         //the header and also the Nameis set by which user will be prompted to save
         response.setHeader ("Content-Disposition", "attachment;filename=\""+stFileName+"\"");
         //Open an input stream to the file and post the file contents thru the
         //servlet output stream to the client m/c
         InputStream isStream = null;
         ServletOutputStream sosStream = null;
         try
              //response.flushBuffer();
              isStream = new FileInputStream(fFile);
              sosStream = response.getOutputStream();
              int ibit = 256;
              while ((ibit) >= 0)
              ibit = isStream.read();
              sosStream.write(ibit);
         catch (IOException ioeException)
    sosStream.flush();
    sosStream.close();
    isStream.close();
    %>
    If run this code in Tomcat i am getting following error.. �<h1>Error: 500</h1> <h2>Location: /imu/jsp/ibUTLCmnDownloadView.jsp</h2>Internal Servlet Error:
    java.lang.IllegalStateException: getOutputStream() has already been called
         at org.apache.tomcat.facade.HttpServletResponseFacade.getWriter(Unknown Source)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(Unknown Source)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(Unknown Source)
         at jsp.ibUTLCmnDownloadView_12._jspService(ibUTLCmnDownloadView_12.java, Compiled Code)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source)
         at JP.co.Hitachi.soft.IBS.Common.Servlet.ibUTLCmnDownloadScrGenServlet.doPost(ibUTLCmnDownloadScrGenServlet.java:75)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:479)
    Answer
    Don't know if this will help--your code worked as is on my system (J2SDK 1.4.1, Tomcat 4.1.12, Linux)--but you're setting the content-type twice, and to two different values. In the page directive, you specify contentType="text/html; charset=8859_1", and then in the scriptlet, you do a response.setContentType ("application/excel");. Try changing the one in the page directive and deleting the one in the scriptlet. The servlet container may be calling getOutputStream() when it sees the text MIME type so it can prepare the out built-in variable.
    Also, according to the J2EE design patterns, JSP's should only be used to produce text output. Any binary output (such as Excel files) should be produced with servlets--otherwise, the JSP becomes one big scriptlet (like this one).
    If you still want to do this with a JSP, you might want to take out your try ... catch block since you're not doing anything with it. Doing so will allow you to let the servlet container handle the errors (i.e. specify error pages in the web application deployment descriptor). Either that, or at least put the close() and flush()calls in it since they can throw IOExceptions, too. :)
    Finally, you should never close the servlet's output stream. Leave that up to the servlet container.
    Is this item helpful? yes no Previous votes Yes: 2 No: 3
    To transfer file from client to server using jsp programs
    chalpati Rao, Aug 11, 2004 [replies:1]
    How to Download File using JSP program
    Re: To transfer file from client to server using jsp programs
    Saravanan Mani, Aug 24, 2004
    Try restarting the server.It worked for me (ie.you did all the code changes mentioned in the previous reply)
    Breakline problems
    David Machado, Jan 27, 2005 [replies:1]
    Hi! Maybe a problem with breaklines. Try this: ------------------------------------------------------
    %><%@ // don't send breakline here!!!
    page import="java.util.*,
    java.io.*"
    %><%@ // don't send breakline here too!!!
    page language="java"
    session="false"
    contentType="text/html; charset=8859_1"
    %><% // finally, don't send breakline here!!!
    //read the file name.
    File fFile = new File ("D:/Ibs/outdir/batchres.conf");
    String stFileName = "batchres.conf";
    //the content type set as excel
    response.setContentType ("application/excel"); // twice???
    //the header and also the Nameis set by which user will be prompted to save
    response.setHeader ("Content-Disposition", "attachment;filename=\""+stFileName+"\"");
    //Open an input stream to the file and post the file contents thru the
    //servlet output stream to the client m/c
    InputStream isStream = null;
    ServletOutputStream sosStream = null;
    try
    //response.flushBuffer();
    isStream = new FileInputStream(fFile);
    sosStream = response.getOutputStream();
    int ibit = 256;
    while ((ibit) >= 0)
    ibit = isStream.read();
    sosStream.write(ibit);
    catch (IOException ioeException)
    sosStream.flush();
    sosStream.close();
    isStream.close();
    %> // make sure that's no breakline an no spaces at the end!!
    Re: Breakline problems
    Aarthi Sivaram, Apr 19, 2005
    In the above code sosStream = response.getOutputStream(); must be removed. Use 'out' instead of sosStream i.e. out.write(""+ibit); If you look at the Java code generated for your JSP, you can find JspWriter out = null ... .. JspWriter calls response.getOutputStream(), thats why when u call getOutputStream, u get IllegalStateException. 'out' variable is available for direct use in all JSP's, like 'request'. So that can be directly used to write.
    A quick and working workaround
    Leslie Leng, May 20, 2005 [replies:1]
    I am not going to discuss the theory behind, as others gurus mentioned before me, are valid.
    In short, getOutputStream() could not be used more than once, and also it will conflict with JSPWriter's out.
    So, the quick workaround would be, at the end of the JSP page, add the following:
    out.clear();
    out = pageContext.pushBody();
    in example:
    catch(Exception e){
    System.out.print(e);
    out.clear();
    out = pageContext.pushBody();
    %>
    Re: A quick and working workaround
    ajit Pandey, Jul 15, 2005
    Thanks a ton Leslie ,it worked(Production issue) :) credit goes to you....indebted

  • Java.lang.IllegalStateException error when consuming a portlet

    When attempting to consume a portlet within a Webcenter portlet the portlet briefly displays and then constantly refreshes. On each refresh the following error is being logged (the PPR number increments each time the portlet refreshes):
    *<XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #35*
    java.lang.IllegalStateException: The expected request type is not the same as the current request type.
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:333)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.<init>(FacesContextFactoryImpl.java:86)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
    We are using JDeveloper 11.1.1.6, WebCenter Portal - Framework 11.1.1.6.0.111214.0952
    The portlet being included includes a farily simple ADF Query and Table component. It was included as a ADF Rich Portlet.
    There was an earlier thread that seemed to have the same issue: consuming portlet get error <ADF_FACES-60096:Server Exception during PPR>
    It is marked as answered but the answer was a series of steps including stopping the portal, server, redeploying the portlet, and restarting. It also suggested deleting any unused bindings from the Executable section of the page. These steps failed to fix my issue.
    Has anyone else seen this issue and found a concrete fix for it?
    Thanks in advance.

    Hello again,
    I solved the problem.
    In Control Panel -> JInitiator administration console , the option "Use browser settings" has to be unchecked.
    daniela

  • PLEASE HELP ME!!! java.lang.IllegalStateException

    I need Help, im encountering this Exception and i dont know what to do, can any Help me to resolve this problem.... Any help is greatly appreciated
    /HERE'S MY CODE-----------------------------------------
    String fileName = "Sample";
    System.out.println("Download Word Document");
    System.out.println(session.getAttribute("data"));
    // set the header details
    int id = Integer.parseInt(String.valueOf(session.getAttribute("data")));
    System.out.println("ID is: " + id);
    try {//set the header details
    ph.gov.da.finalstandards.daos.DAOFacade.file(id);
    response.setContentType("application/msword");
    //response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
    //set the content type to related file
    javax.servlet.ServletOutputStream o = response.getOutputStream();
    InputStream inStream = new BufferedInputStream(new FileInputStream(
    "c:\\tempWordOutput.doc"));
    // set buffer size. Each attempt to read the file will use
    // specified number of bytes
    byte[] buf = new byte[4 * 1024];
    int bytesRead = 0;
    while ((bytesRead = inStream.read(buf)) != -1) {
    o.write(buf, 0, bytesRead);
    o.write(id);
    o.flush();
    o.close();
    } catch (Exception e) {
    e.printStackTrace();
    %>
    [4/20/07 9:26:13:265 CST] 7f007f0 SystemErr R java.lang.IllegalStateException
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at java.lang.Throwable. (Throwable.java)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.impl.PortletResponseImpl.setHeader(PortletResponseImpl.java:475)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at org.apache.jsp._finalPage._jspService(finalPage.jsp :63)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:546 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1030)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.struts.base.BaseImplUtil.include(BaseImplUtil.java:1229)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.include(WpsStrutsUtil.java:1888)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsViewJspCommand.includeURL(WpsStrutsViewJspCommand.java:170)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsViewJspCommand.execute(WpsStrutsViewJspCommand.java:145)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1223)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1141)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeSavedCommand(WpsStrutsUtil.java:1067)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsPortlet.doService(WpsStrutsPortlet.java:1121)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsPortlet.doView(WpsStrutsPortlet.java:1162)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.PortletAdapter.service(PortletAdapter.java:154)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet._dispatch(Portlet.java:744)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.access$100(Portlet.java:88)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet$Context.callPortlet(Portlet.java:899)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.cmpf.impl.PortletFilterManager.doFilter(PortletFilterManager.java:253)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.dispatch(Portlet.java:636)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.doGet(Portlet.java:510)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet.service(CacheablePortlet.java:352)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.service(Portlet.java:491)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1030)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.callMethod(PortletInvokerImpl.java:466)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:135)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.callPortletMethod(PortletContainerImpl.java:1378)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:386)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:428)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:102)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.PortletContainer.renderPortlet(PortletContainer.java:95)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.PortletHolder.render(PortletHolder.java:87)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:151)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at org.apache.jsp._Control._jspService(Control.jsp :176)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.skins.Default.render(Default.java:70)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:75)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Component.render(Component.java:906)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Control.render(Control.java:210)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.Composition.render(Composition.java:2747)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at org.apache.jsp._UnlayeredContainer_2D_V._jspService(UnlayeredContainer-V.jsp :12)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.skins.Default.render(Default.java:70)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:75)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Component.render(Component.java:906)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.SingleEntryContainer.render(SingleEntryContainer.java:207)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.CompositionRenderTag.doStartTag(CompositionRenderTag.java:318)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at org.apache.jsp._LayeredContainer._jspService(LayeredContainer.jsp :176)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.skins.Default.render(Default.java:70)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:75)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Component.render(Component.java:906)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.SingleEntryContainer.render(SingleEntryContainer.java:207)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.CompositionRenderTag.doStartTag(CompositionRenderTag.java:318)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at org.apache.jsp._Home._jspService(Home.jsp :2)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.screens.Default.render(Default.java:73)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.ScreenTemplate.render(ScreenTemplate.java:64)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.ScreenRenderTag.doStartTag(ScreenRenderTag.java:69)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at org.apache.jsp._Default._jspService(Default.jsp :572)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.themes.Default.render(Default.java:129)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:71)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:817)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.Servlet.doGet(Servlet.java:484)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:186)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1021)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:198)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.http.HttpConnection.run(HttpConnection.java)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)

    Regarding with downloading of file, do i need to use apache's HWPF to generate Word File???

  • Java.lang.IllegalStateException: Pool not open

    We are getting an error declaring Pool not open on our GIS mapping application. The queries that seem to generate the error are looking for a Tax Key number in another SQL Server database using the MS SQL Server JDBC 2.0 driver (sqljdbc4.jar) Shown below is a snippet from the log files. Has anyone seen this pool not open error and if so how did you remedy it. I don't know too much about connection pooling (C3P0 and the like), but if you think that is an answer, I'd appreciate any help in how/where such a pool is setup.
    Thanks in advance.
    Jim
    Tue Apr 06 07:55:45 CDT 2010] aims search took 204
    [Tue Apr 06 07:56:13 CDT 2010] Apr 6, 2010 7:56:13 AM com.moximedia.aims.SqlConnection initialize
    INFO: Initialized SqlConnection pool waukeshaSql
    Apr 6, 2010 7:56:16 AM com.moximedia.aims.SqlConnection initialize
    INFO: Initialized SqlConnection pool waukeshaSql
    Apr 6, 2010 8:04:30 AM com.moximedia.aims.SqlConnection initialize
    INFO: Initialized SqlConnection pool waukeshaSql
    database search took 43391
    [Tue Apr 06 08:05:13 CDT 2010] aims search took 172
    [Tue Apr 06 08:05:49 CDT 2010] Apr 6, 2010 8:05:49 AM com.moximedia.aims.pdf.Template generate
    INFO: Alias: http://maps.waukeshacounty.gov/output/WaukIMFpub_prdarcims22763412324.png
    database search took 188
    [Tue Apr 06 08:06:42 CDT 2010] aims search took 250
    [Tue Apr 06 08:07:55 CDT 2010] Apr 6, 2010 8:07:55 AM com.moximedia.aims.pdf.Template generate
    INFO: Alias: http://maps.waukeshacounty.gov/output/WaukIMFpub_prdarcims38562288336.png
    Apr 6, 2010 8:08:54 AM com.moximedia.aims.SqlConnection initialize
    INFO: Initialized SqlConnection pool waukeshaSql
    System Error: property 'layerName' is not configured properly for layer Land Divisions in layer-config.xml
    [Tue Apr 06 08:12:28 CDT 2010] Apr 6, 2010 8:12:28 AM com.moximedia.aims.SqlConnection initialize
    INFO: Initialized SqlConnection pool waukeshaSql
    ServletExec: caught exception - javax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalStateException: Pool not open
    [Tue Apr 06 08:13:02 CDT 2010] javax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalStateException: Pool not open
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:118)
    [Tue Apr 06 08:13:02 CDT 2010] at com.moximedia.aims.servlet.filter.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:58)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:60)
    [Tue Apr 06 08:13:02 CDT 2010] at net.geocortex.imf.security.http.AuthorizationFilter.doFilter(AuthorizationFilter.java:147)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:60)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ApplicationInfo.filterApplRequest(ApplicationInfo.java:2573)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ApplicationInfo.processApplRequest(ApplicationInfo.java:2254)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ServerHostInfo.processApplRequest(ServerHostInfo.java:1019)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java:1487)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java:1363)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ServletExecService.processServletRequest(ServletExecService.java:168)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.ServletExecService.Run(ServletExecService.java:205)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.HttpServerRequest.run(HttpServerRequest.java:648)
    [Tue Apr 06 08:13:02 CDT 2010] Caused by: javax.servlet.ServletException: java.lang.IllegalStateException: Pool not open
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.JspPageContext.handlePageException(JspPageContext.java:450)
    [Tue Apr 06 08:13:02 CDT 2010] at pagecompile._sites._waukesha._jsp._wauParcelQuerySearchResults_xjsp._jspService(_wauParcelQuerySearchResults_xjsp.java:810)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.JspHttpJspPage.service(JspHttpJspPage.java:41)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.JspServlet.service(JspServlet.java:1069)
    [Tue Apr 06 08:13:02 CDT 2010] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SERequestDispatcher.forwardServlet(SERequestDispatcher.java:628)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatcher.java:280)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatcher.java:211)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SERequestDispatcher.internalForward(SERequestDispatcher.java:123)
    [Tue Apr 06 08:13:02 CDT 2010] at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:96)
    [Tue Apr 06 08:13:02 CDT 2010] ... 12 more
    [Tue Apr 06 08:13:02 CDT 2010] Caused by: java.lang.IllegalStateException: Pool not open
    [Tue Apr 06 08:13:02 CDT 2010] at org.apache.commons.pool.BaseObjectPool.assertOpen(BaseObjectPool.java:78)
    [Tue Apr 06 08:13:02 CDT 2010] at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:916)
    [Tue Apr 06 08:13:02 CDT 2010] at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:80)
    [Tue Apr 06 08:13:02 CDT 2010] at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)
    [Tue Apr 06 08:13:02 CDT 2010] at pagecompile._sites._waukesha._jsp._wauParcelQuerySearchResults_xjsp._jspService(_wauParcelQuerySearchResults_xjsp.java:384)

    My guess would be that this is not a jdbc error.
    First there is no SQLException.
    Second IllegalStateException is something that can occur in Servlet use for various reasons.
    Perhaps you have other information that suggests it can only be JDBC?

  • HELP: java.lang.IllegalStateException: Response has already been committed

    I have a little problem.
    I'm trying to draw a graph is JSP. And I did it. I'm my computer works fine with no problems. But I have a server and when I try to run the program there it appears this error message.
    My computer :
    Pentium 4 1.6 GHz
    O/S : Win2k
    Apache 3.3.1
    Tomcat 1.1.1.1
    JDK 1.3.1.01
    Oracle 9.0
    And the server :
    HP L-2000 Class Server
    O/S : Unix
    Apache 3.3.1
    Tomcat 1.1.1.1
    JDK 1.3.0.01
    Oracle 9.0
    And the error message is :
    Error: 500
    Location: /kmcp/sttssrch/Merchant/mstat-01-coupon-graph.jsp
    Internal Servlet Error:
    java.lang.IllegalStateException: Response has already been committed
         at org.apache.tomcat.core.HttpServletResponseFacade.sendError
    (HttpServletResponseFacade.java:157)
         at org.apache.jasper.runtime.JspServlet.unknownException
    (JspServlet.java:299)
         at org.apache.jasper.runtime.JspServlet.service
    (JspServlet.java:377)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest
    (ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service
    (ContextManager.java:559)
         at
    org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnect
    ion(Ajp12ConnectionHandler.java:156)
         at org.apache.tomcat.service.TcpConnectionThread.run
    (SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Unknown Source)
    And the library I use are :
    import="java.awt.*, java.awt.image.*, com.sun.image.codec.jpeg.*, java.util.*, kmcp.*, java.sql.*,
    java.text.*"
    And when I declare a graph I use this command :
    BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
    Graphics g = image.getGraphics();
    Can anyone tell me what kind of problem and where and how can I solve it?
    Thanks.
    [email protected] ( is my e-mail address )

    Can anyone tell me what kind of problem and where and
    how can I solve it?
    Thanks.The most likely cause is that you are forwarding to or from another JSP or servlet after already sending output to the client.

  • Java.lang.IllegalStateException when transferring XmlBean objects

    Hi,
    I've been testing Coherence 3.2 build 351 and run into a problem.
    When trying to send/retrieve objects (that extend XmlBean) to/from Jboss and Tomcat we've been receiving the following exception:
    java.lang.IllegalStateException: unread block data
         java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2328)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1330)
         java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
         java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         java.rmi.MarshalledObject.get(MarshalledObject.java:135)
         org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxyHA.invoke(JRMPInvokerProxyHA.java:177)
         org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
         org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
         org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
         org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
         org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
         $Proxy5.getAllBusinessRules(Unknown Source)
         com.<removed>.dime.delegate.BusinessRuleDelegate.getAllBusinessRules(BusinessRuleDelegate.java:177)
         org.apache.jsp.viewbusinessrules_jsp._jspService(org.apache.jsp.viewbusinessrules_jsp:98)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)After digging around on the internet it appears that this is a serialization issue.
    We haven't seen this in any previous releases of Coherence, so I suspect it is something related to 3.2 (we haven't made any code changes ourselves in the affected classes). We also haven't seen it in relation to the cluster service, only when sending between JBoss and Tomcat.
    I am currently implementing a 'workaround' where we convert the XmlBean objects into transfer objects (POJOs) and send those over the network instead. (I quoted 'workaround' as we always intended to do this, just hadn't got around to it yet.)
    It isn't urgent from our perspective (if indeed there is a problem) as we'll have the 'workaround' in place shortly, but I thought I'd let you know.
    Let me know if there is any other information I can provide.
    Rgds,
    Randal.

    Hi Gene,
    Frankly, I'm a bit confusedMe too. ;)
    What makes you think it has anything to do with a new Coherence versionA few things:
    - I'd not seen the problem before upgrading to Coherence 3.2
    - The methods that return this error are transferring objects that extend XmlBean, no methods that transfer objects that implement Serializable throw this exception
    - After implementing a transfer object for one of the XmlBean objects (so that the Serializable transfer object is transferred, rather than the XmlBean object) the problem disappeared. Although other XmlBean objects continued to exhibit the same problem
    - After rolling back to Coherence 3.1 build 359 the problem didn't occur, then after rolling forward to 3.2 the problem returned, only for XmlBean objects.
    I appreciate the stack trace I posted probably doesn't help much, but it's the only one I've been able to obtain so far. :(
    It's also entirely possible that the problem is in Tomcat, JBoss or our own code, but I just find it weird that the problem occurs with one version of Coherence but not with another.
    I'm going to continue looking into this, see if I can find you some useful information or confirm that the problem is outside Coherence.
    Rgds,
    Randal.

  • When Clicking a particular Product - java.lang.IllegalStateException: Response already committed

    Hi,
    Can anyone please help me out on the below exception. When am clicking a particular product am getting below exception
    java.lang.IllegalStateException: Response already committed
        at weblogic.servlet.internal.ServletResponseImpl.objectIfCommitted(ServletResponseImpl.java:1629)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:637)
        at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:602)
        at atg.servlet.ContextRootSwappingInterceptor.interceptRequest(ContextRootSwappingInterceptor.java:366)
        at atg.servlet.pipeline.TailPipelineServlet.service(TailPipelineServlet.java:168)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:275)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.endeca.assembler.AssemblerPipelineServlet.service(AssemblerPipelineServlet.java:458)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.http.CookieBufferServlet.service(CookieBufferServlet.java:119)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.ExpiredPasswordServlet.service(ExpiredPasswordServlet.java:383)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:228)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:696)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:150)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:213)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:696)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2452)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:191)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.search.servlet.SearchClickThroughServlet.service(SearchClickThroughServlet.java:418)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.multisite.SiteSessionEventTriggerPipelineServlet.service(SiteSessionEventTriggerPipelineServlet.java:161)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:512)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.ProfilePropertyServlet.service(ProfilePropertyServlet.java:230)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:461)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.projects.store.servlet.pipeline.ProtocolSwitchServlet.service(ProtocolSwitchServlet.java:309)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:298)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:392)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:113)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:234)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.SecurityServlet.service(SecurityServlet.java:196)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.multisite.SiteContextPipelineServlet.service(SiteContextPipelineServlet.java:515)
        at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
        at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1252)
        at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:930)
        at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
        at atg.filter.dspjsp.PageFilter.innerDoFilter(PageFilter.java:348)
        at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:206)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >
    Regards
    333

    Usually this error comes if you try to do a forward or redirect when response is already committed i.e. when something has already been sent back to the client browser you can't do a redirect.
    Sometimes this can happen when there is another error in your application which triggers the application server to redirect to the error page (if you cave configured one) but the response might already have been committed. Try to enable loggingDebug on /atg/dynamo/servlet/dafpipeline/VirtualContextRootInterceptor and see if you can get more information about any possible error in the logs.

Maybe you are looking for

  • Not able to see the name space in Message Interface

    I Have cXML.xsd,  I make a external  definition  for this. I am creating a message interface for this,  When I create message interface and referre to  exsternal definition, it  does not show the name space, Please let me know how to  do this. in xsd

  • How to trace sales order number from delivery number, when batch is split

    Hi All, I have created a Sales Order and a Outbound Delivery against the sales order. While creating the Outbound delivery, I have split the qty in two batches. Now when I go in table LIPS, and search on the basis of the Delivery number, I get two ro

  • Select box choice resetting

    I have a drop-down box that I am using to control the sorting of my dataset. The drop-down box is located in a spry region because I want to display different sorting choices depending on a javascript variable. I have it scripted so that the dataset.

  • When I go to my outlook 2007 I get a message that says my MobileMe services has quit running

    Got the new IPAD Air trying to link calender to my Outlook 2007 calender through Cloud. When trying to open outlook to get e-mail on my PC get a message that my MobileMe services are not working.  After poping up 2 time and I close each one the mail

  • Problem in Return of Excisable Material

    Dear All,          user has created one Delivery with excisable item which is non Purchase item, I created OEI on base of Delivery, then I created return Document, now I want to create IEI on Base of return, At that time I am receiving one error mess