OutputStream already retrieved?

Hi , all:
Now i use the popup dialog to export excel , after export the data , i use AdfFacesContext.getCurrentInstance().returnFromDialog(null, null); back to the main page.but when the program run this, it will has error as follows:
javax.faces.FacesException: #{excelExporter.doExport}: javax.faces.el.EvaluationException: java.lang.IllegalStateException: OutputStream already retrieved
and when i export excel, i use these code:
try {
OutputStream out = response.getOutputStream();
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment; filename=" + filename);
HSSFWorkbook workbook = createWorkbook(iter, attr, attributes, maxrowcount);
workbook.write(out);
out.flush();
out.close();
FacesContext.getCurrentInstance().responseComplete();
} catch (IOException ex) {
ex.printStackTrace();
createWorkbook is the method to generate the excel.
After this i will call the AdfFacesContext.getCurrentInstance().returnFromDialog(null, null); to return and at this time it has error.
How to solve this problem.
Thanks in advance.

Hi,
what I am suggesting is to defer the whole Excel processing to the return listener. The data entered in the dialog can be returned to the return listener in a HashMap (second argument in the closeDialog statement). Then you handle Excel generation etc. in the listener code. My assumption is that you are getting into conflict with the internal dialog processing. From the application's workflow there is no difference between your approach and what I am suggesting
Frank

Similar Messages

  • Java.lang.IllegalStateException: OutputStream already retrieved

    I'm getting this error when I execute the line
    response.getWriter().write("yes");why is this the case and how do I correct it?

    this is all the code in my JSP, so I'm quite certain I only called it once.
    <%
    String strUser = request.getParameter("username");
    String strPassword = request.getParameter("password");
    if(strUser != null && strPassword != null) {
        //System.out.println("before sending response");
         response.setContentType("text/xml");
         response.setHeader("Cache-Control", "no-cache");
        // for plain text response:
         //response.getWriter().write("yes");
        // Or for XML formatted response:
         response.getWriter().write("<message>yes</message>");   
        //System.out.println("after sending response");          
    } else {
         //nothing to show
         response.setStatus(HttpServletResponse.SC_NO_CONTENT);
    %>is there any other reason for this exception?

  • SRVE0199E: OutputStream already obtained when exporting pdf

    Hi,
    I am have a problem when export pdf file from a web application. When I build with tomcat every works fine, but when deployed in Websphere. The problem occurred. It is that the exception stack being attached at the end of pdf file which prevents Adobe Acrobat 7 from open and displaying message like the file is damaged and could not be repaired. This is the exception stack,
    <H1>Error page exception</H1>
    <H4>The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.</H4>
    <BR><H3>Original Exception: </H3>
    <B>Error Message: </B>SRVE0199E: OutputStream already obtained<BR>
    <B>Error Code: </B>500<BR>
    <B>Target Servlet: </B>action<BR>
    <B>Error Stack: </B><BR>
    java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
    <BR>    
         at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter&#40;SRTServletResponse.java&#40;Compiled Code&#41;&#41;
    <BR>    
         at org.apache.jasper.runtime.JspWriterImpl.initOut&#40;JspWriterImpl.java&#40;Inlined Compiled Code&#41;&#41;
    <BR>    
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer&#40;JspWriterImpl.java&#40;Compiled Code&#41;&#41;
    <BR>    
         at org.apache.jasper.runtime.PageContextImpl.release&#40;PageContextImpl.java&#40;Compiled Code&#41;&#41;
    <BR>    
         at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext&#40;JspFactoryImpl.java&#40;Inlined Compiled Code&#41;&#41;
    <BR>    
         at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext&#40;JspFactoryImpl.java&#40;Compiled Code&#41;&#41;
    <BR>    
         at com.ibm._jsp._exportResults._jspService&#40;_exportResults.java:104&#41;
    <BR>    ... there is more...
    and my code that generate pdf is,
    try {
    out = res.getOutputStream();
    PdfWriter.getInstance(document, out);
    document.open();
    Paragraph para = null;
    para = new Paragraph("Title", FontFactory.getFont("Arial", 20,Font.BOLD));
    document.add(para);
    } catch (DocumentException e1) {
    e1.printStackTrace();
    } catch (IOException e1) {
    e1.printStackTrace();
    document.close();
    please help me out because this is an urgent issue. Thanks.

    I didn't put this code within JSP, but inside javax.servlet.jsp.tagext.TagSupport. Is this the same as in JSP?
    While waiting for the answer, I also find that in TagSupport, there is a member variable, pageContext, that also has pageContext.getOut() which is a JspWriter. This is used to export to excel. But for exporting to pdf, i used PdfWriter.getInstance(document, res.getOutputStream()); and res = pageContext.getResponse();
    is this the main reason?

  • WAS 6.0 - Response already committed / OutputStream already obtained

    Hello, we have struts code that is working fine in websphere 5, but not 6. I've seen this same kind of thing being post around, but haven't found one that closely resembles our simple setup. Below I've copied what our code looks like. Please help me to understand what the least-intrusive way would be to fix something simple like this, and let me know if more info is needed. FYI, we have tried returning null from the class, but this doens't seem to work. Also, some additional info is that we need this to work in WAS 5 and 6, because we have two different apps containing the same code, one of which is deployed (via EAR file) on 5 and the other 6. Thanks!
    struts-config entry:     
    <action path="/streamFile" type="MyClass" scope="request" validate="false">
                  <forward name="success" path=""/>
    </action>     
    web.xml entry:
         <servlet-mapping>
              <servlet-name>opsconsoleServlet</servlet-name>
              <url-pattern>streamFile</url-pattern>
         </servlet-mapping>
    Snippet of Class file:
    public class MyClass extends Action {
         public ActionForward execute(ActionMapping mapping,
                         ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
              throws Exception {    
         ServletOutputStream out = response.getOutputStream();
         BufferedOutputStream bos = null;
         try {
                   bos = new BufferedOutputStream(out);
                    bos.write(<bytes, etc>);
         } catch(final MalformedURLException e) {
         throw e;
         } catch(final IOException e) {
         throw e;
         } finally {
         if (bos != null)
              bos.close();
         if (out != null)
              out.close();
         return mapping.findForward("success");
    error from log:
    [11/5/07 12:50:11:737 EST] 00000036 ServletWrappe E   SRVE0014E: Uncaught service() exception root cause FilterProxyServlet: Cannot forward. Response already committed.
    [11/5/07 12:50:12:001 EST] 00000036 ServletWrappe E   SRVE0068E: Could not invoke the service() method on servlet opsconsoleServlet. Exception thrown : javax.servlet.ServletException: Cannot forward. Response already committed.
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:157)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    error later in log:
    [11/5/07 12:50:12:621 EST] 00000036 SRTServletRes W   WARNING: Cannot set status. Response already committed.
    [11/5/07 12:50:12:627 EST] 00000036 SRTServletRes W   WARNING: Cannot set header. Response already committed.
    [11/5/07 12:50:14:191 EST] 00000036 ServletWrappe A   SRVE0242I: [Communication] [/OpsConsole] [/WEB-INF/jsp/error/internalError.jsp]: Initialization successful.
    [11/5/07 12:50:14:201 EST] 00000036 ServletWrappe E   SRVE0068E: Could not invoke the service() method on servlet /WEB-INF/jsp/error/internalError.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
            at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:490)
            at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
            at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
            at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:227)

    svguerin3 :
    So this is something that worked in websphere 5 but not 6.. Are you sure this same code working on WAS5? This shouldn't. I guess you are trying to display the contents of the stream in a JSP page.If that's correct don't use
    ServletOutputStream out = response.getOutputStream();
         BufferedOutputStream bos = null;
         try {
                   bos = new BufferedOutputStream(out);
                    bos.write(<bytes, etc>);
         }instead read the bytes in to an in memory object, add this in memory object to request param and then call findForward(). In the JSP page get this request attribute and do whatever you want.
    Note: You can either use servletoutstream.write or RequestDispactcher.forward/redirect/response.sendRedirect.

  • Erro code:500 SRVE0199E: OutputStream already obtained

    Hi all Iam writing a JSP code for exporting the result in to the csv .It working perfectly but afte exporting results it is showing exeception on same csv file.Can any one help me.The exeception is shown bellow.
    Error page exception
    The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page.
    Original Exception:
    Error Message: SRVE0199E: OutputStream already obtained
    Error Code: 500
    Target Servlet: /quantum/ExportToCsv.jsp
    Error Stack:
    java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
    " at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java(Compiled Code))"
    " at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java(Inlined Compiled Code))"
    " at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java(Compiled Code))"
    " at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java(Compiled Code))"
    " at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java(Inlined Compiled Code))"
    " at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java(Compiled Code))"
    " at com.ibm._jsp._ExportToCsv._jspService(_ExportToCsv.java:321)"
    " at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))"
    " at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))"
    " at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java(Inlined Compiled Code))"
    " at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))"
    " at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))"
    " at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))"
    " at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))"
    Error Page Exception:
    Error Message: SRVE0199E: OutputStream already obtained
    Error Code: 0
    Target Servlet: null
    Error Stack:
    java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
    " at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))"
    " at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))"
    " at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))"
    " at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))"
    " at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))"
    " at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))"

    java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
    " at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java(Compiled Code))" Read the API docs. You cannot get both OutputStream and Writer during one request-response cycle. Do the one or the other. The exception tells that you're trying to get the Writer while somewhere before that line the OutputStream is already been obtained.
    The solution is hopefully obvious: change your code so that it only get the Writer, or only the OutputStream, not both. I recommend getting the OutputStream all the time and don't even think about getting the Writer. Most API's also do it.

  • OutputStream already obtained

    Hi,
    I am working on an application that uses struts on websphere.
    I have written a code to download a file on click of a link. What it does is read the file and write it on an outputstream which I get from response object.
    It works but gives the error java.lang.IllegalStateException: OutputStream already obtained
    Now I know why this happening, you cannot get both outputstream and printwriter from same response object.
    What I need is solution to get rid of this nasty error.
    Please help... this is very critical and I am stuck up.
    I tried looking at the net... but could not find any solution.
    Thanks in advance,
    Rana

    Very simple.
    Don't call getOuputStream() if you have already called getWriter().
    You're writing a servlet, so you have full control over the code.
    If you are writing it in JSP, make sure you have no text/carriage returns outside of <% %> tags.
    ie
    <%@page import="..."%>
    <%@page import="..."%>
    <% response.getOutputStream() %>
    is bad because it gets the writer, has already been got, and written carriage returns before you call getOutputStream().
    Hope this helps,
    evnafets

  • OutputStream already obtained]: java.lang.IllegalStateException: OutputStre

    Hi,
    I was trying to use OutputStream object in a JSP page.
    [Servlet Error]-[OutputStream already obtained]: java.lang.IllegalStateException: OutputStream already obtained
    I have done opstream.flush() and opstream.close() before and after the usage resp.
    Please advise me what has to be done.
    Thanks

    I think the problem is that when the JSP page is converted into servlet it adds some extra
    out.write("\r\n");
    to avoid this do not leave and space between the ending and starting of scriplet tags.
    Ex: If u have something like this
    <%@page buffer="none" errorPage="errorpage.jsp" %>
    <%
    %>
    then change it to
    <%@page buffer="none" errorPage="errorpage.jsp" %><%
    %>
    Tell me if this works....else post the code.

  • Why does Thunderbird keep retrieving the same emails 2 to 3 times from my hotmail that I already retrieved?

    It's not always exactly like this but here is example of the problem I'm having;
    In the morning I open Thunderbird and it automatically retrieves the new emails from my web emails Hotmail and Gmail (that's good).
    In the afternoon, when I open Thunderbird again, it will retrieve the same emails from Hotmail that I already got in the morning (that's not good).
    Sometimes when I open Thunderbird a third time, it will again get those same emails from Hotmail (That's frustrating).
    Note:
    1) This only happens only with the hotmail account, not the gmail account.
    2) The second and/or third time I open Thunderbird is not necessarily the same day, it could be the next day or next time. I just used the morning/afternnon example for ease of explanation.

    I have the same issue. I have not followed it up, Hotmail is such a rubbish service these days and I am sick of dealing with support there. They simply do not understand mail or it's protocols. They only comprehend "Microsoft" and their scripts. I just moved on the GMX.
    But I am guessing something there is broken. Perhaps it is not moving the mails to the POP folder in a timely manner. But I am seeing exactly the same thing. And it is not always either. Windows 8 uses IMAP so they really do not care if POP works or not. They would probably prefer not.

  • InputStream and OutputStream - Already opened for input

    URL url = new URL("website.com");
            URLConnection urlc = url.openConnection();
            urlc.setDoOutput(true);
            urlc.setDoInput(true);
            urlc.setUseCaches(false);
    // read something from a file
            BufferedReader reader = new BufferedReader(new InputStreamReader(urlc.getInputStream()));
            while (reader.read() > 0) {
                // do something
            reader.close();
    // write something to the same file
            DataOutputStream dos = new DataOutputStream(urlc.getOutputStream());
            dos.writeBytes("write something");
            dos.close();"java.io.IOException: Already opened for input:"
    what is that supposed to mean? Doesn't "reader.close();" take care of that?
    I can read the file and I can write to a file. But I can't do both one after another...
    Why is that?

    I just swapped the code
    URL url = new URL("website.com");
            URLConnection urlc = url.openConnection();
            urlc.setDoOutput(true);
            urlc.setDoInput(true);
            urlc.setUseCaches(false);
    // write something to the same file
            DataOutputStream dos = new DataOutputStream(urlc.getOutputStream());
            dos.writeBytes("write something");
            dos.close();
    // read something from a file
            BufferedReader reader = new BufferedReader(new InputStreamReader(urlc.getInputStream()));
            while (reader.read() > 0) {
                // do something
            reader.close();

  • Partner application single sign-on and Oc4j

    hello,
    I'm trying to test portal's partner application single sign-on, following the examples inside the "Oracle9 iAS Single Sign-On Application Developers Guide":
    With Tomcat as jsp engine everything works fine, but with Oc4j when I try to enter the protected jsp page i have this exception:
    oracle.security.sso.enabler.SSOEnablerException: java.lang.IllegalStateException: OutputStream already retrieved
         at SSOEnablerBean.getSSOUserInfo(SSOEnablerBean.java:153)
         at SSOEnablerJspBean.getSSOUserInfo(SSOEnablerJspBean.java:57)
         at /protetta.jsp._jspService(/protetta.jsp.java:37) (JSP page line 4)
    Any suggestion?
    Thanks in advance.

    I get the same problem with my partner application. It runs fine on JServer but I get the following problem on oc4j:
    oracle.security.sso.enabler.SSOEnablerException: java.lang.IllegalStateException: OutputStream already retrieved     
    at oracle.br.aerochain.sso.SSOEnablerBean.getSSOUserInfo(SSOEnablerBean.java, Compiled Code)     
    at oracle.br.aerochain.sso.SSOEnablerJspBean.getSSOUserInfo(SSOEnablerJspBean.java, Compiled Code)     
    at /jsp/papp.jsp._jspService(/jsp/papp.jsp.java, Compiled Code)     
    at com.orionserver[Oracle9iAS (9.0.2.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java, Compiled Code)     
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java, Compiled Code)     
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java, Compiled Code)     
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java, Compiled Code)     
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java, Compiled Code)     
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java, Compiled Code)     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java, Compiled Code)     
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java, Compiled Code)
    Did anyone get a solution for this?
    TIA

  • 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".

  • XSLT transform problem in JDeveloper 9i

    I have the following method which is called from a JSP which accepts an XMLDocument and XSL filename, generates HTML and sends this to the response object:
    public void processOutput(HttpServletResponse response
    , XMLDocument xmlDoc
    , String xslFileName)
    throws Exception
    DOMParser parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    XMLDocument xslDoc = null;
    PrintWriter out = null;
    try{
    URL xslURL = new URL(xslFileName);
    parser.parse(xslURL);
    xslDoc = parser.getDocument();
    XSLStylesheet xslStyleSheet = new XSLStylesheet(xslDoc, xslURL);
    XSLProcessor processor = new XSLProcessor();
    response.setContentType("text/html");
    out = response.getWriter();
    processor.processXSL(xslStyleSheet, xmlDoc,out);
    catch (Exception e){
    throw new Exception("ERROR in XSLTManager.processOutput:"+e.getMessage());
    finally{
    xslDoc = null;
    out=null;
    when I run this in Jdeveloper 3.1.1.2 it works fine. When I run it in Jdeveloper 9.0.3.1 I get the following error ...
    java.lang.Exception: ERROR in XSLTManager.processOutput:OutputStream already retrieved
    ... caused by the following line ...
    out = response.getWriter();
    Any help on this would be appreciated.

    JDev 3.1 uses Oracle Web-to-Go as its servlet engine, and uses a previous release of Oracle JSP.
    JDev 9.0.3 uses Oracle Containers for Java 9.0.3 (OC4J), and a later release of Oracle JSP.
    Something in your JSP page has caused the JSP infrastructure to already get the outputstream, so you cannot get the writer. You'll need to:
    (1) Figure out why your page is using the servlet output stream before you think it should be -- perhaps a <jsp:include flush="true"> in there? --, or
    (2) Call getOutputStream() and let XSLT write to the outputstream instead of the writer.

  • Java.lang.NullPointerException (OC4J 10.1.3.1 & JDeveloper 10.1.3.1)

    My project that ran perfectly under JDeveloper 9.0.5.2/OC4J 9.0.2 no loner runs under Jdeveloper 10.1.3.1/OC4J 10.1.3.1.
    The failure (java.lang.NullPointerException ) is in the following code snippet:
    =================================================
    Public String getString(String columnName) throws SQLException {
    return getResultSet().getString(columnName);
    =================================================
    columnName is being passed the same value in both environments.
    The JSP snippet that executes the above is:
    =================================================
    com.app.servlet.SQLDataSource detail =
    ((com.app.servlet.SQLDataSource)request.getAttribute("AcctList"));
    <td width="20%" class="tableRow">
    <a class="a4"><%= detail.getString("ACCT")%></a>
    </td>
    ==================================================
    AcctList is a text file that contains the following SQL code:
    ============
    select ACCT
    , VDESC
    from GL
    :WhereClause
    :OrderByClause
    ============
    :WhereClause & :OrderByClause are set in a calling "Filter" JSP filter page.
    All debug statements in my code indicate the the getResultSet is properly executed. Yet when the detail.getString("ACCT") is hit I receive the NullPointerException.
    Any clues?
    Remember, no code has changed between the 9.0.2 and 10.1.3.1 environments. They both hot the same database with the same JDBC drivers.
    TIA,
    Ed.

    Jan,
    The NullPointerException is pointed to:
    at oracle.jdbc.driver.ScrollableResultSet.findColumn(ScrollableResultSet.java:1308)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1572)
    at oracle.jdbc.SQLDataSource.getString(SQLDataSource.java:388)
    at apps.AcctList._jspService(_AcctList.java:66)
    The code ( in "_AcctList.java") at line 66 reads:
    out.print(detail.getString"ACCT") );
    However, digging into my application log file I found that the following error happend at 10:52:46.0 (the above error occured at 10:52.50):
    07/03/02 10:52:46.0 intemrp: Servlet error
    java.lang.IllegalStateException: OutputStream already retrieved
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindHttpServletResponse.getWriter(EvermindHttpServletResponse.java:921)
         at com.sage.servlet.ServletAdaptor.error(ServletAdaptor.java:148)
         at com.sage.servlet.ServletAdaptor.service(ServletAdaptor.java:74)
         at inetmrp.servlet.ServletAdaptor.service(ServletAdaptor.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    07/03/02 10:52:46.0 intemrp: An existing connection was forcibly closed by the remote host
    07/03/02 10:52:46.0 intemrp: An existing connection was forcibly closed by the remote host
    Any ideas?
    Thanks,
    Ed.

  • Bi-Beans export with 9ias

    Hi, i developed a web application using jdeveloper and bi-beans to access my oracle 9i cubes. The application works well from within jdeveloper/windows XP, and when i deployed my application to oracle 9ias on a sun solaris server, everything works well except when i try to export data (using the standard oracle bi-tags). I go this error:
    javax.servlet.jsp.JspException: java.lang.IllegalStateException: OutputStream already retrieved     at oracle.dss.addins.jspTags.BIThinSessionTag.doEndTag(BIThinSessionTag.java:206)     at jsp.presentacion__datos__dia__adm._jspService(_presentacion__datos__dia__adm.java:111)     [SRC:/jsp/presentacion_datos_dia_adm.jsp:8]     at com.orionserver[Oracle9iAS (9.0.2.3) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)     at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java(Compiled Code))     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java(Compiled Code))     at com.evermind[Oracle9iAS (9.0.2.3) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java(Compiled Code))     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:802)     at java.lang.Thread.run(Thread.java:512)
    i am using :
    JDeveloper 9.0.3.10.35
    Business Components Version     9.0.3.10.7
    any help will be appreciated
    thank you.

    You cannot see the TAR or BUG as they are only visible by the customer that logged the problem. However, reading the TAR/BUG reports there does appear to be a one-off patch from support to resolve this problem. Please log a TAR with Metalink and request the same fix based on the details in TAR 3093686.999 and Bug 3005974. Oracle Support will be able to help you download and install the required fixes in your environment
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • The question of exporting

    I deploy my progam to server.then i run it.when i export my report ,it thow a error.the information for following.
    please you help me!!thank you !!
    javax.servlet.jsp.JspException: java.lang.IllegalStateException: OutputStream already retrieved
    at oracle.dss.addins.jspTags.BIThinSessionTag.doEndTag(BIThinSessionTag.java:206)
    at phoneuser_type._jspService(_phoneuser__type.java:123)
    [SRC:/phoneuser_type.jsp:10]
    at com.orionserver[Oracle9iAS (9.0.2.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:523)
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:151)
    at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:64)

    Nobody know the method of solving this question?

