7

I deleted the ExampleDS from Wildfly.Now I can't deploy my app, because I got errors like this.
Any tips?

"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.ExampleDS"], "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.WebJ2EE.WebJ2EE.DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"] } 18:32:10,189 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "WebJ2EE.war" (runtime-name : "WebJ2EE.war") 18:32:10,189 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.naming.context.java.jboss.datasources.ExampleDS (missing) dependents: [service jboss.naming.context.java.module.WebJ2EE.WebJ2EE.DefaultDataSource]

I use Derby,wildfly11, and eclipse.

iBug
  • 35,554
  • 7
  • 89
  • 134
huistbor
  • 83
  • 1
  • 5

2 Answers2

6

After you delete the ExampleDS you have to change the configuration file standalone.xml. There are still references to exampleDS in this file.

slawek
  • 328
  • 1
  • 10
1

In addition to the accepted answer and in case anyone wonders what removing of the exampleDS entails:

  1. remove the entire “ExampleDS” element
  2. remove the entire “h2” element
  3. substitute “ExampleDS” with the name of your new datasource (e.g. YourNewDatasource ) within the “datasource” attribute of the element which is below

In the release cycle of WildFly and Java EE7 spec, the concept of "default datasource" was introduced (see EE.5.19 section of Java EE7 spec for more details). The default datasource is expected to be bound into the Java EE component specific namespace (a.k.a ENC) and is available at java:comp/DefaultDataSource. That ENC JNDI name is just a link to the container specific default shipped datasource and in this case just links to java:jboss/datasources/ExampleDS.

Details here here and here.

Lonzak
  • 9,334
  • 5
  • 57
  • 88