IllegalStateException in JSP

Hi,
I am trying to print HTML Stream in a part of jsp file. It throws IllegalStateException. I have a jsp file with some text boxes. When pressing search button, i need to generate a HTML file using jasper report and print at the bottom of search page.
How to do this?.
I have planned to do it using two jsp pages. Once i press search button. second page will include in the main page and shows the HTML report. If i execute second page which prints report alone it works fine. If i include the page in the main page. It throws IllegalStateException. Exception throws at "OutputStream ouputStream = response.getOutputStream();" line.
How to achive/solve this.
Thanks and Regards,
Narayanan. G

I have planned to do it using two jsp pages. Once i press search button. second page will include in the main page and shows the HTML report. If i execute second page which prints report alone it works fine. If i include the page in the main page. It throws IllegalStateException. Exception throws at "OutputStream ouputStream = response.getOutputStream();" line.
While invoking the main page that draws html, the code would have used the response object's PrintWriter. Further calls to getOutputStream() would cause this error. In short, you can invoke only either getWriter() or getOutputStream() in one request/response cycle, not both (which is also why the two pages display correctly when invoked in stand alone fashion).
Here is the javadoc
getOutputStream
public ServletOutputStream getOutputStream()
throws java.io.IOExceptionReturns a ServletOutputStream suitable for writing binary data in the response. The servlet container does not encode the binary data. Either this method or getWriter() may be called to write the body, not both.
Throws:
**java.lang.IllegalStateException - if the getWriter method has been called on this response**
See Also:
getWriter()
ram.

