Search code examples
xmlmavenwildflyjava-ee-6mysql-connector

Wildfly error "Required service that are not installed"


this is my firt try with a Maven project using Wildfly. So, this is my standalone file in xml for datasource:

<?xml version="1.0" encoding="UTF-8"?>
 <datasources xmlns="http://www.jboss.org/ironjacamar/schema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="
    http://www.jboss.org/ironjacamar/schema
    http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
<datasource jndi-name="artifact-id" enabled="true" use-java-context="true" pool-name="artifact-id">
    <connection-url>jdbc:mysql//localhost:3306/java-ee-schema?serverTimezone=UTC</connection-url>
    <driver>mysql</driver>
    <security>
        <user-name>java-client</user-name>
        <password>*******</password>
    </security>
</datasource>

and this is the error that i get after starting the wildfly server:

00:57:24,197 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "artifact-id.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.artifactID"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
    "jboss.persistenceunit.\"artifact-id.war#artifact-id\" is missing [jboss.naming.context.java.artifactID]",
    "jboss.persistenceunit.\"artifact-id.war#artifact-id\".__FIRST_PHASE__ is missing [jboss.naming.context.java.artifactID]"
]}

What i can do?


Solution

  • You should configure your datasrouce in wildfly itself. Also I'm not familiar with ironjacamar description file but the driver should be defined somewhere.