9006Connection has already been closed

I am using WL server 6.1 SP2 with Apache plugin. I am continuously getting the
following message in my app server log
9006Connection has already been closed.
Any ideas what is causing this message?
Thanks

Hi,
Problem might be that your statement times out or your connection is getting closed when the statement executes.
--Sushant                                                                                                                                                                                                                                                                       

Similar Messages

  • 'Connection has already been closed'. Random error connecting with a pool

    Hi all,
    I've got a problem I cannot solve, and really hope in someone's help...
    The fact is: I'm working on a webapp which doesn't made use of frameworks or patterns or similars. I introduced the DAO pattern in order to organize and speed up the work. At the core of the new classes there is the DBDAO, and this is the way it obtains the connection:
          protected Connection conn = null;           ...             protected Connection getConnection()       {           try           {             if (conn == null || conn.isClosed())             {                     Context ctx = new InitialContext();                 javax.sql.DataSource ds=null;                     ds =(javax.sql.DataSource) ctx.lookup( "agespPool" );                     conn = ds.getConnection();                 conn.setAutoCommit(false);             }           }           catch (Exception ne)     ...
    Every new class that needs to access the db extends DBDAO and retrieves the conn with this method. In order to make things work without changing all the code, I modified the old class named 'Connessione' and made it extend DBDAO. Here is its method:
        public class Connessione extends DBDAO{     ...             public static synchronized Connection getConnessione() throws Exception {             return new Connessione().getConnection();         }
    That's all. Finished with the code.
    Now, if someone uses the new classes extending DBDAO, all goes well. But for some old function that still work with Connessione.getConnessione(), connection closes suddenly with no reason.
    For example, calling a page with some combo box populated with a db connection, you catch a:
        java.sql.SQLException: Connection has already been closed.             at weblogic.jdbc.wrapper.PoolConnection.checkConnection(PoolConnection.java:63)             at weblogic.jdbc.wrapper.ResultSetMetaData.preInvocationHandler(ResultSetMetaData.java:37)             at weblogic.jdbc.wrapper.ResultSetMetaData_oracle_jdbc_driver_OracleResultSetMetaData.getColumnType(Unknown Source)             at it.praxis.tim.agesp.pub.sql.PagingList.populate(PagingList.java:98)             at it.praxis.tim.agesp.pub.sql.PagingList.executeSQL(PagingList.java:53)             at jsp_servlet._jsp._todolist_new._richiesta.__listarichieste._jspService(__listarichieste.java:353)             at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    or sometimes:
        - 20080417141147: <E> HtmlSelect.createHtmlSelect(4) - Errore!     java.sql.SQLException: Result set already closed     - 20080417141147: <E> HtmlSelect.createHtmlSelect(7) - Errore!     java.sql.SQLException: Connection has already been closed.     - 20080417141147: <E> ERRORE:  ricercaRichieste :     java.sql.SQLException: Statement has already been closed
    That is, the conn is closed while used to populate the combo box. I don't understand who closes it.
    Moreover, that happens randomly: 1 or 2 times over 4 hits on the page. The other times, all goes well. Most of the other pages, all goes well. So I don't think I have to search for a bug in the code.
    Now, I'm working with BEA WL 8.1 sp 5 and Oracle 9.2.0.1.0 .
    The error turns out even if I work locally (with Tomcat 5.5.23).
    The webapp made use of a custom driver beforehand, and I replaced it with oracle's driver.
    I tried to set the Connection Pool with oracle.jdbc.driver.OracleDriver and oracle.jdbc.OracleDriver .
    I left the default for the connection pool, and then tried to set (BEA):
    Connection Reserve Timeout: -1
    Test Created Connections: On
    with no changes.
    The connection suddenly and randomly closes.
    Any help would be appreciated...
    Many thanks

    the thing that you are instantiating isn't a Connection object, it's a Connessione object. That's returning one that's either been stashed from a previous call, or
    acquires one from the data sourcea new Connessione object means a call to getConnection that means a new Connection object. That code is synchronized, it has to be a new object.
    It is entirely possible that conn is not null if other actions have taken place in your constructor. Even assuming it is null, we don't know anything about the
    connection pool you're trying to use, though it looks like it's probably weblogic's one.The contructor doesn't know of the connection. As for the pool, it is weblogic's one.
    And even assuming both of these cases, we have no particular reason to believe that you're calling the getConnessione() method instead of accidentally calling
    getConnection() and thus no reason to believe that you're definitely carrying out the actions that you believe you're carrying out.I wrote that the problem comes out in the old code that once worked fine. That code only uses Connessione.getConnessione() .
    Conversely we have an error message that says you're closing connections elsewhere. Clearly there's a bug. It's presumably in your assumptions. You're
    arguing instead of checking them.If I have a wrapper logging the close() calls, I have to see every call logged. Even if there's a bug (but remember that the code worked fine with a previous custom datasource), why do you think I shouldn't see that close() logged?
    I may be wrong, but I already searched in that code. I'm arguing after all the checks.
    There is no other thread that can see that connHow do you know? I have that Connessione.getConnessione() in a jsp. It's synchronized. That gives a new connection. I see it passed only to an utility class that queries the db and reads the resultset.
    Who do you think can access that connection?

  • Stream has already been closed - in SQL Developer v4.0.0.12

    Within SQL Developer v4.0.0.12 (Build 12.84) I have "Stream has already been closed" error message in the "Query result" pane.
    Used SQL:
         select * from all_mviews;
    Oracle11g Database v11.2.0.3 but this query works fine within SQL*Plus.
    When I select all the columns, I have the same error:
         select OWNER, MVIEW_NAME, CONTAINER_NAME, QUERY, QUERY_LEN, UPDATABLE, UPDATE_LOG, MASTER_ROLLBACK_SEG,
                MASTER_LINK, REWRITE_ENABLED, REWRITE_CAPABILITY, REFRESH_MODE, REFRESH_METHOD, BUILD_MODE,
                FAST_REFRESHABLE, LAST_REFRESH_TYPE, LAST_REFRESH_DATE, STALENESS, AFTER_FAST_REFRESH, UNKNOWN_PREBUILT,
                UNKNOWN_PLSQL_FUNC, UNKNOWN_EXTERNAL_TABLE, UNKNOWN_CONSIDER_FRESH, UNKNOWN_IMPORT, UNKNOWN_TRUSTED_FD,
                COMPILE_STATE, USE_NO_INDEX, STALE_SINCE, NUM_PCT_TABLES, NUM_FRESH_PCT_REGIONS, NUM_STALE_PCT_REGIONS
           from all_mviews;
    I though it was the QUERY column (datatype is LONG), but the following SQL works fine:
         select OWNER, MVIEW_NAME, CONTAINER_NAME, QUERY, query_len, updatable, update_log, master_rollback_seg,
                master_link, rewrite_enabled, REWRITE_CAPABILITY, REFRESH_MODE, REFRESH_METHOD, BUILD_MODE,
                FAST_REFRESHABLE, LAST_REFRESH_TYPE, LAST_REFRESH_DATE, STALENESS, AFTER_FAST_REFRESH, UNKNOWN_PREBUILT,
                UNKNOWN_PLSQL_FUNC, UNKNOWN_EXTERNAL_TABLE, UNKNOWN_CONSIDER_FRESH, UNKNOWN_IMPORT, UNKNOWN_TRUSTED_FD,
                COMPILE_STATE, USE_NO_INDEX, STALE_SINCE, NUM_PCT_TABLES
           from all_mviews;
    just left out some columns (at the end).
    This works also, all columns but just leaving out the QUERY column:
         select OWNER, MVIEW_NAME, CONTAINER_NAME, QUERY_LEN, UPDATABLE, UPDATE_LOG, MASTER_ROLLBACK_SEG, MASTER_LINK,
                REWRITE_ENABLED, REWRITE_CAPABILITY, REFRESH_MODE, REFRESH_METHOD, BUILD_MODE, FAST_REFRESHABLE,
                LAST_REFRESH_TYPE, LAST_REFRESH_DATE, STALENESS, AFTER_FAST_REFRESH, UNKNOWN_PREBUILT, UNKNOWN_PLSQL_FUNC,
                UNKNOWN_EXTERNAL_TABLE, UNKNOWN_CONSIDER_FRESH, UNKNOWN_IMPORT, UNKNOWN_TRUSTED_FD, COMPILE_STATE,
                USE_NO_INDEX, STALE_SINCE, NUM_PCT_TABLES, NUM_FRESH_PCT_REGIONS, NUM_STALE_PCT_REGIONS
           from all_mviews;
    It seams that these queries are reaching the limit (of data transfer) within SQL Developer v4.0.0.12 (note this was also a problem in SQL Developer v3.x).

    Hi Guy,
    Did you happen to see this recent discussion?  SQL Developer v4 giving error 'Stream has been closed' while querying tables containing long data
    I recommend trying the workaround described there just in case your issue also relates to LONG column:
    Add the following line in sqldeveloper.conf file:
       AddVMOption -Doracle.jdbc.useFetchSizeWithLongColumn=true
    Regards,
    Gary
    SQL Developer Team

  • Connection handle of this Interaction has already been closed

    Dear All,
    We are facing problem in Portal application and the portal screen shows
    "WARNING : DOMG:0001 : EN: Applicatie Foutcould not create JCOClientconnection for logical system: WD_MODELDATA_DEST - Model..." When i checked the JCO and it seems to be working fine.
    This error message occurs not all the time but it happens very often nowdays in our production system.
    The trace file has the below info ....
    #1.5 #005056917DFC0065000001700000148000048ACD4C7672EF#1278514262577
    #com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel#sap.com/tcwddispwda#
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModel.JcoClientManagementWDP#m.
    vanginhoven#10799##n/a##0fee4bb889d711dfa9cc005056917dfc#SAPEngine_Application
    Thread[impl:3]74ID\#(J2EE3880500)ID0960469550DB02703921047067447299End.
    WID1278484862289##0#0#Error##Plain###Could not create JCOClientConnection for
    logical System: *'WD_MODELDATA_DEST' *- Model: 'class com.nl.cv.pr.productlijst.
    Zorg_Arrangementproduct_Lijst_Model'. #
    #1.5 #005056917DFC002A000009B40000148000048ACD4F560780#1278514310781
    #System.err#phobos/phobos~dcrlcear#System.err#Guest#0##as-careview1_EPP_3880550##2a53432b89d711dfbb8a005056917dfc#SAPEngine_
    Application_Thread[impl:3]_38##0#0#Error##Plain###Connection handle of this
    Interaction has already been closed#
    #1.5 #005056917DFC002A000009B50000148000048ACD4F560987#1278514310781
    #System.err#phobos/phobos~dcrlcear#System.err#Guest#0##as-careview1_EPP_3880550##2a53432b89d711dfbb8a005056917dfc#SAPEngine_
    Application_Thread[impl:3]_38##0#0#Error##Plain###Connection is already closed
    and no longer associated with a managed connection#
    Do anyone have any idea on this issue? Please help me out to fix this problem
    Regards
    Raj

    Hi,
    The error message "Could not create JCOClientConnection for logical System" is only triggered when the WebDynpro application is requesting more JCO connections than the number of JCOs allocated for this application.                                                                               
    I suggest to carefully go through the documents below in order to properly configure your JCOs. If necessary, remove them and recreate in the correct way:                                                                               
    JCo Quick Summary                                                         
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/85a483cb-0d01-0010-2990-c5168f01ce8a                                                                               
    How to Configure the JCo Destination Settings                             
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3103eb90-0201-0010-71af-be6f4a6f61d1                                                                               
    You will have to calculate the maximum number of JCo connections to each application based on Models and users.
    Br,
    Javier

  • Error Message: "One of the base documents has already been closed".

    Hello everyone
    I would appreciate very much if someone can help me.  The following error message prompts up when trying to create a Credit Note BASED on a A/R Invoice: "One of the base documents has already been closed". it is necesssary to say that we are not changing anything in between the two documents.
    We are running SAP Business One 2007A PL49.
    Thanks very much
    Claudia

    Hi.
    Please read this SAP Note: [854781 Error message "Invoice is already closed or blocked".|https://websmp230.sap-ag.de/sap(bD1lcyZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=S&note_numm=0001290054|Click here to view].
    This issue could be related to decimal places in amounts.
    This could be caussed by changing the decimal places for amounts, prices, etc. in General Settings.
    Regards.

  • Error: One of the base documents has already been closed (-10)

    I have a web service to get and set pick lists and add delivery notes via DI Server. but I have one scenario that causes the error 'Error: One of the base documents has already been closed (-10)':
    i have a pick list with item A1 with a quantity of 10. I pick and delivery 3. now the pick list is closed and in the picklist creation dialog I can choose the remaining 7 of A1 for another picklist. but if I do so and then try to pick and delivery the remaining 7, I'm getting that error. The sales order, that is the base document of the pick list and the delivery, is still 'open'. so, what base document is meant here?

    I found the error. I tried to add the DocumentsAdditionalExpenses to the second delivery, too, and this is not possible.

  • Connection has already been closed

    We are on Weblogic 7.0 SP1 on HP UX 11i. Database is Oracle ver 9.0.1.3. Using
    thin driver for database access.
    Intermittently we get the error: "Connection has already been closed" from DAO
    programs. The stack trace shows that this error is preceded by java.sql.SQLException:
    java.lang.NullPointerException. The error is appearing in the finally block when
    we attempt to close the connection if it is not null. Here's the code piece:
    finally {
    try {
    if(connection != null)
    connection.close();
    connection = null;
    } catch (SQLException sqlException) {
    log4j.error(sqlException.toString());
    What we are not able to understand is, this piece of code can be executed only
    if connection object is not null and if so, why this error - 'Connection has already
    been closed'?
    We noticed a bug reported in SP1:
    Bug No: CR062827
    Description : Fixed a problem with prepared statement code that was provoking
    a null pointer exception; the prepared statement object was being set to null.
    Our error message is preceded by Nullpointer Exception and there is a possibility
    that it could be from PreparedStatement due to this bug. But, BEA has not given
    information on what happens to Connection when Prepared Statement throw this exception.
    Whether any of you facing the same kind of problem?
    Thanks in advance,

    chitra wrote:
    Here's the stack trace:
    2003-01-24 10:24:32,510 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:203)
    - java.sql.SQLException: java.lang.NullPointerException
    2003-01-24 10:24:32,511 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:228)
    - java.sql.SQLException: Connection has already been closed.
    Sometimes, we also get a different stack trace:
    2003-01-24 10:24:21,171 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:203)
    - java.sql.SQLException: Closed Statement: next
    2003-01-24 10:24:21,180 ERROR [ExecuteThread: '5' for queue: 'default'] (TestDao.java:228)
    - java.sql.SQLException: Connection has alredy been closed
    ThanksHi, that's not a stacktrace. That's just the error message. Please turn on jdbc logging and show me
    the jdbc log
    file. A full stacktrace will pe printed for every SQLException, showing all the method calls.
    thanks,
    Joe
    >
    >
    Joseph Weinstein <[email protected]> wrote:
    chitra wrote:
    We are on Weblogic 7.0 SP1 on HP UX 11i. Database is Oracle ver 9.0.1.3.Using
    thin driver for database access.
    Intermittently we get the error: "Connection has already been closed"from DAO
    programs. The stack trace shows that this error is preceded by java.sql.SQLException:
    java.lang.NullPointerException. The error is appearing in the finallyblock when
    we attempt to close the connection if it is not null. Here's the codepiece:
    finally {
    try {
    if(connection != null)
    connection.close();
    connection = null;
    } catch (SQLException sqlException) {
    log4j.error(sqlException.toString());
    What we are not able to understand is, this piece of code can be executedonly
    if connection object is not null and if so, why this error - 'Connectionhas already
    been closed'?Let me see the full stacktrace of the NullPointerException and the
    'Connection is already closed' exception.
    As to the code above, I'm not saying you're doing this, but if any code
    above that finally block closed the connection, then you can get the
    'already closed' exception. In other words, connection.close() doesn't
    automatically make the reference null.
    Joe
    We noticed a bug reported in SP1:
    Bug No: CR062827
    Description : Fixed a problem with prepared statement code that wasprovoking
    a null pointer exception; the prepared statement object was being setto null.
    Our error message is preceded by Nullpointer Exception and there isa possibility
    that it could be from PreparedStatement due to this bug. But, BEAhas not given
    information on what happens to Connection when Prepared Statement throwthis exception.
    Whether any of you facing the same kind of problem?
    Thanks in advance,

  • ITunes won't open if it has already been closed in the same session. No error message appears and I have already unistalled/reinstalled iTunes with no result.

    My iTunes opens fine if it is the first time I have opened it since turning my computer on. If I close iTunes, however, it won't open again unless I restart my computer. No error message appears. Clicking on both the shortcut and file in iTunes folder does nothing. I unistalled iTunes and reinstalled it but the issue hasn't gone away. A virus scan has come up with nothing. I would appreciate any ideas that might help to fix this issue.

    Having the same problem - am running Win 7 Pro 32 bit. Discovered that when you close iTunes task manager shows that iTunes.exe is still running and will not close unless you reboot. I have also found that after starting Win 7 that if I launch iTunes by inserting a CD, the CD plays and displays all tracks correctly. However, if I eject the CD and insert a different one neither Win 7 or iTunes recognises the CD. These problems seem to have started with the release of 10.5.2 - prior to that no problems at all. Have tried reinstalling and it does not make any difference.

  • How do I get a refund on Export PDF that has ALREADY been agreed

    On 1/21-1/22 I tried to 'renew' a subscription for Export PDF. By some error (maybe mine - I just dont understand the whole thing) my Bank was immediately charged for two subscriptions, each at a different price. I immediately "chat"ted with several  reps (it was difficult to get onto the chat and find out how to cancel) and was assured that both would be cancelled and refunded. They weren't!
    I waited a week. Was again frustrated by the chat hookup, and tried the 'cloud' retail product tel #, assuming it was wrong but that I could be switched to the correct one. Had a very pleasant chat, was assured that both would be cancelled and refunded, received 2 e-mails confirming the cancellations, each with a seperate "Case #". Felt pretty good! It had only taken me a week of reasonably diligent effort to get a very simple thing done! IT WASN"T DONE! (Yes, I apologize - I know I'm loud - but by now I've got steam coming out of my ears!)
    Today I got an e-mail, telling me that the refund had been processed and the case # would be closed. I looked at my bank, and only one had been refunded! I reviewed all the other e-mails and the notes from the telephone calls and chats to be sure I hadn't misunderstood something. But, no I hadn't. I went to my Adobe on-line and looked up 'my orders' history. Sure enough one had been invoiced and refunded ( the lesser charge of the two) but the other had ONLY BEEN INVOICED - NOT CANCELLED. And it seems that every piece of this transaction generates a new "order" , "case" or some other "reference #" - none of which are tied together, except by the invoice amount, when it is mentioned - which it typically IS NOT.
    My question, then, is : How can I get past this absolute frustration over every aspect of my interaction with Adobe and GET THIS TAKEN CARE OF?????????

    Hi Stacy,
        What frustration? (Just kidding !)
        As I mentioned, one of the two charges has been  refunded. Credited by
    Adobe on Jan 28, I believe I received it in my bank on Jan  30.
        The other charge, $25.37 of order # AD011017507,  has not been received
    by my bank yet. But this can't be that much of a surprise,  and has nothing
    to do with "10 business days" for refunds to post.
        To this minute, "My Orders" on Adobe website shows  that the order #
    AD011017507  was invoiced on January 22, but that no  credit invoice has been
    posted against this order to this moment!
        Can you begin to understand the frustration of  being unable, through
    all attempts to untangle this mess, starting within  one hour of the original
    order, with I believe nine different "Chats",  telephone calls and, finally
    a "problem" posting,  stretching over more  than thirteen days. Of course
    it doesn't make much sense to devote this much  attention to less than $50
    worth of stuff, but I do not let things like this  dangle.
        And can you imagine how loathe I am to deal with  Adobe for fear of
    some real problem?
        At any rate, I would certainly be pleased if you  can suggest a way for
    me to extricate myself from this. Any help would be  GREATLY appreciated!
        Thanks for your time and any trouble,
        Stephen Ellis
        <removed by admin>
    In a message dated 2/3/2014 4:08:59 P.M. Eastern Standard Time, 
    [email protected] writes:
    Re:  How do I get a refund on Export PDF that has ALREADY been agreed 
    created by StacySison (http://forums.adobe.com/people/StacySison)  in 
    Adobe ExportPDF - View the full  discussion
    (http://forums.adobe.com/message/6082008#6082008)

  • Unable to load the tables in the Power Pivot Window – An Item with the Same Key has already been added

    Hi there,
    I recently had the following situation, where I changed the source of my CSV file in Power Query.
    Once I had reloaded the file, it would then not load into Power Pivot. So I disabled the loading from Power Query into Power Pivot. I then enabled the loading to the Data Model. Which then successfully loaded the data into Power Pivot.
    But once I went into Power Pivot, had a look, then saved the Excel file. Once saved I closed the Excel file. I then opened the Excel file again and all the sheets that interact with the Power Pivot data work fine.
    But if I go and open Power Pivot I get the following error: Unable to load the tables in the Power Pivot Window – An Item with the Same Key has already been added.
    This is what I get from the Call Stack
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Microsoft.AnalysisServices.Common.LinguisticModeling.SynonymModel.AddSynonymCollection(DataModelingColumn column, SynonymCollection synonyms)
       at Microsoft.AnalysisServices.Common.LinguisticModeling.LinguisticSchemaLoader.DeserializeSynonymModelFromSchema()
       at Microsoft.AnalysisServices.Common.SandboxEditor.LoadLinguisticDesignerState()
       at Microsoft.AnalysisServices.Common.SandboxEditor.set_Sandbox(DataModelingSandbox value)
       at Microsoft.AnalysisServices.XLHost.Modeler.ClientWindow.RefreshClientWindow(String tableName)
    I would assume that the issue is with the synonyms and for some reason, when I disabled the loading of my data into the Power Pivot Model, it did not remove the associations to the actual table and synonyms.
    If I renamed the table in Power Pivot it all works fine. So that was my work around. Fortunately I did have a copy of the Excel workbook before I made this change. So I could then go and add back in all the relevant data to my table.
    Has anyone had this before and know how to fix it?
    http://www.bidn.com/blogs/guavaq

    Hi there
    I can share the work book, if possible to send me an email address. As the workbook size is about 9Mb.
    Thanks
    Gilbert
    http://www.bidn.com/blogs/guavaq

  • RJVM has already been shutdown error while looking upto Foreign Server

    Hi,
    I am trying to set up 2 new servers in a clustered environment. In this I have configured a Foreign Server which is looking up to queues in different server.
    The structure is like this: 1 Foreign Server with 2 Queues and 1 Connection factory with exactly same name as they present on the host server.
    While starting the server, I am getting an exception:
    <Nov 5, 2012 7:39:58 PM EET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: ClonedQueueAnonymousWaiter is unable to connect to the JMS destination: MDB_QUEUE_RESPONSE. The Error was:
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: RJVM has already been shutdown; nested exception is:
         java.io.IOException: RJVM has already been shutdown]
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74)
         at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:470)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:221)
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
         at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
         at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at weblogic.jms.common.CDS$2.run(CDS.java:486)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
         at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
         at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
         at weblogic.jms.common.CDS.access$100(CDS.java:41)
         at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
         at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.rmi.UnmarshalException: RJVM has already been shutdown; nested exception is:
         java.io.IOException: RJVM has already been shutdown
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:360)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at weblogic.jndi.internal.ServerNamingNode_1034_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
         ... 21 more
    Caused by: java.io.IOException: RJVM has already been shutdown
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         ... 24 more
    Caused by: java.io.IOException: RJVM has already been shutdown
         at weblogic.rjvm.RJVMImpl.addPendingResponse(RJVMImpl.java:513)
         at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:900)
         at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:394)
         at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:404)
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
         ... 24 more
    >
    Weblogic is installed in Solaris machine and welogic's version is 10.3.4.0 with Java version 1.6.0 update 33. I have checked the firewall, /etc/hosts but there are no issues with that.
    The JNDI Connection URL is configure like: t3://xx.xxx.x.xx,xx.xxx.x.xx:7001/
    I have tried giving like this also: t3://xx.xxx.x.xx:7001,xx.xxx.x.xx:7001/ or t3://hostname1,hostname2:7001/ or t3://hostname1:7001,hostname2:7001/
    but nothing worked.
    The foreign servers are accessible from my Application Server when I do the telnet on the port. There is no cross domain security required. Funny thing is I have a same set-up in two other application server (in cluster again) and there on configuring the Foreign server to same IPs, I am not facing any issues at all.
    Can anyone please help me with this. Searched all over the place but have no clue regarding this. Many forums mentioned about firewall and etc/hosts but that is also not case it seems.
    Regards,
    Priyam

    809364 wrote:
    You can apply the below debug flags to check t he RJVM Communication in detail and figure out what's going wrong and do apply it at both the side
    -Dweblogic.kernel.debug=true
    -Dweblogic.debug.DebugConnection=true
    -Dweblogic.StdoutDebugEnabled=true
    -Dweblogic.log.LogSeverity=Debug
    -Dweblogic.log.LoggerSeverity=DebugI added the debug as you mentioned and I get the below information there:
    <Nov 6, 2012 11:41:16 AM EET> <Debug> <RJVM> <BEA-000500> <RJVMFinder trying to find rjvm for t3://moon1,moon2:7001->moon1,moon2:[7001, -1, -1, -1, -1, -1, -1]->[]
    Active RJVMs:
    {-8968250770921317063S:10.160.1.115:[7001,-1,-1,-1,-1,-1,-1]:fcdb_domain:AdminServer on [10.160.1.115:7001]=weblogic.rjvm.RJVMImpl@4320d68d - id: '-8968250770921317063S:10.160.1.115:[7001,-1,-1,-1,-1,-1,-1]:fcdb_domain:AdminServer' connect time: 'Tue Nov 06 11:40:26 EET 2012'}
    Synonyms:
    {}>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Bootstrapping connection to: 'moon1/10.160.1.40:7001' using: 't3'>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Looking for a new connection for channel Default[t3]:t3(t3):venus1:7001:null:-1 to remote server 0B:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1,-1,-1] active connections: {}>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <New connection for protocol t3, remote address moon1/10.160.1.40, remote port 7001, over channel Default[t3]>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Added: 'Default[t3]:t3(t3):venus1:7001:null:-1' connection: 'weblogic.rjvm.t3.MuxableSocketT3$T3MsgAbbrevJVMConnection@7582aacf'. Connections list size 1>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Bootstrapping using a: 't3', connection to: 'moon1/10.160.1.40' on port: '7001'>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Created RJVM for: '-3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1 on [10.160.1.40:7001]', Active RJVMs:
    {-8968250770921317063S:10.160.1.115:[7001,-1,-1,-1,-1,-1,-1]:fcdb_domain:AdminServer on [10.160.1.115:7001]=weblogic.rjvm.RJVMImpl@4320d68d - id: '-8968250770921317063S:10.160.1.115:[7001,-1,-1,-1,-1,-1,-1]:fcdb_domain:AdminServer' connect time: 'Tue Nov 06 11:40:26 EET 2012', -3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1 on [10.160.1.40:7001]=weblogic.rjvm.RJVMImpl@7bb8a8c6 - id: '-3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1' connect time: 'Tue Nov 06 11:41:17 EET 2012'}
    Synonyms:
    {}>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Remote heartbeat: '60000', local heartbeat: '60000'>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Setting heartbeat for RJVM: '-3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1' to: '60000' milliseconds>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Added: 'Default[t3]:t3(t3):venus1:7001:null:-1' connection: 'weblogic.rjvm.t3.MuxableSocketT3$T3MsgAbbrevJVMConnection@7582aacf'. Connections list size 1>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000517> <Error on connection: 'weblogic.rjvm.t3.MuxableSocketT3$T3MsgAbbrevJVMConnection@7582aacf'
    java.io.EOFException
    java.io.EOFException
         at weblogic.rjvm.t3.MuxableSocketT3.endOfStream(MuxableSocketT3.java:345)
         at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:826)
         at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:760)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:941)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:898)
         at weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:126)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    >
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Signaling peer: '-3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1' gone - weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.io.EOFException>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Closed and removed: 't3' connection to: '-3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1'. Connections list size 0>
    <Nov 6, 2012 11:41:17 AM EET> <Debug> <RJVM> <BEA-000500> <Closing: '-3712802650201056847S:10.160.1.40:[7001,-1,-1,-1,-1,-1,-1]:fcj_domain:ManagedServer1'>
    <Nov 6, 2012 11:41:17 AM EET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: ClonedQueueAnonymousWaiter is unable to connect to the JMS destination: MDB_QUEUE_RESPONSE. The Error was:
    javax.naming.CommunicationException [Root exception is weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.io.EOFException]
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74)
         at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:470)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:221)
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
         at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
         at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at weblogic.jms.common.CDS$2.run(CDS.java:486)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
         at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
         at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
         at weblogic.jms.common.CDS.access$100(CDS.java:41)
         at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
         at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: weblogic.rjvm.PeerGoneException: ; nested exception is:
         java.io.EOFException
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at weblogic.jndi.internal.ServerNamingNode_1034_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
         ... 21 more
    Caused by: java.io.EOFException
         at weblogic.rjvm.t3.MuxableSocketT3.endOfStream(MuxableSocketT3.java:345)
         at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:826)
         at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:760)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:941)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:898)
         at weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:126)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    >
    Seems like Peer gone exception is the root cause of this. Any idea for this ?
    Regards,
    Priyam
    Edited by: Priyam Srivastava on Nov 6, 2012 2:49 AM

  • Problem report: "Can't open the illustration. The image has already been specified, it cannot be changed."

    I got a problem with my files I created in Illustrator CS6. After I closed them and wanted them to open up again, this problem report popped up:
    "Can't open the illustration. The image has already been specified, it cannot be changed."
    If I click OK, there is a white site with nothing on it. No object, no pictures, nothing.
    The Illustrator file has still the right size and when I start ArtFiles to collect all used pictures and fonts it's no problem.
    In Adobe Bridge there is still a preview of the original file and I can see what HAS to be placed in the file.
    Can anybody help me out?
    We had to make all the work again for a presentation but this is not the solution for this problem if that will happen in the future again.
    Thank you in advance!

    Thank you for your answer!
    Actually there is no CS5 installed on our computers (no more). I will try to get one from our admin. Hope this will work! In the meantime we had this problem several times.

  • The process could not be created because the maximum number of asynchronous responses (5) has already been reached, and it will be dropped.

    Hi
    he process could not be created because the maximum number of asynchronous responses (5) has already been reached, and it will be dropped.
    Command executed:    "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" -command "&G:\SCOM\SCOMModule\Notification\SMS.ps1 -scomalertid:'{c5a013e7-5408-468a-9b04-febab33cc56d}' -alertname:'Common Primary Database TableSpace
    Threshold Alert' -alertdesc:'TableSpace TEMP FreeSizePercent:0.4375\n' -alertstate:'Closed' -alerttime:'7/26/2014 1:55:19 PM' -Priority:'1' -Severity:'2'"
    Working Directory:    g:\SCOM\SCOMModule\Notification
    One or more workflows were affected by this.  
    Workflow name: Subscription852fbf70_40eb_450c_874d_46b631ca1352
    Instance name: Alert Notification Subscription Server
    Instance ID: {E07E3FAB-53BC-BC14-1634-5A6E949F9230}
    Management group:******
    Please help me
    Thanks

    Hi,
    the RMS is "Root Management Server". When you install first management server it becomes RMS. The RMS is relevant in SCOM 2007x management group. You can identify which server is RMS in administration console under management server view. Look for instance
    with "yes" value in "Is RMS" column.
    If you have SCOM 2012x version management group create sugested registry entrys on all management servers (MS) which executes command channel.
    This will surely solve your
    problem.
    Regards,
    Ivan

  • IllegalStateException: getOutputStream() has already been called

    Hi guys,
    I am writing JSP to retrieve data from database and export to the user as csv or zip file. It has to be binary. I would like to a download dialog to show up and allow users to choose where to save the exported file.
    Funcitonally, it works fine althrough I get an error page saying nothing to display. But it always complains that IllegalStateException: getOutputStream() has already been called for this session. I have done much research and testing, but....in vain.
    Hope somebody could help me with this. so frustrated that I am about to explode.
    <!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="application/octet-stream">
            <title>Load Page</title>
        </head>
        <body >
            <% OutputStream outRes = response.getOutputStream( ); %><%@page contentType="application/octet-stream"%><%
            %><%@page pageEncoding="UTF-8" import="java.sql.*,java.io.*,java.util.*,java.util.zip.*,java.math.BigDecimal;"%><%
            %><%
            try {
                Class.forName(ResourceBundle.getBundle("map").getString("driver"));
            } catch (ClassNotFoundException ex) {
               //ex.printStackTrace();
               return;
            String EXPORT_DIR = ResourceBundle.getBundle("map").getString("SUBMITTAL_EXPORT_DIR");
            String EXPORT_NAME = ResourceBundle.getBundle("map").getString("SUBMITTAL_NAME");
            String EXPORT_ZIP_NAME = ResourceBundle.getBundle("map").getString("SUBMITTAL_ZIP_NAME"); 
            String sqlQuery = "SELECT EMP_ID, EMP_NAME FROM EMP";
            Connection conn = null;
            Statement stmt = null;
            ResultSet rs = null;
            OutputStream expStream = null;
            boolean success = false;
            try {
                //out.println("<p>Connecting to the source database ...");
                // establish database connection
                conn = DriverManager.getConnection(
                        ResourceBundle.getBundle("map").getString("sqlurl"),
                        ResourceBundle.getBundle("map").getString("ORACLE_DBUSER"),
                        ResourceBundle.getBundle("map").getString("ORACLE_DBPASSWORD") );
                stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
                rs = stmt.executeQuery(sqlQuery);
                //out.println("Done</p>");
                // open a file to write
                File exportFile = new File(EXPORT_DIR + File.separatorChar + EXPORT_NAME);
                if (exportFile.exists())  exportFile.delete();
                exportFile.createNewFile();
                expStream = new BufferedOutputStream(new FileOutputStream(exportFile));
                // iterate all records to save them to the file
                //out.print("<p>Exporting the table data ...");
                while(rs.next()) {
                    String recordString = "";
                    ResultSetMetaData metaData = rs.getMetaData() ;
                    int colCount = metaData.getColumnCount();
                    for(int i=1; i<=colCount; i++) {
                        int colType = metaData.getColumnType(i);
                        switch(colType) {
                            case Types.CHAR: {
                                String sValue = rs.getString(i);
                                if (rs.wasNull())
                                    recordString += ("'',");
                                else
                                    recordString += ("'"+ sValue + "',");
                                break;
                            case Types.VARCHAR: {
                                String sValue = rs.getString(i);
                                if (rs.wasNull())
                                    recordString += ("'',");
                                else
                                    recordString += ("'"+ sValue + "',");
                                break;
                            case Types.FLOAT: {
                                float fValue = rs.getFloat(i);
                                if (rs.wasNull())
                                    recordString += (",");
                                else
                                    recordString += (fValue + ",");
                                break;
                            case Types.DOUBLE: {
                                double dbValue = rs.getDouble(i);
                                if (rs.wasNull())
                                    recordString += (",");
                                else
                                    recordString += (dbValue + ",");
                                break;
                            case Types.INTEGER: {
                                int iValue = rs.getInt(i);
                                if (rs.wasNull())
                                    recordString += (",");
                                else
                                    recordString += (iValue + ",");
                                break;
                            case Types.NUMERIC: {
                                BigDecimal bdValue = rs.getBigDecimal(i);
                                if (rs.wasNull())
                                    recordString += (",");
                                else
                                    recordString += (bdValue + ",");
                                break;
                            default:
                                out.println("<p><font color=#ff0000> Unidentified Column Type "
                                        + metaData.getColumnTypeName(i) + "</font></p>"); */
                                success = false;
                                return;
                    recordString = recordString.substring(0, recordString.length()-1);
                    expStream.write(recordString.getBytes());
                    expStream.write((new String("\n")).getBytes());
                expStream.flush();
                //out.println("Done</p>");
                //out.println("<p>Data have been exported to " + filepath + "</p>");
                success = true;
            } catch (SQLException ex) {
               //out.println(ex.getStackTrace());
            } catch (IOException ex) {
               //out.println(ex.getStackTrace());
            } finally {
                if (expStream != null) {
                    try {
                        expStream.close();
                    } catch (IOException ex) {
                       // out.println(ex.getStackTrace());
                if (rs != null) {
                    try {
                        rs.close();
                    } catch(SQLException ex) {
                        //out.println(ex.getStackTrace());
                if (stmt != null) {
                    try {
                        stmt.close();
                    } catch(SQLException ex) {
                       // out.println(ex.getStackTrace());
                if(conn != null) {
                    try {
                        conn.close();
                    } catch(SQLException ex) {
                       // out.println(ex.getStackTrace());
            if (!success) return;
             * compress the exported CSV file if necessary
            int DATA_BLOCK_SIZE = 1024;
            if (request.getParameter("zip")!=null && request.getParameter("zip").equalsIgnoreCase("true")) {
                success = false;
                BufferedInputStream sourceStream = null;
                ZipOutputStream targetStream = null;
                try {
                    File zipFile = new File(EXPORT_DIR + File.separatorChar + EXPORT_ZIP_NAME);
                    if (zipFile.exists())  zipFile.delete();
                    zipFile.createNewFile();
                    FileOutputStream fos = new FileOutputStream ( zipFile );
                    targetStream = new ZipOutputStream ( fos );
                    targetStream.setMethod ( ZipOutputStream.DEFLATED );
                    targetStream.setLevel ( 9 );
                     * Now that the target zip output stream is created, open the source data file.
                    FileInputStream fis = new FileInputStream ( EXPORT_DIR + File.separatorChar + EXPORT_NAME );
                    sourceStream = new BufferedInputStream ( fis );
                    /* Need to create a zip entry for each data file that is read. */
                    ZipEntry theEntry = new ZipEntry ( EXPORT_DIR + File.separatorChar + EXPORT_NAME );
                     * Before writing information to the zip output stream, put the zip entry object
                    targetStream.putNextEntry ( theEntry );
                    /* Add comment to zip archive. */
                    //targetStream.setComment( "comment" );
                    /* Read the source file and write the data. */
                    byte[] buf = new byte[DATA_BLOCK_SIZE];
                    int len;
                    while ( ( len = sourceStream.read ( buf, 0, DATA_BLOCK_SIZE ) ) >= 0 ) {
                        targetStream.write ( buf, 0, len );
                     * The ZipEntry object is updated with the compressed file size,
                     * uncompressed file size and other file related information when closed.
                    targetStream.closeEntry ();
                    targetStream.flush ();
                    success = true;
                } catch ( FileNotFoundException e ) {
                    //e.printStackTrace ();
                } catch ( IOException e ) {
                    //e.printStackTrace ();
                } finally {
                    try {
                        if (sourceStream != null)
                            sourceStream.close ();
                        if (targetStream != null)
                            targetStream.close ();
                    } catch(IOException ex) {
                        //ex.printStackTrace();
                if (!success) return;
             * prompt the user to download the file
            //response.setContentType("text/plain");
            //response.setContentType( "application/octet-stream" );
            InputStream inStream = null;
            //OutputStream outRes = null;
            try {
                if (request.getParameter("zip")!=null && request.getParameter("zip").equalsIgnoreCase("true")) {
                    response.setHeader("Content-Disposition", "attachment;filename=" + EXPORT_ZIP_NAME);
                    inStream = new BufferedInputStream(new FileInputStream(EXPORT_DIR + File.separatorChar + EXPORT_ZIP_NAME));
                else {
                    response.setHeader("Content-Disposition", "attachment;filename=" + EXPORT_NAME);
                    inStream = new BufferedInputStream(new FileInputStream(EXPORT_DIR + File.separatorChar + EXPORT_NAME));
                out.clearBuffer();
                //outRes = response.getOutputStream(  );
                byte[] buf = new byte[4 * DATA_BLOCK_SIZE];  // 4K buffer
                int bytesRead;
                while ((bytesRead = inStream.read(buf)) != -1) {
                    outRes.write(buf, 0, bytesRead);
                outRes.flush();
                int byteBuf;
                while ( (byteBuf = inStream.read()) != -1 ) {
                    out.write(byteBuf);
                out.flush();
            } catch (IOException ex) {
                //ex.printStackTrace();
            finally {
                try {
                    if (inStream != null)
                        inStream.close();
                    if (outRes != null)
                        outRes.close();
                } catch(IOException ex) {
                    //ex.printStackTrace();
          %>
        </body>
    </html>

    So I went to the API: http://java.sun.com/j2ee/1.4/docs/api/
    Looked up ServletResponse, then looked for the getOutputStream() method. It says:
    "Throws:
    IllegalStateException - if the getWriter method has been called on this response"
    You can call only one of the getWriter or getOutputStream methods, not both. You are calling both. When you use a JSP, a variable called 'out' is generated (a PrintWriter) from the the Writer you get when response.getWriter() is called. This is done before your code gets executed as one of the functions that occur when a JSP is translated to a Servlet. You then write to that out variable when you print the HTML in the JSP code.
    This is best done in a Servlet, not a JSP, since there is no display and you require control over the servlet response.

  • OC4J Error== java.io.IOException: Data has already been flushed to the cli

    Hi All,
    I deployed a J2EE Application in Oracle Application Server OC4J Instance.
    while testing the application i got the error
    java.io.IOException: Data has already been flushed to the client
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.EvermindJSPWriter.clear(EvermindJSPWriter.java:308)
    at PricingCriteria.jspService(_PricingCriteria.java:135)
    [SRC:/PricingCriteria.jsp:401]
    at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g(10.1.2.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:834)
    at com.evermind[Oracle Application Server Containers for J2EE 10g(10.1.2.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    Please help me in this issue.
    Thanks in Advance,
    Salih KM
    null

    Your error is because you have already flushed or closed your output stream. Your response is done but you are trying to forward after the fact.

Maybe you are looking for