"You are trying to use a connection factory that has been shut down" exception in JBoss EAP

Solution Verified - Updated -

Issue

  • The following exception is raised when attempting to obtain a connection from a JBoss managed DataSource in EAP 6 or later

    ... javax.resource.ResourceException: IJ000470: You are trying to use a connection factory that has been shut down: <my_jndi_datasource>
    
  • The following exception is raised when attempting to obtain a connection from a JBoss managed DataSource in EAP 5 or earlier

    ... ERROR util.database.DBConnectionManager;:(?:getConnection():?) - Couldn't get DB connection
        org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable:
        (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
    
  • JBoss has to be restarted before the application can successfully obtain a datasource connection

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4
    • 5
    • 6
    • 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content