13 Replies Latest reply on Jan 3, 2011 3:17 AM by jaikiran pai

    JBoss 6 CR1 deployment error EJB with weld

    David Carreras Newbie

      I tried to deploy our existing api and add the use of weld into it with jboss 6 CR1 and i had a deployment issue.

       

      After a little work i reproduced it as follow :

       

      One Stateless EJB with a reference to one singleton :

       

      package dca;
      
      import javax.ejb.EJB;
      import javax.ejb.Stateless;
      
      /**
       * Stateless class.
       * 
       * @author david
       * 
       */
      @Stateless
      public class StatelessClass implements ISL {
      
          @EJB
          private SingClass si;
          
      }
      

       

      The Singleton EJB :

       

       

      package dca;
      
      import javax.ejb.Singleton;
      
      /**
       * Singleton.
       * 
       * @author david
       *
       */
      @Singleton
      public class SingClass implements ISi {
      
          
          
      }
      

       

      Packaging all this in a jar with a beans.xml in the META-INF directory.

       

      And we had the folowing error :

       

       

      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "jboss.j2ee:jar=test.jar,name=SingClass,service=EJB3" is missing the following dependencies:
          Dependency "vfs:///D:/Boulot/jboss-6.0.0.20101110-CR1/server/default/deploy/test.jar_WeldBootstrapBean" (should be in sta
      tart", but is actually in state "Create")
        Deployment "jboss.j2ee:jar=test.jar,name=SingClass,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:jar=test.jar,name=SingClass,service=EJB3" (should be in state "Installed", but is actually in stat
      eate")
        Deployment "jboss.j2ee:jar=test.jar,name=StatelessClass,service=EJB3" is missing the following dependencies:
          Dependency "<UNKNOWN jboss.j2ee:jar=test.jar,name=StatelessClass,service=EJB3>" (should be in state "Installed", but is a
      ly in state "** UNRESOLVED Demands 'Class:dca.SingClass' **")
        Deployment "jboss.j2ee:jar=test.jar,name=StatelessClass,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:jar=test.jar,name=StatelessClass,service=EJB3" (should be in state "Installed", but is actually in
      e "PreInstall")
        Deployment "jndibinder:SingClass/local" is missing the following dependencies:
          Dependency "<UNKNOWN jndibinder:SingClass/local>" (should be in state "Installed", but is actually in state "** UNRESOLVE
      ands 'jboss.j2ee:jar=test.jar,name=SingClass,service=EJB3' **")
        Deployment "jndibinder:SingClass/local-dca.ISi" is missing the following dependencies:
          Dependency "<UNKNOWN jndibinder:SingClass/local-dca.ISi>" (should be in state "Installed", but is actually in state "** U
      LVED Demands 'jboss.j2ee:jar=test.jar,name=SingClass,service=EJB3' **")
        Deployment "vfs:///D:/Boulot/jboss-6.0.0.20101110-CR1/server/default/deploy/test.jar_WeldBootstrapBean" is missing the foll
       dependencies:
          Dependency "jboss.j2ee:jar=test.jar,name=StatelessClass,service=EJB3" (should be in state "Create", but is actually in st
      PreInstall")
      
      DEPLOYMENTS IN ERROR:
        Deployment "<UNKNOWN jndibinder:SingClass/local-dca.ISi>" is in error due to the following reason(s): ** UNRESOLVED Demands
      ss.j2ee:jar=test.jar,name=SingClass,service=EJB3' **
        Deployment "<UNKNOWN jndibinder:SingClass/local>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.
      jar=test.jar,name=SingClass,service=EJB3' **
        Deployment "<UNKNOWN jboss.j2ee:jar=test.jar,name=StatelessClass,service=EJB3>" is in error due to the following reason(s):
      NRESOLVED Demands 'Class:dca.SingClass' **
      
              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.Alpha8]
              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.Alpha8]
              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.
      0101110-CR1]
              at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.j
      18) [:0.1.0.Alpha1]
              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.j
      33) [:6.0.0.20101110-CR1]
              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.j
      6) [:6.0.0.20101110-CR1]
              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl
      .jar:2.1.0-alpha-5]
              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-
      base.jar:2.1.0-alpha-5]
              at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]
      

       

      Our target was to add on Pojo bean with @Inject using the ejb singleton bean but we can't because of this issue on EJBs.

       

      Do i missed something about the weld use ? Or is this a bug (on weld ? on EJB ?) ?