4 Replies Latest reply on Oct 9, 2009 1:06 AM by Vicky Kak

    Jboss 5 database connection issues.

    Hari Rangarajan Newbie

      Hi,

      I have an application running in Jboss 4 and Oracle 10g. We are having a mass scale migration to Oracle 11 and Jboss 5.0G.A.

      While the application is running fine in Oracle 11g and Jboss 4, when I deploy it in Jboss AP 5, its giving either of the two exceptions :-
      1. org.jboss.util.NestedSQLException: Unable to get managed connection
      2. java.sql.SQLRecoverableException: Closed Statement: next

      at different times. I am using Jdk1.6 and Ojdbc6.jar.

      Can anybody tell me why I am getting this error

      Thanks,
      Hari

        • 1. Re: Jboss 5 database connection issues.
          John Ament Master

          can you post the full stack trace?

          what happens when you use ojdbc14.jar ? we're currently using that w/ AS 5.1 and both 10g and 11g db's.

          • 2. Re: Jboss 5 database connection issues.
            Vicky Kak Master

             

            "rangarha" wrote:

            Can anybody tell me why I am getting this error

            Something is screwed in your application, let us see the complete error trace.

            • 3. Re: Jboss 5 database connection issues.
              Hari Rangarajan Newbie

              Hi everybody....thanks for the replies.

              The application runs when I use ojdbc14/ojdbc5.jars
              Now for removing the error, I used a hack....simply commented out the code closing the statement and connection and now its running with ojdbc6.jar...
              Wat i dont get is how the application is running properly if its a code issue????


              the stack trace is :-
              -----------------------------
              java.sql.SQLRecoverableException: Closed Statement: next
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:242)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.user.dbhandler.StaticTokenLoginDBHandler.populateBean(StaticTokenLoginDBHandler.java:174)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.user.dbhandler.StaticTokenLoginDBHandler.search(StaticTokenLoginDBHandler.java:106)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.user.action.OTALogonAction.execute(OTALogonAction.java:122)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at com.geai.mexico.web.utility.security.SecurityFilter.doFilter(SecurityFilter.java:187)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              2009-10-03 17:30:53,579 ERROR [STDERR] (http-127.0.0.1-8080-1) at java.lang.Thread.run(Thread.java:619)
              -----------------------------


              and the other is

              ------------------------------
              2009.10.03 14:31:04 INFO DUPLEX: Method Name (reloadPropsIfNecessary()) - Message { Properties reloaded successfully at Sat Oct 03 14:31:04 IST 2009. }
              2009.10.03 14:34:25 FATAL DUPLEX: Method Name (execute()) - Message { SQL Exception occured on login. }
              2009.10.03 14:34:25 FATAL DUPLEX: Method Name (execute() and cause) - Message { org.jboss.util.NestedSQLException: Unable to get managed connection for SRINT-DS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SRINT-DS)
              javax.resource.ResourceException: Unable to get managed connection for SRINT-DS }
              2009.10.03 14:34:25 FATAL DUPLEX: Method Name (execute() and stacktrace) - Message { org.jboss.util.NestedSQLException: Unable to get managed connection for SRINT-DS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SRINT-DS)
              org.jboss.util.NestedSQLException: Unable to get managed connection for SRINT-DS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SRINT-DS)
              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
              at com.geai.mexico.web.utility.dbutils.DBConnectionManager.getConnectionFromPool(DBConnectionManager.java:121)
              at com.geai.mexico.web.user.dbhandler.StaticTokenLoginDBHandler.search(StaticTokenLoginDBHandler.java:84)
              at com.geai.mexico.web.user.action.OTALogonAction.execute(OTALogonAction.java:122)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              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:617)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at com.geai.mexico.web.utility.security.SecurityFilter.doFilter(SecurityFilter.java:187)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
              -----------------------------

              • 4. Re: Jboss 5 database connection issues.
                Vicky Kak Master

                 

                "rangarha" wrote:

                Wat i dont get is how the application is running properly if its a code issue????

                Take you application code and run it via a standalone java application.This will confirm if the issue is cropping due to oracle driver or not.
                You need to perform more homework, pasting the stack traces without proper explanation is not going to help here.