Maybe you are looking for

  • Problem with maps on e72

    Hi everyone I've got a problem with maps on my E72. I've seen advert that Nokia is going to let everyone use maps for free on selected models. I was going to buy Sat Nav for whole Europe as I travel a lot and I was going to change my old N95. I thoug

  • Can't open documents from icloud

    I have Iworks 09 and have it installed on 3 macbooks. on the 2 macbook pro's it works fine but on the macbook air i can't seem to use versions or open/safe documents to the cloud. I checked the cloud setting and everything is as it should be.

  • My gal's macbook is acting up?

    Hey there, this is my first time on this forum so please bear with me. My wife's macbook is only 2 months old and today she was unable to use the number zero on the keyboard. Also, it acted as if it were possessed and would type by itself. She has ne

  • Autoplay doesnt come up when i plug my iphone 6 in to the computer?

    Before the Iphone 6 i had a iphone 4, for work i take a lot of photos and then store them on a hard drive when back in the office. I have always done this by plugging the phone in and then accessing the photo folder on the phone and Cutting and pasti

  • Field Tables

    hi freinds, I have a requirement to get the previous delivery referance(delivery note) in a report.. Here the field of the delivery note is LFSNR. and the table is in GOHEAD( but it is structure). Is it possible to retrieve data from a structure by w