8 Replies Latest reply on Mar 10, 2003 8:25 PM by ansonyumo

    2.4.5 Database Errors

    cwstanton

      I'm using Oracle 9.0.1 on Solaris 8 with the Oracle 9.0.1 classes12.jar JDBC Type 2 (oci8) driver.

      Just switched from 2.4.5RC3 to 2.4.5, and suddenly 80% of my PreparedStatement.executeQuery() invocations are throwing a SQLException - Closed Statement. (See exception below.) Any ideas why this suddenly started with the final 2.4.5 release?

      Charles Stanton
      Network Surveillance Systems
      WorldCom, Inc.

      -----

      SQL State: null
      Error Code: 17009
      Error Message: Closed Statement
      java.sql.SQLException: Closed Statement
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:184)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:226)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:289)
      at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:5916)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:422)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:375)
      at org.jboss.pool.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:71)
      at com.wcomnet.impact.espresso.gam.ejb.UserDAOBean.getUserAppGroups(UserDAOBean.java:187)

        • 1. 2.4.5 Database Errors, cont.
          cwstanton

          The same exception occurs with the Thin (Type 2) driver.

          Also, I notice another person in another thread is encountering problems at the PreparedStatement.executeQuery() invocation:
          http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ would JBoss code be doing that is closing PreparedStatements between the .setXXX(int,xxx) invocations and the .executeQuery() invocation?

          Charles

          • 2. Re: 2.4.5 Database Errors, cont.
            cwstanton

            That should read Thin (Type 4)...

            • 4. Re: 2.4.5 Database Errors
              nukleopatra

              I'd like to voice similar issues with 2.4.5 (final) that I don't have problems with under 2.4.4. I'm using an Interbase DB. When 2.4.5 starts up, it loads the driver appropriately, then starts the pool up fine, but it seems that the first access to it throws an InvalidOperationException from interclient. That basically means that it was trying to execute on a closed statement - strange!

              Same configuration under 2.4.4 works like a charm:

              [From 2.4.5 jboss.jcml]

              ipac_admin
              org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
              jdbc:interbase://localhost:3060/d:/projects/webmt/ipac/db/ipacadmin.gdb
              sysdba
              masterkey
              100
              5



              So, anyone else have any success??

              • 5. Re: 2.4.5 Database Errors
                jim_barber

                I am also having the same problem.
                I am using an Oracle connection to authenticate my users in my *.war applications that use FORM based authentication.

                If I start up the server and login with a valid username and password the login succeeds.
                If I enter an invalid user, the login fails, and the debugging output from the server mentions that the 'Query failed' and a stack trace is shown.
                Then any future attempt to login with a valid username/password no longer works.
                Once the 'Query failed' error occurs, it always happens for each subsequent request until the JBoss server is restarted.

                As with everyone else, this used to work fine on JBoss-2.4.4 with the Tomcat-4.0.3 embedded catalina service.

                The stack trace follows:

                [ERROR,DatabaseServerLoginModule] Query failed
                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:5556)
                at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:408)
                at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:365)
                at org.jboss.pool.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:71)
                at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:100)
                at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:142)
                at java.lang.reflect.Method.invoke(Native Method)
                at javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
                at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
                at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
                at java.security.AccessController.doPrivileged(Native Method)
                at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
                at javax.security.auth.login.LoginContext.login(LoginContext.java:449)
                at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:363)
                at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:330)
                at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:196)
                at org.jboss.web.catalina.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:281)
                at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:263)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
                at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
                at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
                at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
                at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
                at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
                at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
                at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
                at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
                at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
                at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
                at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
                at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
                at java.lang.Thread.run(Thread.java:512)

                • 6. Re: 2.4.5 Database Errors
                  starksm64

                  Try disabling prepared statement caching by adding
                  0
                  to your org.jboss.jdbc.XADataSourceLoader configuration.
                  A bug fix is causing this and it will have to be rolled back and a 2.4.6 release made.

                  • 7. Re: 2.4.5 Database Errors
                    cwstanton

                    Scott,

                    Thanks for your quick turn around on this bug. My management chain was impressed that you put out a fix and a new release so quickly for that single bug! The more they see the capabilities of JBoss and the dedication if JBoss developers, the more excited they get about using this product.

                    Charles

                    • 8. Re: 2.4.5 Database Errors
                      ansonyumo

                      Hey guys,

                      I'm still seeing this problem in JBoss 2.4.10 on Solaris JDK 1.4.1_02 with Oracle JDBC 9.2.1.0.

                      The PSCache=0 workaround does squelch the exception, but isn't there a performance issue here?

                      Brian Smith