4 Replies Latest reply on Nov 2, 2001 12:52 AM by Shane Ayerst

    find failed / timeout problem

    Shane Ayerst Newbie

      Hi, I am using jboss 2.4.3 with tomcat 3.2.3. The database I am using is SapDB.

      The problem I am having is that over a period of time the server seems to lose a connection to the database caused by whatever reason. This seems to occur via a Find Failed exception followed on subsequent attempts exceptions saying file not found (looking for a session bean). I think however the second exception is caused by the first.

      I have previously had this problem with mysql. Essentially it means that the first attempt to connect to the database fails. Mostly it will recover after this but not always.

      Can anyone help me with this? I have seen this asked quite a few times, but none of the answeres seem to help

        • 1. Re: find failed / timeout problem
          Shane Ayerst Newbie

          Btw, my jboss.jcml has the following data source:


          afmDS
          org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

          jdbc:sapdb://192.168.1.250/JBOSS?trace=afmtrace.txt
          1200000
          afm
          afmjdbc
          true
          false
          false
          true
          900000
          900000
          true
          false
          0.5
          4


          Hope this helps..

          • 2. Re: find failed / timeout problem
            Todd Newbie

            I have been having a very similar problem to this only with mysql!

            I get the following exception after leaving the server alone for a while after activity:

            [JAWS] java.sql.SQLException: Lost connection to server during query
            [JAWS] at org.gjt.mm.mysql.Connection.execSQL(Connection.java:889)
            [JAWS] at org.gjt.mm.mysql.PreparedStatement.executeQuery(PreparedStatement.java:288)
            [JAWS] at org.opentools.minerva.jdbc.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:71)
            [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleResult(JDBCQueryCommand.java:58)
            [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:160)
            [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand.execute(JDBCBeanExistsCommand.java:46)
            [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.findByPrimaryKey(JDBCFindEntityCommand.java:83)
            [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:59)
            [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntity(JAWSPersistenceManager.java:130)
            [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:270)
            [JAWS] at org.jboss.ejb.EntityContainer.find(EntityContainer.java:419)
            [JAWS] at java.lang.reflect.Method.invoke(Native Method)
            [JAWS] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
            [JAWS] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
            [JAWS] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
            [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
            [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:343)
            [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
            [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:164)
            [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
            [JAWS] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
            [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:436)
            [JAWS] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
            [JAWS] at $Proxy14.findByPrimaryKey(Unknown Source)

            This is with jboss 2.2.1 (old I know but have had same problem with all)

            jboss.jcml
            <!-- JDBC -->

            org.gjt.mm.mysql.Driver



            org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
            DefaultDS
            jdbc:mysql://localhost/rec
            reconciliation
            radmin42


            I would be very grateful if anyone can help!

            • 3. Re: find failed / timeout problem
              David Jencks Master

              todds problem is probably caused by not using idletimeout, however it looks to me as if shanoes settings are correct to remove connections idle for 15-30 min. Is there an sql error before the connections die??

              • 4. Re: find failed / timeout problem
                Shane Ayerst Newbie

                The error I get is a Find Failed exception. Sometimes this has a stack trace, whilst other times there isn't one for the exception.

                I can't quite reproduce it atm (Have to wait for a period of time) but it was originating from jaws and jboss as far as I could tell.