2 Replies Latest reply on Aug 3, 2016 9:32 AM by milspec

    How to fix? missing dependencies in ejb

    milspec

      Hi all,

       

      I've posted a few questions recently, all in the context of technical debt: migrating a long-lived (aka legacy) application from jboss 4.x to wildfly 10.x

       

      Question

      How do I got about fixing the 'missing dependencies'?

       

      Context

      • Migrating EJB 2.x JavaEE application to Wildfly 10
      • Application and ejb's deploy OK on jboss-4.2.x
      • Ear structure is as follows:

      app.ear/

         app-client.jar

         app-ejb.jar

         app.war

       

      • I did not include a jboss-deployment-structure.xml file

       

      Log File Excerpts

       

      2016-08-01 15:06:56,676 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "app.ear")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [

      ...

          "jboss.naming.context.java.comp.app.app-ejb.PollService.DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.appDS]",

      ..

            service jboss.deployment.subunit."app.ear"."app-ejb.jar".component.PollService.CREATE (missing) dependents: [service jboss.deployment.subunit."app.ear"."app-ejb.jar".component.PollService.START]

       

            service jboss.deployment.subunit."app.ear"."app-ejb.jar".component.PollService.START (missing) dependents: [service jboss.deployment.subunit."app.ear"."app-ejb.jar".moduleDeploymentRuntimeInformationStart, service jboss.deployment.subunit."app.ear"."app-ejb.jar".deploymentCompleteService]

       

      service jboss.deployment.subunit."app.ear"."app-ejb.jar".component.PollService.VIEW."com.acme.app.polls.service.ejb.PollService".REMOTE (missing) dependents: [service jboss.deployment.subunit."app.ear"."app-ejb.jar".component.PollService.START]

       

       

       

       

      thanks in advance

        • 1. Re: How to fix? missing dependencies in ejb
          jaikiran

          The error seems to indicate that the application needs a datasource (appDS) which seems to be missing. How have you created and deployed the datasource?

          • 2. Re: How to fix? missing dependencies in ejb
            milspec

            Hi Jakiran,

             

            Thanks for lending a hand here; it helped greatly. I had missed. Jndi definition was the problem.

             

            To recap, I had customized jndi-name in the data source

             

            <datasource jndi-name="java:/app"

             

             

            but left jndi-name in the default-bindings "as is":

            <default-bindings

               ...

               datasource="java:jboss/datasources/appDS

            />

            This fixed it:

            <default-bindings

               ...

               datasource="java:/app"

            />

             

             

            thanks again.