3 Replies Latest reply on Apr 11, 2012 12:19 PM by Claudio Sasso

    Jboss 4.2->7.1 EJB fail - Missing/unsatisfied dependencies

    Claudio Sasso Newbie

      Hi all,

       

      I am working in securing an "old but good" BI JEE app with EJBs; to secure the environment, I moved to Jboss7.1 from 4.2, and the EAR i am trying to deploy need to work without source code editing, because I can't start a re-development, it will take too much effort.

       

      So, I revisited the datastore configuration to be compliant to Jboss7 (SQL Server back end) , some other stuffs, but now I am stuck at this point; can you give me some clues, even simply "you need to rewrite the entire logic" or "you need to rewrite the ejb-jar.xml file" etc...

       

       

      The deployment is ok, right now, server.log just says

      12:00:00,584 INFO  [org.jboss.as.repository] (HttpManagementService-threads - 11) JBAS014900: Content added at location C:\xxx\standalone\data\content\e7\d02abb7cc8a4bc33582399b8c705100d866ca7\content

       

       

      When I try to enable, this happens (i will shorten the log, i am attaching the complete server.log):

      12:01:38,268 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "bi_coger.logs.ear"

      12:01:42,266 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "coger.war"

      12:01:42,282 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ejb.jar"

      12:01:42,719 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine in deployment unit subdeployment "ejb.jar" of deployment "bi_coger.logs.ear" are as follows:

       

                java:global/bi_coger.logs/ejb/bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine!it.bi.johnny.modules.coger.model.PspLineLocal

                java:app/ejb/bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine!it.bi.johnny.modules.coger.model.PspLineLocal

                java:module/bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine!it.bi.johnny.modules.coger.model.PspLineLocal

                java:global/bi_coger.logs/ejb/bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine!it.bi.johnny.modules.coger.model.PspLineLocalHome

                java:app/ejb/bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine!it.bi.johnny.modules.coger.model.PspLineLocalHome

                java:module/bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspLine!it.bi.johnny.modules.coger.model.PspLineLocalHome

       

      12:01:42,734 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named bi_coger.ejb.name.it.bi.johnny.modules.coger.model.PspResource in deployment unit subdeployment "ejb.jar" of deployment "bi_coger.logs.ear" are as follows:

       

      [... as above....]

       

      12:01:42,734 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named bi_coger.ejb.name.it.bi.johnny.modules.xrm.model.JobTitle in deployment unit subdeployment "ejb.jar" of deployment "bi_coger.logs.ear" are as follows:

      12:01:42,734 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named bi_coger.ejb.name.it.bi.johnny.modules.coger.model.Statement in deployment unit subdeployment "ejb.jar" of deployment "bi_coger.logs.ear" are as follows:

       

      [... same messages for all EJBs in the project]

       

      12:01:45,464 INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /bi_coger

      ** 12:01:46,229 INFO  [org.jboss.as.server] (HttpManagementService-threads - 13) JBAS015870: Deploy of deployment "bi_coger.logs.ear" was rolled back with failure message

      12:01:46,806 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment ejb.jar in 769ms

      12:01:47,664 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment coger.war in 1628ms

      12:01:47,680 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment bi_coger.logs.ear in 1639ms

      12:01:47,680 INFO  [org.jboss.as.controller] (HttpManagementService-threads - 13) JBAS014774: Service status report

      JBAS014776:    Newly corrected services:

            service jboss.naming.context.java.jboss.resources.jdbc.bi_coger (new available)

       

      Line with the error, ** 12:01:46,229 , is much wider, but its unreadable; this is the result of sed 's/,/\n/g' in this line (first lines...)

       

      {"JBAS014771: Services with missing/unavailable dependencies" => [

      "jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.coger.model.WorkPacket\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_cogerMissing[jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.coger.model.WorkPacket\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_coger]"

      "jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.chargenotes.model.ChargeNote\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_cogerMissing[jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.chargenotes.model.ChargeNote\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_coger]"

      "jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.core.model.ejb.task.Task\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_cogerMissing[jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.core.model.ejb.task.Task\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_coger]"

      "jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.chargenotes.model.KmRefundRate\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_cogerMissing[jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.chargenotes.model.KmRefundRate\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_coger]"

      "jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.system.model.User\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_cogerMissing[jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.modules.system.model.User\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_coger]"

       

       

       

       

      The point is: is there some configuration changes i need to do in order to let Jboss see those EJBs?

      My application is an ear which contains a WAR and a JAR

      bi_coger.logs.ear

      |- coger.war       [has a WEB-INF/web.xml and META-INF/application.xml, i am attaching them but doesn't seem important to me]

      |- ejb.jar        [has a META-INF/ejb-jar.xml that could be the key]

       

      ejb-jar.xml has such entries:

      <ejb-jar>

          <display-name>BI</display-name>

          <enterprise-beans>

              <session>

                  <ejb-name>bi_coger.ejb.name.it.bi.johnny.core.control.ejb.manager.UseCaseManager</ejb-name>

                  <home>it.bi.johnny.core.control.ejb.manager.UseCaseManagerRemoteHome</home>

                  <remote>it.bi.johnny.core.control.ejb.manager.UseCaseManagerRemote</remote>

                  <ejb-class>it.bi.johnny.core.control.ejb.manager.UseCaseManagerBean</ejb-class>

                  <session-type>Stateful</session-type>

                  <transaction-type>Bean</transaction-type>

                  <ejb-local-ref>

                      <ejb-ref-name>bi_coger.ejb.local.it.bi.johnny.core.model.ejb.info.Info</ejb-ref-name>

                      <ejb-ref-type>Entity</ejb-ref-type>

                      <local-home>it.bi.johnny.core.model.ejb.info.InfoLocalHome</local-home>

                      <local>it.bi.johnny.core.model.ejb.info.InfoLocal</local>

                      <ejb-link>bi_coger.ejb.name.it.bi.johnny.core.model.ejb.info.Info</ejb-link>

                  </ejb-local-ref>

      [....]

       

       

      and errors seems referring to something Jboss7.1 doesn't like in naming

      "jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.core.control.ejb.manager.UseCaseManager\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_cogerMissing[jboss.naming.context.java.comp.\"bi_coger.logs\".ejb.\"bi_coger.ejb.name.it.bi.johnny.core.control.ejb.manager.UseCaseManager\".env.jdbc.bi_cogerjboss.naming.context.java.jboss.resources.jdbc.bi_coger]"

       

       

       

      As i said before, don't hope for a packed solution, its a complex problem, but could someone just give me some clues if it could be an EJB specification problem, a missing or not edited Jboss config file, or a a development problem, a convention I am missing, etc...??

      The application works properly in Jboss 4.2

      Thanks