How to remove a datasource via CLI in EAP 6 ?

Solution Verified - Updated -

Issue

  • Tried to remove the datasource via CLI but getting the following CLI output and console logging:
    • CLI output
[standalone@localhost:9999 /] /subsystem=datasources/data-source=MysqlDS:remove()                                                                                                                    {                                         
    "outcome" => "failed",
    "failure-description" => "JBAS014762: Removing services has lead to unsatisfied dependencies:
Service jboss.naming.context.java.jboss.datasources.MySqlDS was depended upon by service jboss.persistenceunit.\"HibernateDemo1.war#myapp\"",
    "rolled-back" => true
}
  • Console logging
23:06:21,051 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) JBAS010409: Unbound data source [java:jboss/datasources/MySqlDS]
23:06:21,057 INFO  [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.naming.context.java.jboss.datasources.MySqlDS (missing) dependents: [service jboss.persistenceunit."HibernateDemo1.war#myapp"]

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

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