Similar Messages

  • IllegalStateException in jsp and Servlet

    java.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already been obtained
    and some times it will shows
    java.lang.IllegalStateException: OutputStream is already being used for this request
    Message was edited by:
    Hari_Kishore

    Nobody help me
    OK Do you have some suggestion for this solution?
    What is method should i do?Please advice me,other method.

  • Response.getOutputSource - java.lang.IllegalStateException

    Hi all,
    I try to download a CSV file in JSP.
    Below is my code :
    <%
          try {
               String fileName = "temp.csv";
               String fileContent = "something";
               response.setContentType("application/csv");
               response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
               BufferedOutputStream bos  =  new  BufferedOutputStream(response.getOutputStream());
                   bos.write(fileContent.getBytes("UTF-8"));
                   bos.close(); 
           catch(Exception e)
           System.out.println("...error while loading: "+e.toString());
           e.printStackTrace();
           %><html><head></head><body>Error: can't open file thisfile.csv</body></html>
           <%
    %>it worked once. but suddenly i got this error message :
    java.lang.IllegalStateException
         at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:63)does anyone know why this error message appear and how to solve this problem?
    thanks.

    You can only call one of getOutputStream or getWriter for a single response.
    If you call getOutputStream when you have already called getWriter, it throws an IllegalStateException.
    JSPs call getWriter implicitly - constructing the JSPWriter.
    Suggestion: Put all this code into a servlet. Its all java code anyway.

  • JSP compilation failed with java.lang.IllegalStateException: zip file close

    Hi,
    I have a web app successfully deployed on Weblogic7.0 and HP UX 11.0, which uses jdk 1.3.1_02
    In this application, when i invoke a jsp (this exception occurs on any jsp not to any specific jsp), i found the following exception trace on wl-domain.log file and server crashes: -
    java.lang.IllegalStateException: zip file closed
         at java.util.zip.ZipFile.getEntry(Unknown Source)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java, Compiled Code)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.MultiClassFinder.getClassSource(MultiClassFinder.java, Compiled Code)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.upToDate(ChangeAwareClassLoader.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.checkForReload(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java, Compiled Code)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java, Compiled Code)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java, Compiled Code)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java, Compiled Code)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java, Compiled Code)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java, Compiled Code)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Can anyone help me in figuring out this problem urgently?
    thanks in advance
    manoj

    Hi Manoj.I am also getting the same problem in the weblogicserver version-6.1 SP2.It is also using the jdk 1.31.
    here is my stack trace.Help i smuch appreciated.!!
    java.lang.IllegalStateException: zip file closed
         at java.util.zip.ZipFile.getEntry(ZipFile.java:141)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java:197)
         at weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.java:106)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:53)
         at weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:53)
         at weblogic.utils.classloaders.MultiClassFinder.getClassSource(MultiClassFinder.java:45)
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:265)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:156)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:65)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source)
         at com.slfc.framework.service.ServiceMessageFactory.createServiceResult(ServiceMessageFactory.java:58)
         at sunlife.nexus.admin.SecPro.establishSupportSession(Unknown Source)
         at sunlife.nexus.admin.Page_secPro_extAppLoader.processPageRequest(Unknown Source)
         at sunlife.wis.servlets.WISServlet.redirect(WISServlet.java:63)
         at sunlife.wis.servlets.WISServlet.doExec(WISServlet.java:107)
         at sunlife.wis.servlets.WISServlet.doGet(WISServlet.java:70)
         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:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

  • IllegalStateException whit Frames using JSP

    Hi friends!
    I have a huge problem. I have 2 servlets and 2 JSPs, my first servlet (QueryServlet) forward normally. but in the second Servlet (PersDataServlet) not. appears an Exception like this: IllegalStateException: Cannot forward after response has been committed
    here, attach the source of my two servlets and how i forward.
    Query Servlet :--------------------------------------------------------------------------------------------------------
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try{//obtendo la data del ResultSet y la paso al ResultBean
    QueriesManager qm = new QueriesManager();
    ResultSet rs = qm.obtenerBuscar(request.getParameter("valor"),Integer.parseInt(request.getParameter("Criterio")),request.getParameter("stat"),request.getParameter("ubicFis"));
    Collection beanList = new ArrayList();
    while(rs.next()){
    ResultBean rb = new ResultBean();
    rb.setDni(rs.getString("cod_dni"));
    rb.setNomCmpl(rs.getString("completo"));
    rb.setCod_stat(rs.getString("cod_stat_pers"));
    rb.setStatus(rs.getString("txt_status_pers"));
    rb.setUbic(rs.getString("txt_ubicacion_fisica"));
    beanList.add(rb);
    ResultBean list = new ResultBean();
    list.setBeanList(beanList);
    //almacenar resultBean en el Request
    request.setAttribute("resultBean",list);
    catch(SQLException se){
    System.out.println("Error al manipular el ResultBean, "+se);
    try{
    //redireccionar el request al JSP para mostrar
    getServletConfig().getServletContext().getRequestDispatcher("/resultado_busca.jsp").forward(request, response);
    catch(IOException io){
    System.out.println("Error al redireccionar el resultado, "+io);
    PersDataServlet :------------------------------------------------------------------------------------------------------------
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try{
    QueriesManager qm = new QueriesManager();
    ResultSet rs = qm.obtenerPersona(request.getParameter("id"),request.getParameter("opt"));
    rs.next();
    //storingResultSet in the Request
    request.setAttribute("per",rs);
    catch(SQLException se){
    System.out.println("Error al manipular el ResultSet, "+se);
    try{
    String req = request.getParameter("req")+"?stat="+request.getParameter("stat")+"&param="+request.getParameter("param");
    //forwaring the request to the JSP
    getServletConfig().getServletContext().getRequestDispatcher("/"+req).forward(request, response);
    catch(IOException io){
    System.out.println("Error al redireccionar el resultado, "+io);
    ================================================================================
    In both cases, the servlets implements SingleThreadModel, even without it crash anyway.
    Please, help me.
    ThaDark

    In a servlet output is via the Writer or outputStream
    Writer out = response.getWriter()
    out.println("Hello World!");
    In a JSP, any of the HTML (ie non JSP scriptlet code) is counted as output.
    ie all the template HTML stuff, output from any custom tags, anything that writes to the output stream.
    <html>
    <body>
    All of this stuff counts as being output
    <%
    // This stuff here does not, because we are just executing java code
    String s = request.getParameter("testParam");
    %>Basically - anything that shows up on your HTML page at the end of the day is "output"
    When you forward a page, any output already buffered has to be cleared, for the new page to send the response fully.
    If you output more than the buffer of the page, or the buffer gets flushed, then you can't cancel the output, and it is invalid to forward (Illegal State Exception)
    Does that clear things up?

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

  • Error while running JSP Page on Desktop Client PDA

    Hi Experts,
    I am trying to run MI Project on my local desktop. But it is not able to start. Browser gives the following error:
    java.lang.ExceptionInInitializerError
         at com.model.CalibModel.getUomList(CalibModel.java:75)
         at com.jspjava.OrderList._jspService(OrderList.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(AbstractMEHttpServlet.java:736)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe(AbstractMEHttpServlet.java:282)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:539)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:199)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: Could not create SmartSyncRuntime intance: null
         at com.sap.ip.me.api.smartsync.SmartSyncRuntime.getInstance(SmartSyncRuntime.java:102)
         at com.model.mwfields.order.ISyncBO.(ISyncBO.java:10)
         .. 23 more
    It is giving Error for line having following code:
    SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade();
    On checking Tomcat logs, following error is getting displayed in trace file:
    <r id="1242970226250" t="11:00:26" d="2009-05-22" s="E" c="000" u="SMA_GOPAL" g="en" m="Cannot get all node descriptors --&gt; java.lang.ClassCastException: com.sap.tc.mobile.cfs.meta.ClassDescriptorImpl
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorImpl.&lt;init&gt;(SyncBoDescriptorImpl.java:66)
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorFacadeImpl.getSyncBoDescriptorAgain(SyncBoDescriptorFacadeImpl.java:89)
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorFacadeImpl.&lt;init&gt;(SyncBoDescriptorFacadeImpl.java:103)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeImpl.&lt;init&gt;(SmartSyncRuntimeImpl.java:75)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeManager.getSmartSyncRuntime(SmartSyncRuntimeManager.java:63)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sap.ip.me.api.smartsync.SmartSyncRuntime.getInstance(SmartSyncRuntime.java:81)
         at com.sap.ongc.calibration.model.mwfields.order.ISyncBO.&lt;clinit&gt;(ISyncBO.java:10)
         at com.sap.ongc.calibration.model.CalibModel.getUomList(CalibModel.java:75)
         at com.sap.ongc.calibration.jspjava.OrderList._jspService(OrderList.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(AbstractMEHttpServlet.java:736)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe(AbstractMEHttpServlet.java:282)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:539)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:199)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Unknown Source)
    ">
    <f n="ThreadName" v="Thread-19"/>
    </r>
    <r id="1242970226251" t="11:00:26" d="2009-05-22" s="D" c="000" u="SMA_GOPAL" g="en" m="Error while getInstance --&gt; java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sap.ip.me.api.smartsync.SmartSyncRuntime.getInstance(SmartSyncRuntime.java:81)
         at com.sap.ongc.calibration.model.mwfields.order.ISyncBO.&lt;clinit&gt;(ISyncBO.java:10)
         at com.sap.ongc.calibration.model.CalibModel.getUomList(CalibModel.java:75)
         at com.sap.ongc.calibration.jspjava.OrderList._jspService(OrderList.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(AbstractMEHttpServlet.java:736)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe(AbstractMEHttpServlet.java:282)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:539)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:199)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalStateException: Cannot get all node descriptors:com.sap.tc.mobile.cfs.meta.ClassDescriptorImpl
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorFacadeImpl.&lt;init&gt;(SyncBoDescriptorFacadeImpl.java:140)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeImpl.&lt;init&gt;(SmartSyncRuntimeImpl.java:75)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeManager.getSmartSyncRuntime(SmartSyncRuntimeManager.java:63)
         ... 29 more
    ">
    <f n="ThreadName" v="Thread-19"/>
    </r>
    <r id="1242970226265" t="11:00:26" d="2009-05-22" s="E" c="000" u="SMA_GOPAL" g="en" m="java.sql.SQLException: Statement is closed">
    <f n="LocationName" v=" (com.sap.tc.mobile.cfs.pers.PersistenceManagerImpl:execute)"/>
    <f n="ThreadName" v="Thread-19"/>
    </r>
    Can anyone please explain what wrong I may be doing?
    Thanks and Regards,
    Gopal

    Error in log trace was as follows:
    <r id="1242970226250" t="11:00:26" d="2009-05-22" s="E" c="000" u="SMA_GOPAL" g="en" m="Cannot get all node descriptors --&gt; java.lang.ClassCastException: com.sap.tc.mobile.cfs.meta.ClassDescriptorImpl
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorImpl.&lt;init&gt;(SyncBoDescriptorImpl.java:66)
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorFacadeImpl.getSyncBoDescriptorAgain(SyncBoDescriptorFacadeImpl.java:89)
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorFacadeImpl.&lt;init&gt;(SyncBoDescriptorFacadeImpl.java:103)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeImpl.&lt;init&gt;(SmartSyncRuntimeImpl.java:75)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeManager.getSmartSyncRuntime(SmartSyncRuntimeManager.java:63)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sap.ip.me.api.smartsync.SmartSyncRuntime.getInstance(SmartSyncRuntime.java:81)
         at com.sap.ongc.calibration.model.mwfields.order.ISyncBO.&lt;clinit&gt;(ISyncBO.java:10)
         at com.sap.ongc.calibration.model.CalibModel.getUomList(CalibModel.java:75)
         at com.sap.ongc.calibration.jspjava.OrderList._jspService(OrderList.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(AbstractMEHttpServlet.java:736)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe(AbstractMEHttpServlet.java:282)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:539)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:199)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Unknown Source)
    ">
    <f n="ThreadName" v="Thread-19"/>
    </r>
    <r id="1242970226251" t="11:00:26" d="2009-05-22" s="D" c="000" u="SMA_GOPAL" g="en" m="Error while getInstance --&gt; java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sap.ip.me.api.smartsync.SmartSyncRuntime.getInstance(SmartSyncRuntime.java:81)
         at com.sap.ongc.calibration.model.mwfields.order.ISyncBO.&lt;clinit&gt;(ISyncBO.java:10)
         at com.sap.ongc.calibration.model.CalibModel.getUomList(CalibModel.java:75)
         at com.sap.ongc.calibration.jspjava.OrderList._jspService(OrderList.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(AbstractMEHttpServlet.java:736)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe(AbstractMEHttpServlet.java:282)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:539)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:199)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalStateException: Cannot get all node descriptors:com.sap.tc.mobile.cfs.meta.ClassDescriptorImpl
         at com.sap.tc.mobile.cfs.compat.SyncBoDescriptorFacadeImpl.&lt;init&gt;(SyncBoDescriptorFacadeImpl.java:140)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeImpl.&lt;init&gt;(SmartSyncRuntimeImpl.java:75)
         at com.sap.tc.mobile.cfs.compat.SmartSyncRuntimeManager.getSmartSyncRuntime(SmartSyncRuntimeManager.java:63)
         ... 29 more
    ">
    <f n="ThreadName" v="Thread-19"/>
    </r>
    <r id="1242970226265" t="11:00:26" d="2009-05-22" s="E" c="000" u="SMA_GOPAL" g="en" m="java.sql.SQLException: Statement is closed">
    <f n="LocationName" v=" (com.sap.tc.mobile.cfs.pers.PersistenceManagerImpl:execute)"/>
    <f n="ThreadName" v="Thread-19"/>
    </r>

  • Test_fwktutorial.jsp in r12.0.4

    i AM trying to run test_fwktutorial.jsp in r12.0.4 it show running Embedded OC4J server-log
    with the following:-
    .Target URL -- http://141.144.62.160:8988/OA_HTML/test_fwktutorial.jsp
    08/09/25 23:19:51 java.lang.IllegalStateException: ClassLoader
    its does not launch any browser,... for it to work i had to copy http://141.144.62.160:8988/OA_HTML/test_fwktutorial.jsp from the Embedded OC4J server-log to my browser.. in jdev9 , i never have to do this ..any idea

    one more check you can do also.
    in place of test_fwktutorial.jsp, make one Test.PG and run it.
    Are you getting same issue with Test.PG?
    Thanks

  • Filter problem with jsp:forward

    Greetings,
    I was trying to implement compression filter in oc4j. Basically wrap a HttpResponseServletResponseWrapper using a GZipOutputStream for supported browsers. However whenever for eg: I have a.jsp which does jsp:forward page =b.jsp I can see in TCP monitor IllegalStateException response already committed. But I dont see any stack trace in server logs. The buffer size is 2048 and I am pretty sure it did not get filled up before the forward. I would appreciate if anybody has seen such behavior using wrapped response in OC4j(the same code works fine in tomcat and websphere). Also one thing I observed is that for every jsp:include the filter is being called (to handle this I create the wrapper if its not already there and maintain entry count into filter and decrement when I exit filter and finish gzip response when entry count become 0,which works fine). I believe that this is not a part of 2.3 spec.Even in 2.4 spec if the filter config in web.xml is not set to any value by default the filter is supposed to be in request scope. I really appreciate any pointers in resolving this

    I am pasting the stack trace for broken pipe exception. Please let me know if anybody knows the resolution. Please let me know if there is any other way to enable compression of jsp in oc4j in 9 version. The same code works in Jboss/tomacat websphere ! Also from the stack trace we can see that filter is being called for each forward and its not as per 2.3 servlet specification. Even in 2.4 by default the filter is supposed to work at request level.
    Also I have another question oc4j seems to be using hard coded value: if length is more than 100k or so it uses Transfer-Encoding chunked. Is there any clean way of disabling this behaviour for .js files? the reason is for some reason Internet explore does not cache the javascript files properly (sporadically ) when chunked response is used for javascript files.
    4/26/06 4:58 PM: com.evermind.server.http.HttpIOException: Broken pipe
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindServletOutputStream.flush(EvermindServletOutputStream.java:286)
    4/26/06 4:58 PM: at java.io.FilterOutputStream.flush(FilterOutputStream.java:121)
    4/26/06 4:58 PM: at filters.gzip.GzipServletResponseStream.flush(GzipServletResponseStream.java:151)
    4/26/06 4:58 PM: at filters.gzip.GZipServletResponseWrapper.flushBuffer(GZipServletResponseWrapper.java:127)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:244)
    4/26/06 4:58 PM: at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    4/26/06 4:58 PM: at SecondPage.jspService(_SecondPage.java:83)
    4/26/06 4:58 PM: at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    4/26/06 4:58 PM: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    4/26/06 4:58 PM: at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    4/26/06 4:58 PM: at filters.CookieFilter.processRequest(CookieFilter.java:522)
    4/26/06 4:58 PM: at filters.CookieFilter.validateRequest(CookieFilter.java:127)
    4/26/06 4:58 PM: at filters.CookieFilter.doFilter(CookieFilter.java:51)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    4/26/06 4:58 PM: at filters.gzip.GZipFilter.doFilter(GZipFilter.java:176)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:240)
    4/26/06 4:58 PM: at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
    4/26/06 4:58 PM: at FirstPage.jspService(_FirstPage.java:131)
    4/26/06 4:58 PM: at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    4/26/06 4:58 PM: at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    4/26/06 4:58 PM: at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    4/26/06 4:58 PM: at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    4/26/06 4:58 PM: at filters.CookieFilter.processRequest(CookieFilter.java:522)
    4/26/06 4:58 PM: at filters.CookieFilter.validateRequest(CookieFilter.java:127)
    4/26/06 4:58 PM: at filters.CookieFilter.doFilter(CookieFilter.java:51)
    4/26/06 4:58 PM: at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    4/26/06 4:58 PM: at filters.gzip.GZipFilter.doFilter(GZipFilter.java:176)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:556)
    4/26/06 4:58 PM: at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    4/26/06 4:58 PM: at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    4/26/06 4:58 PM: at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    4/26/06 4:58 PM: at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    4/26/06 4:58 PM: at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    4/26/06 4:58 PM: at java.lang.Thread.run(Thread.java:479)

  • Problem in drawing image on the fly using jsp

    I have been searching the forum and web for the problem but in vain. I have wrote a jsp which creates an image on the fly from the data selected from the database. But after the image is drawn, it throws an IllegalStateException. The offending code is at the time of releasePageContext() method of the compiled jsp. I am using the following code in jsp to display the image.
    BufferedImage bi = obj.getBufferedImage();
    javax.imageio.ImageIO.write(bi,"png",response.getOutputStream());
    I even tried to do the same with servlet, but the problem is that when I am using forward action in jsp I am getting the image but the control is in the servlet and if I am including the servlet, I am getting junk characters instead of image. I have set the content type in servlet and also in jsp.
    Thank you in advance.

    Hi all,
    I've developed a web application using glassfish server... my database is postgresql.... i try to generate a report using Jasper Reports.... i've succesfully developed the report template..... My problem when ever i try to generate a report it gets the data from the back end.... and throws the following error.....
    StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
    at org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:652)
    at org.apache.coyote.tomcat5.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:196)
    at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:149)
    at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:142)
    at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:216)
    at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:134)
    at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:89)
    at org.apache.jsp.GenerateBirthCertificate_jsp._jspService(GenerateBirthCertificate_jsp.java:149)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    i've written my code in jsp.... My code is....
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page language="java" import="java.io.*, net.sf.jasperreports.engine.*, java.sql.*, java.util.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>CDAC Portal</title>
    </head>
    <body>
    <%
    try {
    Connection con=null;
    String query="";
    String regNo="";
    regNo=request.getParameter("regNo");
    regNo = regNo.toUpperCase();
    out.println("Registration No :"+regNo);
    Class.forName("org.postgresql.Driver");
    con = DriverManager.getConnection("jdbc:postgresql://192.168.31.79:5432/Municipality","postgres","");
    System.out.println("connected succefully");
    ServletContext context = this.getServletConfig().getServletContext();
    File reportFile = new File(context.getRealPath("/reports/birth_cert.jasper"));
    query="select * from birth_details where regn_unit='"+regNo+"'";
    Map parameters = new HashMap();
    parameters.put("regNo",""+regNo);
    parameters.put("query",""+query);
    byte[] bytes = null;
    try {               
    bytes = JasperRunManager.runReportToPdf(reportFile.getPath(), parameters, con);
    response.setContentType("application/pdf");
    response.setContentLength(bytes.length);
    ServletOutputStream ouputStream = response.getOutputStream();
    ouputStream.write(bytes, 0, bytes.length);
    ouputStream.flush();
    ouputStream.close();
    } catch (JRException e) {
    System.out.println("Error : "+e);
    con.close();
    } catch(Exception exc) {
    System.out.println("Connection pool error :"+exc.toString());
    %>
    </body>
    </html>
    can anyone help me hw to solve this problem....
    Thanks in advance
    R Vijay,
    Project Engineer,
    CDAC, Chennai.
    India
    [email protected]
    [email protected]

  • Error when deploy a jsp page which includes customizable component

    Hi all,
    I add a customizable component to my jsp page. It works fine on local but when I deploy it and run the deployment I get the error below:
    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/islistesi/DevamEdenIsler.jspx
    Exception:
    java.lang.IllegalStateException: ClassLoader "islistesi.web.islistesi:0.0.0" (from <web-module> in /oc4j/webcenter/j2ee/home/applications/islistesi/islistesi/): This loader has been closed and should not be in use.
    anyone who has an idea?
    thanks a lot in advance

    Did you define a web.xml and application.xml file for the deployment of your application?
    Are you using deployment profiles to configure your application on a standalone OC4J?

  • Error in a jsp page...

    Hi guys,
    i'm a new user of Jsf and i've this error when i run my first application:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Component javax.faces.component.UIViewRoot@5b38d7 not expected type. Expected: UIOutput. Perhaps you're missing a tag?
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.pages.Login_jsp._jspService(Login_jsp.java:97)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:43)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@5b38d7 not expected type. Expected: UIOutput. Perhaps you're missing a tag?
         com.sun.faces.taglib.html_basic.OutputTextTag.setProperties(OutputTextTag.java:90)
         javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:712)
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
         com.sun.faces.taglib.html_basic.OutputTextTag.doStartTag(OutputTextTag.java:155)
         org.apache.jsp.pages.Login_jsp._jspx_meth_h_outputText_0(Login_jsp.java:113)
         org.apache.jsp.pages.Login_jsp._jspService(Login_jsp.java:80)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:43)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    How can i solve it?
    i post you my Login.jsp and config files
    Login.jsp
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
      <head>
        <title>
          <h:outputText value="MicroArray Classifier"/>
        </title>
      </head>
      <body>
        <f:view>
          <h:form>
            <table cellpadding="0" cellspacing="0">
              <tr>
                <td>
                  <h:graphicImage alt="Welcome to MicroArray Application" title="Welcome to MicroArray Application" url="/images/srfc_gourcuff1.jpg" width="170" height="200"/>     
                </td>
                <td>
                  <table cellpadding="5" cellspacing="4">
                    <tr>
                      <td colspan="2">
                        <font faces="Arial,sans serif" size="5">
                          <h:outputText value="Welcome to MicroArray Application"/>     
                        </font>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <h:outputLabel for="userNameInput" >
                          <h:outputText value="Enter Your Name"/>
                        </h:outputLabel>
                      </td>
                      <td>
                        <h:inputText id="userName Input" maxlength="30" size="20"/>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <h:outputLabel for="passwordInput">
                          <h:outputText value="Password"/>
                        </h:outputLabel>
                      </td>
                      <td>
                        <h:inputSecret id="passwordInput" maxlength="30" size="20"/>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <h:outputLabel for="Group Input">
                          <h:outputText value="Enter Your Group"/>
                        </h:outputLabel>
                      </td>
                      <td>
                        <h:inputText id="Group Input" maxlength="30" size="20"/>
                      </td>
                    </tr>
                    <tr>
                      <td>
                        <h:commandButton action="Ok" value="Submit" title="submit"/>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </h:form>
        </f:view>
      </body>     
    </html> web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC
        "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
         <filter>
            <filter-name>ExtensionsFilter</filter-name>
            <filter-class>
                org.apache.myfaces.component.html.util.ExtensionsFilter
            </filter-class>
            <init-param>
                <param-name>uploadMaxFileSize</param-name>
                <param-value>100m</param-value>
            </init-param>
            <init-param>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
            </init-param>
            </filter>
        <filter-mapping>
            <filter-name>ExtensionsFilter</filter-name>
            <servlet-name>FacesServlet</servlet-name>
        </filter-mapping>
        <servlet>
            <servlet-name>FacesServlet</servlet-name>
            <servlet-class>
                javax.faces.webapp.FacesServlet
            </servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>FacesServlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>FacesServlet</servlet-name>
            <url-pattern>*.faces</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
         <managed-bean>
              <managed-bean-name>myBean</managed-bean-name>
              <managed-bean-class>giu.MyBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
         <navigation-rule>
              <from-view-id>/pages/Login.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>Ok</from-outcome>
                   <to-view-id>/pages/MyForm.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/pages/MyForm.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>success</from-outcome>
                   <to-view-id>/pages/MyResult.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    </faces-config>Can you help me please?I'm inexpert...

        <title>
          <h:outputText value="MicroArray Classifier"/>
        </title>You cannot put faces elements outside the f:view.
    Put it in a f:subview.
        <title>
            <f:subview id="title">
                <h:outputText value="MicroArray Classifier"/>
            </f:subview>
        </title>

  • Error while accessing JSP deployed on Oracle AS

    Hi,
    I have developed an application and deployed in on the oracle AS 10.1.2
    In my application i have a Jsp on which i have the following code
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ page import="javax.servlet.*"%>
    <%@ page import="javax.servlet.http.*"%>
    <%@ page import="java.io.*"%>
    <%@ page import="java.util.*"%>
    <%@ page import="java.net.*"%>
    <% String strFileName = request.getParameter("prmFileName");
    //String strFileName = "d:\\Report.xls";
    response.setContentType( "application/vnd.ms-excel; charset=ISO-8859-1");
    PrintWriter out1 = response.getWriter();
    //System.out.println(strFileName);
    FileReader fread = new FileReader (strFileName);
    BufferedReader bfd = new BufferedReader(fread);
    String inputLine;
    while ((inputLine = bfd.readLine()) != null)
    out1.println (inputLine);
    bfd.close();
    out1.close();
    %>
    When i access this jsp through the application i get this error..
    during developement i had tested this jsp by deploying it on jboss and it worked properly but now i am faced with this error
    500 Internal Server Error
    java.lang.IllegalStateException: OutputStream already retrieved     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletResponse.getWriter(EvermindHttpServletResponse.java:1001)     at ReportXlsOpen.jspService(_ReportXlsOpen.java:57)     [SRC:/ReportXlsOpen.jsp:12]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)     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 (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    Thanks & Regards,
    Madhur

    You don't need to get the output writer "out1". you can use "out" in your scriplets the same way as "request" and "response".

  • I am getting an error while requesting a new jsp

    HTTP ERROR: 500
    No Java compiler available
    RequestURI=/webchat/index1.jsp
    Caused by:
    java.lang.IllegalStateException: No Java compiler available
         at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:224)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:559)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
         at org.jivesoftware.webchat.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:45)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
         at org.jivesoftware.webchat.SetupFilter.doFilter(SetupFilter.java:92)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
         at org.mortbay.jetty.Server.handle(Server.java:324)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
    Powered by Jetty://
    can anyone please help me in fixing this problem............
    i have set the class path for jdk

    varunkumar wrote:
    HTTP ERROR: 500
    No Java compiler availableServer unable to fine Java on your system & hence unable to compile ur jsp. I think your class path not properly set.
    There are many threads on Servlet Forum which already discussed class path stuff . refer them
    If still problem persist revert back with your web application setup details
    Sachin Kokcha

  • If there is an error in jsp, will it be redirected or included to errorpage

    If we give errorpage attribute in page directive, and if any runtime error occurs in the jsp page, will it be redirected, forwarded to errorpage or errorpage will be included here?
    Thanks
    m_nekkanti

    definitely NOT redirected.
    If the response has not been committed as yet, then it should do a forward (ie cancel output to date, and just display error page)
    Else if the page has been committed (flushed, or has overrun buffer) then does an includes the error page rather than forwarding.
    Basically, something like this:
    try{
       getRequestDispatcher("/error.jsp").forward(request, response)
    catch (IllegalStateException e){
      // if we cannot forward, then include the error page.
      getRequestDispatcher("/error.jsp").include(request, response);
    }

Maybe you are looking for

  • How to create a calculation based on several sheets?

    I want to create a sheet that calculates total costs. Sheet 1 (Crash Log) contains a list of broken parts. Sheet 2 (Parts List) contains a list of available spare parts. This table will have Part ID (A), Part Description (B) and Price (C) columns. Is

  • DVD?CD Drive

    After just over a year my lovely 24inch Intel iMac has decided to kill the DVD/CD drive. Nothing will go in. It is dead I fear. So if I order a new drive, is the fitting easy? I do not want the trouble of sending the machine back.

  • Add row in table dynamically

    Hi Experts, How to create a dynamic table in an interactive form. I mean if I have a single row in my table and the user wants to enter 2 rows. How can a row be added at runtime? Especially if the form is offline. Regards Abdullah

  • Brand New MacBook - what's wrong???

    I am on my third MacBook in the last 6 weeks. I upgraded to the MacBook Pro yesterday from the black MacBook. All of my information was copied to the new book, but now when I try to import photos I get the following error message: An error occurred w

  • MAIL sender to R/3 scenario

    Dear All, we have a requirement to send EDI file to R/3 system using MAIL adapter. Here we receive EDI file as an attachment to the mail server and the same need to be converted by Seeburger mapping so that it can be transformed to XML format. Is it