2 Replies Latest reply on Jul 18, 2006 9:21 AM by krishnarajd

    Connection Error - Jboss 4.0.4 + JDK 1.5 + Pgsql-8.1.4

    krishnarajd

      Hi Everybody.,

      I have deployed an application in the below mentioned environment
      JBOSS - 4.0.4
      JDK - 1.5
      Pgsql - 8.1.4
      I got the following error while running the application

      " Closing a connection for you. Please close them yourself: . org.jboss.resource.adapter.jdbc.WrappedConnection@cece16
      java.lang.Throwable: STACKTRACE "

      I would appreciate if any one can help me in solving this issue .

      Thanks in Advance.,

        • 1. Re: Connection Error - Jboss 4.0.4 + JDK 1.5 + Pgsql-8.1.4
          peterj

          This usually happens when you grab a data source and then fail to close it after you are done with it. For example, within a method for a stateless session bean, if you do:

          DataSource ds = lookupDataSource();
          Connectionn conn = ds.getConnection();
          .. do stuff with the database ...
          return;

          then you have problems. Instead, you should code as:

          DataSource ds = getDataSource();
          Connectionn conn = ds.getConnection();
          try {
          .. do stuff with the database ...
          } finally {
          conn.close();
          }
          return;

          • 2. Re: Connection Error - Jboss 4.0.4 + JDK 1.5 + Pgsql-8.1.4
            krishnarajd

            Thanks for the Reply .,

            One More Clarification Needed - The Application was developed in
            JBOSS - 3.2.1
            JDK - 1.4
            Pgsql - 7.4.2

            So when the Application was Deployed in the above Environment there is no such Problems , Only if we try to deploy under
            JBOSS - 4.0.4
            JDK - 1.5
            Pgsql - 8.1.4

            We are getting the Error as
            " Closing a connection for you. Please close them yourself: . . org.jboss.resource.adapter.jdbc.WrappedConnection@cece16
            java.lang.Throwable: STACKTRACE"

            I would Appreciate if any one can help me on this issue.

            Thanks in Advance