0

I created a wildfly-swarm test project using jboss forge, but when I generate project I encounter the error:

2017-05-17 15:35:00,528 ERROR [org.jboss.as.controller.management-operation] (main) WFLYCTL0013: Operation ("add") failed - address: (("deployment" => "demo.war")) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.ExampleDS"],                                                                                                                   
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [                                                                                                                                                                       
        "jboss.persistenceunit.\"demo.war#demo-persistence-unit\" is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]",                                                                                                       
        "jboss.persistenceunit.\"demo.war#demo-persistence-unit\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"                                                                                        
    ]                                                                                                                                                                                                                                        
}                                                                                                                                                                                                                                            
2017-05-17 15:35:00,530 ERROR [org.jboss.as.server] (main) WFLYSRV0021: Deploy of deployment "demo.war" was rolled back with the following failure message:                                                                                  
{                                                                                                                                                                                                                                            
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.ExampleDS"],                                                                                                                   
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [                                                                                                                                                                       
        "jboss.persistenceunit.\"demo.war#demo-persistence-unit\" is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]",                                                                                                       
        "jboss.persistenceunit.\"demo.war#demo-persistence-unit\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]"                                                                                        
    ]                                                                                                                                                                                                                                        
}

what should I do? If anyone can help me, thank you!

Eriel Miquilino
  • 433
  • 4
  • 7
  • From the error I'm guessing you added the `jpa` and/or `datasource` dependencies of WF Swarm. Did you also add a dependency on H2 JDBC driver, or a different one? See https://howto.wildfly-swarm.io/create-a-datasource/ on how to create a datasource connection – Ken May 19 '17 at 20:13
  • Yes really forgot the dependency of the JDBC driver, thank you very much for the help – Eriel Miquilino May 25 '17 at 11:54

1 Answers1

0

Although you don't include your persistence.xml in your post, this error means that the default database driver wasn't started and it's referenced in your persistence.xml file used by jpa. If you're using Maven you need to include at least one of the default jdbc driver jar using compile scope, that will automatically configure the ExampleDS datasource.

Also, make sure you're using the latest ws which is 2017.5.0.