6 Replies Latest reply on May 16, 2002 7:12 AM by Franco

    JBoss 2.4.5 - Cannot access DB

    Franco Apprentice

      just downloaded jBoss 2.4.5 and installed over 2.4.4 on W2k, MySql and MM JDBC driver 2.0.13.

      The database cannot be accessed:

      java.rmi.ServerException: Load failed; nested exception is:
      at org.gjt.mm.mysql.PreparedStatement.executeQuery(Unknown Source)
      at org.jboss.pool.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:71)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleResult(JDBCQueryCommand.java:58)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:156)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:144)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:157)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:372)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:287)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:197)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:125)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:436)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:506)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
      at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
      at $Proxy93._copyFromEJB(Unknown Source)

      Thanks in advance for any help.

        • 1. Re: JBoss 2.4.5 - Cannot access DB
          Andrew Kerr Newbie

          I tried porting to 2.4.5 today with the same results. It looks like the at least the first database access succeeds, but once the exceptions start, I can't access the database anymore.

          My MySQL setup works perfectly in 2.4.4.

          One other strange thing... I keep seeing multiple "Creating XA Pool" messages in the log. Shouldn't I only see this once per pool? Perhaps this is related?

          • 2. Re: JBoss 2.4.5 - Cannot access DB
            Jeroen Gremmen Newbie

            Same problem here. My application runs on JBoss 2.4.4 but on 2.4.5 I get (among others) the following database exception:

            [INFO,XAPoolDataSource] Creating XA Pool
            [ERROR,es_framework] com.xyz.es.applications.ir.server.EmployeeBean: Unable to load employee bean EmployeePK[dvID=14]
            java.sql.SQLException: Closed Statement
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
            at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:4768)
            at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:349)
            at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
            at org.jboss.pool.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:71)

            My datasource definition in jboss.jcml:


            Can someone help me (us) out?



            • 3. Re: JBoss 2.4.5 - Cannot access DB
              Erik Lindqvist Newbie

              Same trouble here. Changed from 2.4.5 RC2+MySQL (I think) to 2.4.5Final+MySQL (MM JDBC driver 2.0.13) and couldn't access the DB.

              I actually tried to run 2.4.5 final, with the much older MM JDBC driver 2.0.4, and it started WORKING!!!
              I don't know why though...

              • 4. Re: JBoss 2.4.5 - Cannot access DB
                Jeroen Gremmen Newbie


                In other threads the same problem is discussed for Oracle drivers. As each submitter states that all worked fine in JBoss 2.4.4 (or even 2.4.5RC3) I'm not convinced that moving back to a flintstones-version of the mysql driver is a real solution. The release notes of 2.4.5 describe changes that have been made in the PreparedStatement code and that's where the exceptions are thrown.

                I'd love to submit this (apparantly) JBoss bug but JBoss version 2.4.5 is not yet in the bug-product-list. I'm wondering if this version is considered stable by the JBoss people...



                • 6. Re: JBoss 2.4.5 - Cannot access DB
                  Franco Apprentice

                  JBoss 2.4.6 solves the problem.