Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4510

"IJ000451: The connection manager is shutdown" after disabling/enabling a datasource

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 9.0.0.Beta1
    • Component/s: Batch
    • Labels:
      None
    • Environment:

      Windows 8.1 x64, JDK 1.8.0_20, Wildfly 8.2.0.Final

    • Steps to Reproduce:
      Hide

      1 - Create a JDBC DataSource - I`m using MySQL database
      2 - Change the job repository to use jdbc instead of in-memory
      3 - Deploy a sample application
      4 - Run a Job at least one time (I`ve not tried to reproduce the issue without running the job at least once)
      5 - Disable the deployment - without doing this, it`s not possible to disable the datasource
      6 - Disable the datasource that`s being used by your application
      7 - Enable the datasource
      8 - Enable the deployment
      9 - Try to execute a job again
      10 - The exception in the description will be thrown

      Show
      1 - Create a JDBC DataSource - I`m using MySQL database 2 - Change the job repository to use jdbc instead of in-memory 3 - Deploy a sample application 4 - Run a Job at least one time (I`ve not tried to reproduce the issue without running the job at least once) 5 - Disable the deployment - without doing this, it`s not possible to disable the datasource 6 - Disable the datasource that`s being used by your application 7 - Enable the datasource 8 - Enable the deployment 9 - Try to execute a job again 10 - The exception in the description will be thrown
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Restart Wildfly and the problem will be gone.

      Show
      Restart Wildfly and the problem will be gone.

      Description

      The below exception is thrown after the DataSource is disabled/enabled.
      I read that in Wildfly 9 onwards disabling/enabling a DataSource is deprecated, so maybe this problem won`t happen in next Wildfly version.

      2015-04-12 16:48:07,691 ERROR [io.undertow.request] (default task-8) UT005023: Exception handling request to /XXXXXe-web/NewServlet: javax.batch.operations.BatchRuntimeException: JBERET000622: Failed to obtain connection from org.jboss.jca.adapters.jdbc.WrapperDataSource@da89438, java:jboss/dasources/MySQL
      	at org.jberet.repository.JdbcRepository.getConnection(JdbcRepository.java:802) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at org.jberet.repository.JdbcRepository.insertJobInstance(JdbcRepository.java:264) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at org.jberet.repository.AbstractRepository.createJobInstance(AbstractRepository.java:91) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at org.jberet.operations.JobOperatorImpl$1.invoke(JobOperatorImpl.java:82) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at org.jberet.operations.JobOperatorImpl$1.invoke(JobOperatorImpl.java:79) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at org.jberet.operations.JobOperatorImpl.invokeTransaction(JobOperatorImpl.java:295) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at org.jberet.operations.JobOperatorImpl.start(JobOperatorImpl.java:79) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	at com.test.NewServlet.processRequest(NewServlet.java:64) [classes:]
      	at com.test.NewServlet.doGet(NewServlet.java:95) [classes:]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_11]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_11]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]
      Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000451: The connection manager is shutdown: java:jboss/dasources/MySQL
      	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:154)
      	at org.jberet.repository.JdbcRepository.getConnection(JdbcRepository.java:800) [jberet-core-1.0.2.Final.jar:1.0.2.Final]
      	... 36 more
      Caused by: javax.resource.ResourceException: IJ000451: The connection manager is shutdown: java:jboss/dasources/MySQL
      	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:371)
      	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:421)
      	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:515)
      	at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)
      	... 37 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jamezp James Perkins
                Reporter:
                renannp Renann Prado
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: