Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WildFly deployment fails - "JBAS014771: Services with missing/unavailable dependencies"

I am new to Web services. I took over some development project from another developer. Everything was working fine, until I created my own testing project to see how everything fits together. When I reverted back from my testing project to my previous working project, the project compiles but would not start up during deployment. I do not even know where to start looking.

I am using Eclipse Kepler and I deploy to a WildFly server.

The logs show the following error message:

10:39:06,146 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "JEM-eap.ear")]) - failure description: {
    "JBAS014771: Services with missing/unavailable dependencies" => [
        "jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".beanmanager]",
        "jboss.deployment.unit.\"JEM-eap.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"JEM-eap.ear\".beanmanager]"
    ],
    "JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
        "Services that were unable to start:" => [
            "jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ejb.jar\".POST_MODULE",
            "jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".INSTALL",
            "jboss.deployment.unit.\"JEM-eap.ear\".INSTALL",
            "jboss.persistenceunit.\"JEM-eap.ear/JEM-ejb.jar#JPA-ejb\".__FIRST_PHASE__"
        ],
        "Services that may be the cause:" => [
            "jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".beanmanager",
            "jboss.deployment.unit.\"JEM-eap.ear\".beanmanager",
            "jboss.jdbc-driver.sqljdbc4_jar"
        ]
    }
}

10:39:06,146 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "JascoEnergy")
]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
    "jboss.driver-demander.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]",
    "jboss.data-source.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]"
]}
10:39:06,146 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "JascoEnergy")
]) - failure description: {
    "JBAS014771: Services with missing/unavailable dependencies" => [
        "jboss.driver-demander.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]",
        "jboss.data-source.java:/jdbc/JascoEnergy is missing [jboss.jdbc-driver.sqljdbc4_jar]"
    ],
    "JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
        "Services that were unable to start:" => [
            "jboss.data-source.reference-factory.JascoEnergy",
            "jboss.naming.context.java.jdbc.JascoEnergy"
        ],
        "Services that may be the cause:" => [
            "jboss.deployment.subunit.\"JEM-eap.ear\".\"JEM-ui.war\".beanmanager",
            "jboss.deployment.unit.\"JEM-eap.ear\".beanmanager",
            "jboss.jdbc-driver.sqljdbc4_jar"
        ]
    }
}
like image 301
Harriet Avatar asked Sep 29 '22 17:09

Harriet


1 Answers

I solved my problem which is very similar to your problem.

The error log actually does tell you where to look, it actually says that your jdbc-driver is missing. The file sqljdbc4.jar is missing from your WildFly server deployments folder. You need to add the jar-file to <your_wildfly_server_folder> --> standalone --> deployments. After adding the missing jar-file, deployment works okay for me.

I have come to realize that (at least in my case) something went wrong with a garbage collector on the WildFly server on one of my deploy attempts. This will result in the required jar file (in your case sqljdbc4.jar) to be undeployed on the server. As this is a dependency for your own application, deploying your application will not work.

If you see the jar-file present in the deployments folder and you still fail to deploy your application, then you need to redeploy the jar-file first. You can probably do this from the WildFly Admin Console, but I have not found out how exactly. You can also do this by going to the deployments folder, locate a file named exactly as your missing jar-file but with a .undeployed extension (in your case sqljdbc4.jar.undeployed), and just delete it. If all goes well, then WildFly will automatically re-deploy your jar-file.

like image 121
PJvG Avatar answered Oct 04 '22 04:10

PJvG