Closed Statement Exception

hi,
I'm using OC4J version "Oracle Application Server Containers for J2EE 10g (9.0.4.3.0) (build 060411.1838)" as my application server running on AIX 5.3 with java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
Classic VM (build 1.4.1, J2RE 1.4.1 IBM AIX build ca1411-20030930 (JIT enabled:
jitc)).
Recently i encountered the Closed Statement Exception occasionally, from the stack trace, this exception was thrown during the time i commit the transaction. I wonder is this a bug in the OC4j.jar file ? Please advice me how to overcome this problem. Thanks
java.sql.SQLException: Closed Statement
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Compiled Code))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Inlined Compiled Code))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Inlined Compiled Code))
at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java(Inlined Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(
OraclePreparedStatement.java(Compiled Code))
at oracle.jdbc.driver.OracleConnection.commit(OracleConnection.java(Compiled Code))
at com.evermind.sql.FilterConnection.commit(FilterConnection.java(Compiled Code))
at com.evermind.sql.OrionCMTConnection.commit(OrionCMTConnection.java(Compiled Code))
at com.evermind.sql.ConnectionBCELProxy.commit(ConnectionBCELProxy.java(Compiled Code))

thanks for the replies, from the stack trace, it seems that the exception is thrown at the time of "commit", but my close statement is put in the finally block, so there is no way the connection is closed and recently this exception just disappear without changing code.

Similar Messages

  • Oracle :Closed statement exception

    Hi,
    Iam trying to migrate a j2ee application to NetWeaver. Iam getting Oracele closed statement exception while executing a code which works fine with other servers like weblogic and jboss. My code is some thing like this
    stmt = con.prepareStatement
    result = stmt.executequery
    if(result.next())
    working_fine = result.getString("something");
    callInsertMethod(con);
    con.commit();
    <b>not_working_fine = result.getString("somethingelse")</b>
    I am getting this exception at the above bolded line. iam calling another method where some database insertions and al happen and connection commit also happens.Any help?

    Sujesh,
    if I understood correctly, you're calling bothe some instertions + commit in the method <b>callInsertMethod(con)</b> before the emphasised line is called. As far as my experience tells me, that's not ok, because a commit might clear/close other result sets on the same connection. For the code snippet you've posted I'd say just move the emphasized line before <b>callInsertMethod(con)</b>.
    Additionally I'd suggest to explicitly close the statement (the result set too if you're not relying on driver JDBC compliance) and if <b>callInsertMethod(con)</b> already commits, to delete the <b>con.commit()</b>.
    Btw., the JavaDoc should be your best friend, here a detail from java.sql.Connection.commit():
    Makes all changes made since the previous commit/rollback permanent and <b>releases any database locks</b> currently held by this Connection object.

  • Connection pooling in multithreaded app results in occasional "Closed Statement" exc"

    Hi there,
    I'm writing a CORBA servant, which amongst all calls in a stored procedure. I'm using connection pooling (just by example) from multiple threads and use grabbed connection to prepare an SP statement, execute it, and close both statement and connection (to return it to the pool). My stress tests run fine for the most part but once in a while throws out "Closed Statement" exception when trying to excecute the prepared statement.
    The reference platform is Solaris7, thin driver 8.1.6 for Java2, jdk 1.2.2, Oracle 8.1.5 (backend), ORBacus 3.3 (external application orb).
    Do you guys have any "multithreaded" statements as far as pooling concerned? Let me know if you need code, schema, anything at all. Any recommendations are greatly appreciated too, like "don't use prepared statements, don't use pooling from multiple threads, download upgrade, etc". Thanks ahead.
    Yours,
    -Evgeni

    Dear Oracle JDBC Development Team,
    First of all, I object to your comment "Please don't spread wrong information.". I do not spread wrong information. That is why I wrote in my previous email, "it isn't thread safe (as far as my tests have shown)". My statement is thus conditional on MY testing. I recognise the fact that I could be wrong. Hence, the conditional clause.
    As for the claim that OracleConnectionCacheImpl is thread safe - well, since it is your software then all I can do is believe you. However, I repeatedly get a java.util.EmptyStackException from calls to oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection() when running my test WITHOUT using the "synchronized" clause on the OracleConnectionCacheImpl object.
    This, of course, could be due to the fact that my test is faulty. I don't know. I can't see the fault in any case. If you can help me with this then I would be more than grateful.
    In any case, when I use the "synchronized" statement on OracleConnectionCacheImpl then this error disappears in a multithreaded environment.
    Another interesting thing my test showed was that the JDBC driver seems to hang under heavy workload. Again, I could be WRONG. It could be my test that causes the problem, however, it is very hard to pinpoint the problem.
    I would really appreciate help with this, if you have time, as we are using OracleConnectionCacheImpl in a major Internet billing system. If you wish to help then please send me an email to [email protected] (or [email protected]) and I will then send you my source code for the test.
    In any case, I will word my messages with even more care in future!
    regards,
    Alexander Day
    null

  • Interleaved executeQuery's intermittant SQLException: Closed Statement

    When i run the following code using JDK1.3.1 and Oracle 817 i see the line "cats_rs = cats_stmt.executeQuery();" throw a "SQLException: Closed Statement." about 1 out of 10 times.
    All variables, except the connection, are local. the statement example below are just 2 among dozens of others - all using the same connection.
    Any ideas why i'd get an intermittant exception like this?
    It is totally stumping me. thanks in advance.
    memory_stmt = connection.prepareStatement(memory_sql,
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    cats_stmt = connection.prepareStatement(cats_sql,
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    index = 1;
    memory_stmt.setString(index++, host);
    memory_stmt.setString(index++, jvm);
    memory_stmt.setLong(index++, starttime);
    memory_stmt.setLong(index++, endtime);
    memory_rs = memory_stmt.executeQuery();
    index = 1;
    cats_stmt.setString(index++, host);
    cats_stmt.setString(index++, jvm);
    cats_stmt.setLong(index++, starttime);
    cats_stmt.setLong(index++, endtime);
    cats_rs = cats_stmt.executeQuery();
    E.g.
    java.sql.SQLException: Closed Statement
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
         at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:5681)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:409)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:366)
    Thx, Tim

    I had a hunch that this was a limitation or bug in the driver or pool. I also read in forums that the connection "manages" each Statement it prepares or creates; like it adds it to a List and such ; it also cleans the slate each time the connection is closed.
    This code example above is just a small snippit that summarizes over a long time range of data (like days) - that is potentially 1000s of statements and queries and result sets.
    It is probably not very common that with jdbc someone prepares and executes 1000s of queries on the same connection over a course of 2 - 10 minutes (that's how long the entire operationcould take). I guessed the connection was worn out and tired .
    I changed the code to get a connection and then close the connection periodically - instead of getting one connection and using it for the whole period. After that all these hard to explain Closed Statement exceptions disappeared.
    i think the interleaving queries is OK. I guess the connection was blowing out.

  • Interleaved executeQuery() generates SQLException: Closed Statement

    When i run the following code i see the cats_stmt.executeQuery() line throw a "SQLException: Closed Statement.".
    Since I just created the cats_stmt statement - why could it be closed?
    The memory_stmt.executeQuery runs without exception.
    memory_stmt = connection.prepareStatement(memory_sql,
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    cats_stmt = connection.prepareStatement(cats_sql,
    ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    index = 1;
    memory_stmt.setString(index++, host);
    memory_stmt.setString(index++, jvm);
    memory_stmt.setLong(index++, starttime);
    memory_stmt.setLong(index++, endtime);
    memory_rs = memory_stmt.executeQuery();
    index = 1;
    cats_stmt.setString(index++, host);
    cats_stmt.setString(index++, jvm);
    cats_stmt.setLong(index++, starttime);
    cats_stmt.setLong(index++, endtime);
    cats_rs = cats_stmt.executeQuery(); <<- throws exception.
    On JDK1.3.1 and Oracle 817
    E.g.
    java.sql.SQLException: Closed Statement
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
    at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:5681)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:409)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:366)

    I had a hunch that this was a limitation or bug in the driver or pool. I also read in forums that the connection "manages" each Statement it prepares or creates; like it adds it to a List and such ; it also cleans the slate each time the connection is closed.
    This code example above is just a small snippit that summarizes over a long time range of data (like days) - that is potentially 1000s of statements and queries and result sets.
    It is probably not very common that with jdbc someone prepares and executes 1000s of queries on the same connection over a course of 2 - 10 minutes (that's how long the entire operationcould take). I guessed the connection was worn out and tired .
    I changed the code to get a connection and then close the connection periodically - instead of getting one connection and using it for the whole period. After that all these hard to explain Closed Statement exceptions disappeared.
    i think the interleaving queries is OK. I guess the connection was blowing out.

  • Illegal State Exception ; Resource resolver already closed

    Hi
         In my component I have a page resource. When I am trying to get the image resource of the same as below it is throwing me an Illegal State exception
    Resource resource = page.getContentResource("image");
    My error stack trace is as follows
                     Eventhough i am not closing any resource ; it is giving me illegal state exception for the resource. Please help me in finding a solution for this.
    Thanks
    Veena

    Are you calling the right path?
    The call to page.getContentResource("image") will end up calling the following:
    resource.getResourceResolver().getResource(resource, “jcr:content/image”);

  • Invalid Cursor state Exception  -  Help required

    Hi,
    I'm having a web page(JSP), which is making use of 3 ResultSet objects. Using the first two, i'll populate two different Drop down list, with values from database(Access) while loading the page for first time.
    Now if the user select any value from any (or both) of drop down list and clicks submit, i need to display all values in database, meeting the criteria from first & second drop down list. For this selection, i'm using the third ResultSet variable. While executing the query, i'm sure that 3rd ResultSet is returning some value. But when i try to retrieve the value to a string variable, i'm getting the Invalid cursor state exception.
    Throughout the page, i haven't closed any of the ResultSet. When i closed the first and second ResultSets in the third function(where 3rd ResultSet is used), i'm not getting any value. Its returning like ResultSet closed.
    Please help me to get this solved. It's very urgent because without this, i cannot proceed further. Please share your ideas.
    Thanks in advace for your valuable help

    If you open a new resultset within the same statement, all previously opened will be closed.
    Read the API docs, luke.

  • Closed Statement,

    Hi,
    I am using JDBC8.1.6 thin driver
    with Apache Jserv on Sun Solaris 7 box.
    I am using PooledConnection to get the connection from the database.
    On some of the queries I am getting "Closed Statement" when I am trying to execute them,
    although I am getting the connection right before I execute the query.
    There is no explicit call to "close()"
    between the "prepareStatement()" and
    "executeQuery()", nevertheless, I am
    getting "Closed Statement" error in about 50%
    of all the cases.
    Please help me!
    Please, CC to [email protected]
    Thank you!
    Michael Larionov.
    The stack trace follows:
    java.sql.SQLException: Closed Statement
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
    at oracle.jdbc.driver.OracleStatement.ensureOpen(Compiled Code)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(Compiled
    e)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(Compiled C
    at com.sonata.mysonata.edit.consumer.c_home.EnableServiceModule.popul
    (Compiled Code)
    at com.sonata.delivery.module.AbstractModule.initialize(AbstractModul
    ava:233)
    at com.sonata.delivery.jsp.SonataJSP.handleCurrentPageInitialization(
    ataJSP.java:505)
    at com.sonata.delivery.jsp.SonataJSP.service(SonataJSP.java:283)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.gjt.jsp.JspServlet$Page.process(Compiled Code)
    at org.gjt.jsp.JspServlet.service(JspServlet.java:284)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.ja
    339)
    at org.apache.jserv.JServConnection.run(JServConnection.java:202)
    at java.lang.Thread.run(Thread.java:479)
    null

    This could happen if you got another
    logical connection after you got the
    first one. The spec. says that yoou can't
    have more than one logical connection and
    the most recent one is the active. So
    we remove the connection link to the ones
    created earlier.
    Please read the JDBC 2.0 optional spec.
    for further details.

  • Weblogic JTA timeout and PreparedStatement cache problem (Closed Statement)

    Hello,
    I am facing up a problem using a Weblogic connection pool with a PreparedStatement.
    Here is the environement :
    - Weblogic application server 10.3
    - JDBC connection pool with Oracle Thin driver (from server library) - all parameters by default i.e. StatementCache size = 10
    - JTA transaction timeout = 30s
    The problem is : if a prepared statement ends because of a JTA timeout, I receive the following stack exception/ stack trace
    java.sql.SQLException: The transaction is no longer active - status: 'Rolling Back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 33 seconds
    BEA1-000D8AE7230EFAA3EDC9]'. No further JDBC access is allowed within this transaction.
    at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:178)
    at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:188)
    at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:92)
    at weblogic.jdbc.wrapper.Connection.clearCachedStatement(Connection.java:814)
    at weblogic.jdbc.wrapper.PreparedStatement.clearCachedStatement(PreparedStatement.java:1357)
    and then, if we try to re-execute immediately the same operation (*same statement* but new request, new thread, new JTA transaction ...) we receive without delay the following exception :
    java.sql.SQLException: Closed Statement
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    It seems like a bug in the caching mechanism of Weblogic, the 1st stack trace shows method from the statement cache implementation, I presume weblogic is trying the clear the statement from the cache after the iniitial TimedOutException (SQLException), but as the JDBC connection is unusable at this point, the clearing fails and the statement remains in the cache but is physically closed by JDBC.
    1st question, why weblogic does need to call JTSConnection.checkConnection() for clearing a statement from its internal cache, it is a pure java memory operation isnt'it ?
    2nd question : How to solve the problem without setting the StatementCache size to 0 (I tried, it solves the problem)? I don't want to disable completely the Weblogic statement caching, I have a small PreparedStatement called very frequently.
    Thanks for any help

    The main issue is that the transactional context that is supposed to underlay the JDBC code being executed,
    has gone away. Indeed, any DBMS changes that may have been made by your code so far, have been rolled
    back and are gone. Your code should not be trying to continue JDBC as normal, and WebLogic is trying to stop
    you. The control flow should go back up to the location where the transaction was initiated, so as to restart from
    the beginning if that is what is desired, including getting a new JDBC connection and remaking all the statements
    etc.
    HTH,
    Joe
    Edited by: Joe Weinstein on Dec 3, 2010 9:12 AM

  • Exception illegal Monitor state exception

    I am trying to use wait and notify method to make a thread
    wait for some time and again start ...but for both methods it
    is throwing illegal state exception..
    java.lang.IllegalMonitorStateException
    at java.lang.Object.wait(Native Method)
    can anybody pls help me why it is doing so and how can i
    overcome this problem

    Read the API docs for those methods closely, and if it's still not clear, study this, as you're obviously lacking an understanding of the fundamentals of multithreading.
    [http://java.sun.com/docs/books/tutorial/essential/concurrency/]

  • Jboss getting SQLException: Closed Statement prepared-statement- cache-size

    My first post in this forum , hope to get a quick resolution :)
    I am using Jboss 4.0.0 on Oracle 9.2.0.4.0
    In order to improve the app performance , I had specified prepared-statement-cache-size as 50 as follows ,
    <datasources>
    <local-tx-datasource>
    <jndi-name>jdbc/sct</jndi-name> <connection-url>jdbc:oracle:thin:@confidential:1560:sct1</connection-url>
    <user-name>Confidential</user-name>
    <password>Confidential</password>
    <min-pool-size>10</min-pool-size>
    <max-pool-size>120</max-pool-size>     <prepared-statement-cache-size>50</prepared-statement-cache-size>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptio nSorter</exception-sorter-class-name>
    <idle-timeout-minutes>5</idle-timeout-minutes>
    <track-statements>true</track-statements>
    <new-connection-sql>select sysdate from dual</new-connection-sql>
    <check-valid-connection-sql>select sysdate from dual</check-valid-connection-sql>
    </local-tx-datasource>
    </datasources>
    After doing this , I start getting the following exception ,
    java.sql.SQLException: Closed Statement
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
         at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:5681)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.j ava:409)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.ja va:366)
         at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPrepare dStatement.java:57)
         at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPrepa redStatement.java:296)
         at com.ge.sct.SiteText.getSiteTextFromDB(SiteText.java:292)
    Thanks in Advance
    Bhavin

    Hello,
    I am also facing the same error: somewhere just now I read,
    We were getting this error on JBoss / Oracle. The fix was setting the following to 0 in oracle-ds.xml:
    <prepared-statement-cache-size>0</prepared-statement-cache-size>
    Ref: http://www.jpox.org/servlet/forum/viewthread?thread=1108
    May be you can try this, I am also still finding the solution, I will try the above and let u know, if i get success.
    Regards,
    Rajesh

  • Java.sql.SQLException: Closed Statement

    I'm having a problem with my Java code trying to access an Oracle 10g database through the JDBC driver using the Oracle XML Publisher.
    We generate a number of different reports, but one report consistently fails with the error: java.sql.SQLException: Closed Statement
    It only happens in the production environment, which has significantly more data than the test and development environments.
    One interesting (!) observation is that the error occurs after 10 minutes to the second (almost). Which leads me to think it is a timeout related problem, but am aware that this could be a red herring.
    And finally, the code is being run within a job sheduled using the Quartz Scheduler v1.6.5.
    Any help would be appreciated.
    Many Thanks
    Lawrence
    Here is the stack trace:
    java.sql.SQLException: Closed Statement: getMetaData
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.OracleResultSetImpl.getMetaData(OracleResultSetImpl.java:128)
    at com.mchange.v2.c3p0.impl.NewProxyResultSet.getMetaData(NewProxyResultSet.java:47)
    at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeData(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeData(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.processData(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.processXML(Unknown Source)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(Unknown Source)
    at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(Unknown Source)
    at oracle.apps.xdo.dataengine.DataProcessor.processData(Unknown Source)
    at com.tmobile.sett.file.invoice.InvoiceFileFactory.generateXML(InvoiceFileFactory.java:157)
    at com.tmobile.sett.file.invoice.InvoiceFileFactory.generateStatements(InvoiceFileFactory.java:365)
    at com.tmobile.sett.file.invoice.InvoiceFileFactory.generateInvoices(InvoiceFileFactory.java:457)
    at com.tmobile.sett.file.invoice.StatementGeneratorJob.execute(StatementGeneratorJob.java:34)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Here is the code:
    private void generateXML(String xmlTemplate, String xmlFilename, Hashtable parameters) {
    DataProcessor dataProcessor = new DataProcessor();
    log.debug("generateXML: xmlTemplate {}, xmlFilename {}", xmlTemplate, xmlFilename);
    try {
    // Set Data Template to be executed
    dataProcessor.setDataTemplate(xmlTemplate);
    // Obtain a new Connection from the Pool
    Connection conn = HibernateUtil.getConnection();
    if (conn == null)
    log.debug("conn is null after getCall");
    if (conn.isClosed())
    log.debug("conn is closed after getCall");
    // Set the Connection for the dataProcessor
    dataProcessor.setConnection(conn);
    if (conn.isClosed())
    log.debug("conn is closed after setConnection");
    dataProcessor.setParameters(parameters);
    if (conn.isClosed())
    log.debug("conn is closed after setParameters");
    // Specify the output directory and file for the data file
    dataProcessor.setOutput(xmlFilename);
    if (conn.isClosed())
    log.debug("conn is closed after setOutput");
    // Process the data template
    dataProcessor.processData();
    if (conn.isClosed())
    log.debug("conn is closed after processData");
    // Return the connection to the pool
    conn.close();
    } catch (Exception e) {
    System.err.println("Error generating XML with the following parameters:");
    System.err.println("xmlTemplate=" + xmlTemplate);
    System.err.println("xmlFilename=" + xmlFilename);
    System.err.println("Here's the stack trace");
    e.printStackTrace();
    System.exit(1);
    }

    I have made some progress in understanding the problem...
    Basically, your comment about threads made me look at the code from a threads perspective. There are only three objects used, log4j, oracleXML Publisher and hibernate. Discounting log4j, the Oracle object is created, opened and closed within the procedure, so I concluded that hibernate was the most likely cause of the problem (i know, theres an element of educated guesswork in this).
    Anyway, I found the hibernate timeouts (all around 300 seconds) and increased them to 3000 seconds... and lo and behold the reports are generated successfully, although some of them take over 20 minutes each.
    So, this is a performance problem with the SQL itself:
    SELECT service
    , reply
    , ROUND(SUM(DECODE(op, 3, 0, count))* :uplift,0) x_events
    , ROUND(SUM(DECODE(op, 3, count, 0))* :uplift,0) y_events
    FROM aggregate
    WHERE ref_time >= :period_start
    AND ref_time < :period_end
    AND feed = 13
    AND agreement = :agreement
    AND line = 1
    GROUP BY service, reply
    ORDER BY 1,2
    The SQL in question is querying data for a specific month from a monthly partitioned table that contains about 11 million records a month. We currently have 99 partitions.
    Executing the sql in Toad / Sql developer / sqlplus takes around 20 seconds...so why 20 minutes?
    Looking in the session browser, I can see that the 20 minute query is looking through all 99 partitions where the 20 second query is only looking at 1 partition for the month in question.
    I'm not sure if this is heading off topic for the forum thread, but the question now is...
    Why is Oracle using a clearly innefficient execution plan when we are using a query with bound variables and how do we get it to use a more efficient execution plan?

  • Closed Connection exceptions every day with WL813 SP3 and 10g

    Every day we get closed connection exceptions (which I think in turn leads to Heuristic Hazard exceptions), the first time we run the tests after restarting Weblogic and database.
    I tried various WL parameters so far but not with much luck. The parameters I tried include setting "Test Reserved Connections", "Test Created Connections", "Test Released Connections", "Connection Creation Retry Frequency", disabling "Allow Shrinking" etc.
    I tried weblogic support but so far not much progress. Any help is greatly appreciated. Following are the log traces.
    Server.log Fragment:
    ####<Mar 23, 2005 12:06:30 AM UTC> <Error> <JDBC> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-001112> <Test "select count(*) from dual" set up for pool "TruthPool" failed with exception: "java.sql.SQLException: Closed Connection".>
    ####<Mar 23, 2005 12:06:30 AM UTC> <Info> <JDBC> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-001128> <Connection for pool "TruthPool" closed.>
    ####<Mar 23, 2005 12:06:31 AM UTC> <Info> <JDBC> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-001067> <Connection for pool "TruthPool" refreshed.>
    ####<Mar 23, 2005 12:06:31 AM UTC> <Error> <JTA> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <BEA1-1B44D3A1A2E1DF26344B> <BEA-110412> <Name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)],Xid=BEA1-1B44D3A1A2E1DF26344B(6341523),Status=Committed,HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds left=119,activeThread=Thread[ExecuteThread: '26' for queue: 'default',5,Thread Group for Queue: 'default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=committed,assigned=twist),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@c806dc,re-Registered = false),SCInfo[twist_domain+twist]=(state=committed),properties=({weblogic.transaction.name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)], weblogic.jdbc=t3://192.168.198.5:1026}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=twist+192.168.198.5:1026+twist_domain+t3+, XAResources={},NonXAResources={})],CoordinatorURL=twist+192.168.198.5:1026+twist_domain+t3+) completed heuristically: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: Closed Connection)) >
    ####<Mar 23, 2005 12:06:31 AM UTC> <Error> <EJB> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)],Xid=BEA1-1B44D3A1A2E1DF26344B(6341523),Status=Committed,HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds left=119,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=committed,assigned=twist),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@c806dc,re-Registered = false),SCInfo[twist_domain+twist]=(state=committed),properties=({weblogic.transaction.name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)], weblogic.jdbc=t3://192.168.198.5:1026}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=twist+192.168.198.5:1026+twist_domain+t3+, XAResources={},NonXAResources={})],CoordinatorURL=twist+192.168.198.5:1026+twist_domain+t3+): javax.transaction.HeuristicMixedException: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: Closed Connection))
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:294)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:244)
         at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:299)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:110)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    .>
    JDBC Log:
    JDBC log stream started at Tue Mar 22 22:44:30 UTC 2005
    DriverManager.initialize: jdbc.drivers = null
    JDBC DriverManager initialized
    registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@29a046]
    DriverManager.getDriver("jdbc:oracle:oci:@")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@29a046]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@29a046]
    registerDriver: driver[className=weblogic.jdbc.jts.Driver,weblogic.jdbc.jts.Driver@1c68b20]
    registerDriver: driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@f0b51d]
    SQLException: SQLState(23000) vendor code(1)
    java.sql.SQLException: ORA-00001: unique constraint (TRUTH.TMP$ACCT_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_describe(T2CPreparedStatement.java:851)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_rows(T2CPreparedStatement.java:1012)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8661)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterAcctIds(SQLHelper.java:45)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:178)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1)
    java.sql.BatchUpdateException: ORA-00001: unique constraint (TRUTH.TMP$ACCT_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterAcctIds(SQLHelper.java:45)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:178)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1)
    java.sql.SQLException: ORA-00001: unique constraint (TRUTH.TMP$DATA_CENTER_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_describe(T2CPreparedStatement.java:851)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_rows(T2CPreparedStatement.java:1012)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8661)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterDcIds(SQLHelper.java:36)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:196)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1)
    java.sql.BatchUpdateException: ORA-00001: unique constraint (TRUTH.TMP$DATA_CENTER_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterDcIds(SQLHelper.java:36)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:196)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(42000) vendor code(936)
    java.sql.SQLException: ORA-00936: missing expression
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CStatement.execute_for_describe(T2CStatement.java:841)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:894)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:984)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1124)
         at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:345)
         at com.opsware.impl.servergroup.ServerGroupSQL.refreshLocalCoreMemberships(ServerGroupSQL.java:897)
         at com.opsware.ejb.session.ServerGroupFacadeBean.refreshMembershipsInLocalCore(ServerGroupFacadeBean.java:497)
         at com.opsware._gen.sejb.ejb.session._ServerGroupFacadeBean._opsw__refreshMembershipsInLocalCore(_ServerGroupFacadeBean.java:10715)
         at com.opsware._gen.sejb.ejb.session.ServerGroupFacade_686jy5_EOImpl._opsw__refreshMembershipsInLocalCore(ServerGroupFacade_686jy5_EOImpl.java:8902)
         at com.opsware._gen.client.ejb.session._ServerGroupFacadeStub._opsw__refreshMembershipsInLocalCore(_ServerGroupFacadeStub.java:5096)
         at com.opsware._gen.client.ejb.session._ServerGroupFacadeStub.refreshMembershipsInLocalCore(_ServerGroupFacadeStub.java:5091)
         at com.opsware.impl.groupevent.Recalc.performFullRecalc(Recalc.java:204)
         at com.opsware.impl.groupevent.Recalc$1.run(Recalc.java:573)
         at java.lang.Thread.run(Thread.java:534)
    SQLException: SQLState(60000) vendor code(600)
    java.sql.SQLException: ORA-00600: internal error code, arguments: [kpofdr-long], [], [], [], [], [], [], []
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CPreparedStatement.doDefineExecuteFetch(T2CPreparedStatement.java:1135)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_rows(T2CPreparedStatement.java:1010)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:913)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2885)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2926)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:92)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.ejbFindByDvcRoleAndKey(DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.java:652)
         at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:294)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:1662)
         at weblogic.ejb20.manager.BaseEntityManager.localScalarFinder(BaseEntityManager.java:1611)
         at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:462)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g_LocalHomeImpl.findByDvcRoleAndKey(DeviceRoleConfig_bbuo9g_LocalHomeImpl.java:132)
         at com.opsware.impl.device.DeviceUtil.getAttributeNL(DeviceUtil.java:224)
         at com.opsware.impl.device.DeviceUtil.getLockUser(DeviceUtil.java:308)
         at com.opsware.vo.DeviceBaseVO.<init>(DeviceBaseVO.java:42)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:21)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:966)
         at weblogic.jdbc.wrapper.PreparedStatement.reCreateStatement(PreparedStatement.java:48)
         at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:237)
         at weblogic.jdbc.wrapper.Statement.close(Statement.java:300)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.releaseStatement(RDBMSPersistenceManager.java:3419)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.releaseResources(RDBMSPersistenceManager.java:3300)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.ejbFindByDvcRoleAndKey(DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.java:703)
         at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:294)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:1662)
         at weblogic.ejb20.manager.BaseEntityManager.localScalarFinder(BaseEntityManager.java:1611)
         at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:462)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g_LocalHomeImpl.findByDvcRoleAndKey(DeviceRoleConfig_bbuo9g_LocalHomeImpl.java:132)
         at com.opsware.impl.device.DeviceUtil.getAttributeNL(DeviceUtil.java:224)
         at com.opsware.impl.device.DeviceUtil.getLockUser(DeviceUtil.java:308)
         at com.opsware.vo.DeviceBaseVO.<init>(DeviceBaseVO.java:42)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:21)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:966)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:905)
         at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:350)
         at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:479)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.ejbFindByDvcRoleAndKey(DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.java:632)
         at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:294)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:1662)
         at weblogic.ejb20.manager.BaseEntityManager.localScalarFinder(BaseEntityManager.java:1611)
         at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:462)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g_LocalHomeImpl.findByDvcRoleAndKey(DeviceRoleConfig_bbuo9g_LocalHomeImpl.java:132)
         at com.opsware.impl.device.DeviceUtil.getAttributeNL(DeviceUtil.java:224)
         at com.opsware.impl.device.DeviceUtil.getLockComment(DeviceUtil.java:316)
         at com.opsware.vo.DeviceBaseVO.<init>(DeviceBaseVO.java:43)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:21)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:966)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:905)
         at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:350)
         at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:479)
         at com.opsware.ejb.RoleClassWads_opugk0__WebLogic_CMP_RDBMS.ejbFindByRoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads__WL_(RoleClassWads_opugk0__WebLogic_CMP_RDBMS.java:1510)
         at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersistenceManager.java:378)
         at weblogic.ejb20.manager.BaseEntityManager.wrapperSetFinder(BaseEntityManager.java:1888)
         at weblogic.ejb20.manager.BaseEntityManager.localWrapperSetFinder(BaseEntityManager.java:1859)
         at com.opsware.ejb.RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.populateCache(RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.java:111)
         at com.opsware.ejb.RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.iterator(RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.java:177)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:35)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:964)
         at weblogic.jdbc.wrapper.JTSConnection.internalCommit(JTSConnection.java:404)
         at weblogic.jdbc.wrapper.JTSXAResourceImpl.commit(JTSXAResourceImpl.java:56)
         at weblogic.transaction.internal.XAServerResourceInfo.commit(XAServerResourceInfo.java:1251)
         at weblogic.transaction.internal.XAServerResourceInfo.commit(XAServerResourceInfo.java:482)
         at weblogic.transaction.internal.ServerSCInfo.startCommit(ServerSCInfo.java:421)
         at weblogic.transaction.internal.ServerTransactionImpl.localCommit(ServerTransactionImpl.java:1803)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2434)
         at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2365)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:278)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:244)
         at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:299)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:110)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection

    Durga Gokina wrote:
    Every day we get closed connection exceptions (which I think in turn leads to Heuristic Hazard exceptions), the first time we run the tests after restarting Weblogic and database.
    I tried various WL parameters so far but not with much luck. The parameters I tried include setting "Test Reserved Connections", "Test Created Connections", "Test Released Connections", "Connection Creation Retry Frequency", disabling "Allow Shrinking" etc.
    I tried weblogic support but so far not much progress. Any help is greatly appreciated. Following are the log traces.
    Server.log Fragment:Hi. The jdbc log shows that some native code error is killing your type-2 JDBC connection,
    and depending on what C bug it is, it could corrupt any other native connection or code.
    I highly recommend you switch to a type-4 driver.
    Joe
    ####<Mar 23, 2005 12:06:30 AM UTC> <Error> <JDBC> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-001112> <Test "select count(*) from dual" set up for pool "TruthPool" failed with exception: "java.sql.SQLException: Closed Connection".>
    ####<Mar 23, 2005 12:06:30 AM UTC> <Info> <JDBC> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-001128> <Connection for pool "TruthPool" closed.>
    ####<Mar 23, 2005 12:06:31 AM UTC> <Info> <JDBC> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-001067> <Connection for pool "TruthPool" refreshed.>
    ####<Mar 23, 2005 12:06:31 AM UTC> <Error> <JTA> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <BEA1-1B44D3A1A2E1DF26344B> <BEA-110412> <Name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)],Xid=BEA1-1B44D3A1A2E1DF26344B(6341523),Status=Committed,HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds left=119,activeThread=Thread[ExecuteThread: '26' for queue: 'default',5,Thread Group for Queue: 'default'],XAS
    erverResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=committed,assigned=twist),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@c806dc,re-Registered = false),SCInfo[twist_domain+twist]=(state=committed),properties=({weblogic.transaction.name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)], weblogic.jdbc=t3://192.168.198.5:1026}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=twist+192.168.198.5:102
    6+twist_domain+t3+, XAResources={},NonXAResources={})],CoordinatorURL=twist+192.168.198.5:1026+twist_domain+t3+) completed heuristically: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: Closed Connection)) >
    ####<Mar 23, 2005 12:06:31 AM UTC> <Error> <EJB> <m184.dev.opsware.com> <twist> <ExecuteThread: '26' for queue: 'default'> <<anonymous>> <> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)],Xid=BEA1-1B44D3A1A2E1DF26344B(6341523),Status=Committed,HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds left=119,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceI
    nfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=committed,assigned=twist),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@c806dc,re-Registered = false),SCInfo[twist_domain+twist]=(state=committed),properties=({weblogic.transaction.name=[EJB com.opsware.list.PaginatedListBean.getList(int,int)], weblogic.jdbc=t3://192.168.198.5:1026}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=twist+192.168.198.5:1026+twist_domain+t3+, XAResources={},NonXAResources={})],CoordinatorURL=twist
    +192.168.198.5:1026+twist_domain+t3+): javax.transaction.HeuristicMixedException: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: Closed Connection))
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:294)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:244)
         at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:299)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:110)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    .>
    JDBC Log:
    JDBC log stream started at Tue Mar 22 22:44:30 UTC 2005
    DriverManager.initialize: jdbc.drivers = null
    JDBC DriverManager initialized
    registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@29a046]
    DriverManager.getDriver("jdbc:oracle:oci:@")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@29a046]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@29a046]
    registerDriver: driver[className=weblogic.jdbc.jts.Driver,weblogic.jdbc.jts.Driver@1c68b20]
    registerDriver: driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@f0b51d]
    SQLException: SQLState(23000) vendor code(1)
    java.sql.SQLException: ORA-00001: unique constraint (TRUTH.TMP$ACCT_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_describe(T2CPreparedStatement.java:851)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_rows(T2CPreparedStatement.java:1012)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8661)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterAcctIds(SQLHelper.java:45)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:178)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1)
    java.sql.BatchUpdateException: ORA-00001: unique constraint (TRUTH.TMP$ACCT_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterAcctIds(SQLHelper.java:45)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:178)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1)
    java.sql.SQLException: ORA-00001: unique constraint (TRUTH.TMP$DATA_CENTER_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_describe(T2CPreparedStatement.java:851)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_rows(T2CPreparedStatement.java:1012)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8661)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterDcIds(SQLHelper.java:36)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:196)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1)
    java.sql.BatchUpdateException: ORA-00001: unique constraint (TRUTH.TMP$DATA_CENTER_ID_PK) violated
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8726)
         at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:137)
         at com.opsware.utils.SQLHelper.setFilterIds(SQLHelper.java:90)
         at com.opsware.utils.SQLHelper.setFilterDcIds(SQLHelper.java:36)
         at com.opsware.list.impl.device.DeviceBaseList.getQuery(DeviceBaseList.java:196)
         at com.opsware.list.impl.device.DeviceBaseList.getIds(DeviceBaseList.java:50)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getDeviceIds(DeviceServerGroupViewList.java:145)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getIds(DeviceServerGroupViewList.java:47)
         at com.opsware.list.PaginatedListBean.init(PaginatedListBean.java:77)
         at com.opsware.list.PaginatedListBean.getSize(PaginatedListBean.java:216)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getSize(PaginatedList_mywl9s_EOImpl.java:154)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(42000) vendor code(936)
    java.sql.SQLException: ORA-00936: missing expression
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CStatement.execute_for_describe(T2CStatement.java:841)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:894)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:984)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1124)
         at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:345)
         at com.opsware.impl.servergroup.ServerGroupSQL.refreshLocalCoreMemberships(ServerGroupSQL.java:897)
         at com.opsware.ejb.session.ServerGroupFacadeBean.refreshMembershipsInLocalCore(ServerGroupFacadeBean.java:497)
         at com.opsware._gen.sejb.ejb.session._ServerGroupFacadeBean._opsw__refreshMembershipsInLocalCore(_ServerGroupFacadeBean.java:10715)
         at com.opsware._gen.sejb.ejb.session.ServerGroupFacade_686jy5_EOImpl._opsw__refreshMembershipsInLocalCore(ServerGroupFacade_686jy5_EOImpl.java:8902)
         at com.opsware._gen.client.ejb.session._ServerGroupFacadeStub._opsw__refreshMembershipsInLocalCore(_ServerGroupFacadeStub.java:5096)
         at com.opsware._gen.client.ejb.session._ServerGroupFacadeStub.refreshMembershipsInLocalCore(_ServerGroupFacadeStub.java:5091)
         at com.opsware.impl.groupevent.Recalc.performFullRecalc(Recalc.java:204)
         at com.opsware.impl.groupevent.Recalc$1.run(Recalc.java:573)
         at java.lang.Thread.run(Thread.java:534)
    SQLException: SQLState(60000) vendor code(600)
    java.sql.SQLException: ORA-00600: internal error code, arguments: [kpofdr-long], [], [], [], [], [], [], []
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:630)
         at oracle.jdbc.driver.T2CPreparedStatement.doDefineExecuteFetch(T2CPreparedStatement.java:1135)
         at oracle.jdbc.driver.T2CPreparedStatement.execute_for_rows(T2CPreparedStatement.java:1010)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:913)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2885)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2926)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:92)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.ejbFindByDvcRoleAndKey(DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.java:652)
         at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:294)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:1662)
         at weblogic.ejb20.manager.BaseEntityManager.localScalarFinder(BaseEntityManager.java:1611)
         at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:462)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g_LocalHomeImpl.findByDvcRoleAndKey(DeviceRoleConfig_bbuo9g_LocalHomeImpl.java:132)
         at com.opsware.impl.device.DeviceUtil.getAttributeNL(DeviceUtil.java:224)
         at com.opsware.impl.device.DeviceUtil.getLockUser(DeviceUtil.java:308)
         at com.opsware.vo.DeviceBaseVO.<init>(DeviceBaseVO.java:42)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:21)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:966)
         at weblogic.jdbc.wrapper.PreparedStatement.reCreateStatement(PreparedStatement.java:48)
         at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:237)
         at weblogic.jdbc.wrapper.Statement.close(Statement.java:300)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.releaseStatement(RDBMSPersistenceManager.java:3419)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.releaseResources(RDBMSPersistenceManager.java:3300)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.ejbFindByDvcRoleAndKey(DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.java:703)
         at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:294)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:1662)
         at weblogic.ejb20.manager.BaseEntityManager.localScalarFinder(BaseEntityManager.java:1611)
         at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:462)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g_LocalHomeImpl.findByDvcRoleAndKey(DeviceRoleConfig_bbuo9g_LocalHomeImpl.java:132)
         at com.opsware.impl.device.DeviceUtil.getAttributeNL(DeviceUtil.java:224)
         at com.opsware.impl.device.DeviceUtil.getLockUser(DeviceUtil.java:308)
         at com.opsware.vo.DeviceBaseVO.<init>(DeviceBaseVO.java:42)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:21)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:966)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:905)
         at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:350)
         at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:479)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.ejbFindByDvcRoleAndKey(DeviceRoleConfig_bbuo9g__WebLogic_CMP_RDBMS.java:632)
         at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:294)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:1662)
         at weblogic.ejb20.manager.BaseEntityManager.localScalarFinder(BaseEntityManager.java:1611)
         at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:462)
         at com.opsware.ejb.DeviceRoleConfig_bbuo9g_LocalHomeImpl.findByDvcRoleAndKey(DeviceRoleConfig_bbuo9g_LocalHomeImpl.java:132)
         at com.opsware.impl.device.DeviceUtil.getAttributeNL(DeviceUtil.java:224)
         at com.opsware.impl.device.DeviceUtil.getLockComment(DeviceUtil.java:316)
         at com.opsware.vo.DeviceBaseVO.<init>(DeviceBaseVO.java:43)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:21)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:698)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:615)
         at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1133)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:966)
         at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:905)
         at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:350)
         at weblogic.jdbc.wrapper.JTSConnection.prepareStatement(JTSConnection.java:479)
         at com.opsware.ejb.RoleClassWads_opugk0__WebLogic_CMP_RDBMS.ejbFindByRoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads__WL_(RoleClassWads_opugk0__WebLogic_CMP_RDBMS.java:1510)
         at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersistenceManager.java:378)
         at weblogic.ejb20.manager.BaseEntityManager.wrapperSetFinder(BaseEntityManager.java:1888)
         at weblogic.ejb20.manager.BaseEntityManager.localWrapperSetFinder(BaseEntityManager.java:1859)
         at com.opsware.ejb.RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.populateCache(RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.java:111)
         at com.opsware.ejb.RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.iterator(RoleClasses_nx2si8__WebLogic_CMP_RDBMS_roleClassWads_Set.java:177)
         at com.opsware.vo.DeviceSWVO.<init>(DeviceSWVO.java:35)
         at com.opsware.list.impl.device.DeviceServerGroupViewList.getList(DeviceServerGroupViewList.java:173)
         at com.opsware.list.PaginatedListBean.getSubList(PaginatedListBean.java:173)
         at com.opsware.list.PaginatedListBean.getList(PaginatedListBean.java:124)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl.getList(PaginatedList_mywl9s_EOImpl.java:100)
         at com.opsware.list.PaginatedList_mywl9s_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:90)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(null) vendor code(17008)
    java.sql.SQLException: Closed Connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
         at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:964)
         at weblogic.jdbc.wrapper.JTSConnection.internalCommit(JTSConnection.java:404)
         at weblogic.jdbc.wrapper.JTSXAResourceImpl.commit(JTSXAResourceImpl.java:56)
         at weblogic.transaction.internal.XAServerResourceInfo.commit(XAServerResourceInfo.java:1251)
         at weblogic.transaction.internal.XAServerResourceInfo.commit(XAServerResourceInfo.java:482)
         at weblogic.transaction.internal.ServerSCInfo.startCommit(ServerSCInfo.java:421)
         at weblogic.transaction.internal.ServerTransactionImpl.localCommit(ServerTransactionImpl.java:1803)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2434)
         at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2365)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:278)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:244)
         at weblogic.ejb20.internal.Bas

  • Illegal state exception in filters can any help me plzzzzzzz

    i want to check the clients status i mean whether the request is coming from new client or already using client , if clients request is new one then the filter has to redirect to some other login page and also if the request is asked to access the authenticated resource then also he want to force to redirect to login page.If the user is logged in and his session is not expired and if session is valid then he can access the requested url as per his role....can any one suggest the code plzzzzzzzzz
    here is my code but iam getting the illegal state exception as shown below...
    package uk.co.lex.interactive.authentication.action;
    import java.io.IOException;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class AuthenticationFilter implements Filter {
    private FilterConfig filterConfig=null;
    HttpSession session=null;
         public void init(FilterConfig filterConfig) throws ServletException {
              //TODO Auto-generated method stub
              this.filterConfig=filterConfig;
              System.out.println("---Authentication filter initialized---");
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
              // TODO Auto-generated method stub
              HttpServletRequest req=(HttpServletRequest)request;
              HttpServletResponse res=(HttpServletResponse)response;
                   String reqSessId=req.getRequestedSessionId();
              if(reqSessId!=null)
                   {System.out.println("-------session is valid and the same client is using the resource111---");
                         if(req.isRequestedSessionIdValid())
                            System.out.println("-------session is valid and the same client is using the resource222---");
                            System.out.println("---requested sessid"+reqSessId);
                           if(req.isRequestedSessionIdFromCookie()||req.isRequestedSessionIdFromURL())
                                System.out.println("-------session is valid and the same client is using the resource333---");
              }else
              res.sendRedirect(req.getContextPath()+"/"+"checkUser.do");
                        System.out.println("------it is new session so it redirected to loginpage from authentication filter-------");
              else
                   res.sendRedirect(req.getContextPath()+"/"+"checkUser.do");
                   System.out.println("------it is new session so it redirected to loginpage from authentication filter-------");
              chain.doFilter(request,response);
         public void destroy() {
              // TODO Auto-generated method stub
              this.filterConfig=null;
              System.out.println("-----authentication filter destroyed---");
    11:03:18,693 ERROR [[action]] Servlet.service() for servlet action threw exception
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
         at org.apache.catalina.connector.Request.doGetSession(Request.java:2195)
         at org.apache.catalina.connector.Request.getSession(Request.java:2017)
         at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:822)
         at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
         at org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:621)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:177)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at uk.co.lex.interactive.authentication.action.AuthenticationFilter.doFilter(AuthenticationFilter.java:63)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:595)

    I don't know that this is the root cause of your problem, but it certainly could be. When comparing two strings, you need to use the .equals() method, not ==.
    (except in the null case, where checking for null with == is perfectly okay).
    if (ViewProtectedPage.getValue("trycount").equals("1")
    ..etc
    Some other notes... use if/else if/else rather than a whole bunch of ifs, since all your statements are mutually exclusive. Maybe even put those lower ifs inside your outer "else" since you're obviously not going to reach them after a sendRedirect(). On that same note, place a return; after the sendRedirect() to state that the rest of the page need not be loaded/executed.

  • Illegal State Exception in JSP login

    I had a working log in/check password systems for a low security application. User types in username and password and this is sent to the checkpassword.jsp. Using Server variables I counted the number of attempts and if it was more than three, they were not allowed to try again that session. When I moved this page to newer version of Tomcat running in Apache rather than over IIS, my simple counting function no longer works and I can't for the life of me understand why I'm getting an Illegal State Exception with the following code:
    java.sql.ResultSet RS=statement.executeQuery("Select WUUSER, WUPWD FROM WEBUSER WHERE WUUSER='"+ (request.getParameter("username").toUpperCase()) + "' AND WUPWD= '" + (request.getParameter("password")) +"'");
    HttpSession ViewProtectedPage = request.getSession(true);
    HttpSession UserSession = request.getSession(true);
    if (RS.next())
    ViewProtectedPage.putValue("password","correct");
    //HttpSession UserSession = request.getSession(true);
    //allows username to be entered in upper or lower case
    UserSession.putValue("username",(request.getParameter("username")).toUpperCase());
    response.sendRedirect("tracking.jsp");
    else
    ViewProtectedPage.putValue("password","false");
    if (ViewProtectedPage.getValue("trycount")==null) {
    ViewProtectedPage.putValue("trycount","1");
    response.sendRedirect("loadtrackbadlogin.html");
    if (ViewProtectedPage.getValue("trycount")=="1") {
    ViewProtectedPage.putValue("trycount","2");
    response.sendRedirect("loadtrackbadlogin.html");
    if (ViewProtectedPage.getValue("trycount")=="2") {
    ViewProtectedPage.putValue("trycount","3");
    response.sendRedirect("loadtrackbadlogin.html");
    if (ViewProtectedPage.getValue("trycount")=="3") {
    response.sendRedirect("noentry.html");
    RS.close();
    It works fine if the user uses the proper username and password but crashes on me if they use the wrong info. I think it has something to do with my initialization of the user variables.

    I don't know that this is the root cause of your problem, but it certainly could be. When comparing two strings, you need to use the .equals() method, not ==.
    (except in the null case, where checking for null with == is perfectly okay).
    if (ViewProtectedPage.getValue("trycount").equals("1")
    ..etc
    Some other notes... use if/else if/else rather than a whole bunch of ifs, since all your statements are mutually exclusive. Maybe even put those lower ifs inside your outer "else" since you're obviously not going to reach them after a sendRedirect(). On that same note, place a return; after the sendRedirect() to state that the rest of the page need not be loaded/executed.

Maybe you are looking for

  • Problem increasing heap size using Java Control Panel

    I am running a web-based bioinformatics package which uses a Java applet as the client application. It mostly works fine, but some large clustering processes don't complete, they just cycle endlessly. The user manual advises increasing heap space "by

  • How to extend the selection from cell to row when click one sepecial cell

    The JTable contains a special column to display the line number for each row. When user click on the first column(contains row number), the selection would extend to the whole row(React something like Excel). How can i achieve that? And how to achiev

  • Bc4j.xcfg deployment problem

    Hi! Could anyone please let me know what exactly is giving me the following errors. I have one Application Module in my applicaiton. I want to deploy that business component through EJB. After running through the wizard and deploying the application.

  • Error load Database toolkit

    The program can open properly on other machine. I installed both 8.6 and 2009 on this machine, and the database toolkit is installed under the folder of 2009. When I open the vi, it give error as attached. Any suggestion? Attachments: ss.jpg ‏53 KB

  • How to disable airplane power mode completely on T440p Windows 7 64?

    Hi! I have updated Windows 7 64 and latest Lenovo Power Manager 6.66.3 My computer continuously switches to airplane power mode while being conneted to AC power source. *Despite* being disabled in the power manager ir still does it and being connecte