1 2 Previous Next 15 Replies Latest reply on Jun 4, 2012 12:12 PM by jianpings

    DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")

    glotzich

      Hi,

       

      I just started to integrate my EJB int my first web application, but I can'r figure out, why it doesn't work.

       

      I'm getting the following error:

      2011-02-20112 18:00:47,846 ERROR [ProfileServiceBootstrap] (Thread-2) Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

       

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss-switchboard:appName=HelloWorld,module=web" is missing the following dependencies:

          Dependency "jboss.ejb3:application=HelloWorld,component=MyEJB,module=ejb,service=EJBBinder" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.ejb3:application=HelloWorld,component=MyEJB,module=ejb,service=EJBBinder',whenRequired=MapControllerStateModel$ControllerStateWrapper@2e32b816{Start},dependentState=MapControllerStateModel$ControllerStateWrapper@3d3c40c{Installed} **")

        Deployment "jboss.web.deployment:war=/HelloWorld" is missing the following dependencies:

          Dependency "jboss-switchboard:appName=HelloWorld,module=web" (should be in state "Installed", but is actually in state "Create")

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "jboss.ejb3:application=HelloWorld,component=MyEJB,module=ejb,service=EJBBinder" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.ejb3:application=HelloWorld,component=MyEJB,module=ejb,service=EJBBinder',whenRequired=MapControllerStateModel$ControllerStateWrapper@2e32b816{Start},dependentState=MapControllerStateModel$ControllerStateWrapper@3d3c40c{Installed} **

       

       

                at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]

                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]

                at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]

                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]

                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]

                at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

                at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

                at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]

       

      I tried to figure out the reason yesterday the whole day up to now. I couldn't find a solution. I'm pretty much lost...

      Does someone know, what might be the reason?

      I don't know which information might be useful. I attached the source code, the ear.file, two logs and my output in the terminal.

      My JBoss is: JBossAS [6.0.0.Final "Neo"]

       

      I know, that some of the class files are only needed by web application or application server, but I wanted to reduce the problem, that

      a class couldn't be found, but nothing has changed. My Servlet doesn't make any lookup at the moment, so I think it must be a configuration problem.

       

      Thank you for helping me,

      Glotzich

        • 1. Re: DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
          jaikiran

          Your ejb-jar.xml points to 1.1 version. Did you really meant to use (that old) version?

           

          <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

           

          Try changing the ejb-jar.xml to:

           

           

          <?xml version="1.0" encoding="UTF-8"?>
          
          <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                    http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
                    version="2.1">
          
              <enterprise-beans>
                  <session>
                      <ejb-name>MyEJB</ejb-name>
                      <home>eu.glotzich.j2ee.common.HelloWorldHome</home>
                      <remote>eu.glotzich.j2ee.common.HelloWorld</remote>
                      <ejb-class>eu.glotzich.j2ee.common.HelloWorldEJB</ejb-class>
                      <session-type>Stateless</session-type>
                      <transaction-type>Container</transaction-type>
                  </session>
              </enterprise-beans>
          </ejb-jar>
          
          • 2. Re: DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
            glotzich

            THANK YOU!!!

             

            I would have never found it!

            • 3. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
              deryaaltuntas

              I want to ask some question.where is ejb-jarxml file.Is it automatically generated?

              I have not used it in my apllication.Is is so necassary?

              • 4. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                wdfink

                Because of Günter implement old EJB2.1 application ...

                the ejb-jar.xml must be written or generated via XDoclet which is a XML hell.

                 

                If you use EJB3.x you must not think about such stuff, even if you do something special

                • 5. Re: DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                  deryaaltuntas

                  Thank you so much Dieter.I am learning so much thanks to you.I want to ask one

                  question.

                  What is the best way to call session bean from client.

                   

                  1)Something like this

                  @EJB  static FileManagerBean fileManager;

                   

                  fileManager = new FileManagerBean();

                  file.manager.moveFile(src,dest);

                   

                  2)Or

                   

                  context = new InitialContext();

                  BookTestBeanRemote beanRemote = (BookTestBeanRemote)      context.lookup(BookTestBean.RemoteJNDIName);

                   

                   

                  If so ,in which xml  I must set RemoteJNDIName of BookTestBean

                   

                  it will so goodi if you answer my question

                  • 6. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                    wdfink

                    1) Bad example, better

                    @EJB FileManager fileManager;   // not static !!, not the Bean impl. but the Local (Local is better but Remote possible) interface

                    // no instantiation, because you of injection

                    fileManager.moveFile(...);

                    => hint: it is against the spec to access the file system

                     

                    2)

                    looks like an EJB2 example!

                    You should try EJB3 and injection (if possible)

                    • 7. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                      deryaaltuntas

                      If I use like below, I am getting java.lang.NullPointerException

                      EJB FileManager fileManager;   // not static !!, not the Bean impl. but the Local (Local is better but Remote possible) interface

                      // no instantiation, because you of injection

                      fileManager.moveFile(...);

                      • 8. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                        wdfink

                        I suppose you are inside the server because of @EJB, but you are nor, right?

                         

                        You are having an EJB3 Bean and try to use by client?

                        In this case you have to lookup with like your second example (if BookTestBeanRemote is a @Remote interface of an EJB3 bean)

                        The name is like "<EAR name without prefix>/BookTestBean/remote"

                        Or you use the naming annotation?

                        • 9. Re: DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                          deryaaltuntas

                          Previosly I was inside server to test something, but now I must be inside client.I realized that @ejb notation is

                          only used in server.I am having an EJB3 Bean and try to use by client.

                          I think below code will run for client side.Am I right?But I did not set up any jndi name.And I do not know how to set.

                          Also I do not have any ear now.

                          Context jndiContext = getInitialContext( );

                          FileManagerBean = (FileManagerBean)jndiContext.lookup(“java:comp/env/ejb/FİleManagerBean″);

                          • 10. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                            deryaaltuntas

                            I think this is the way.

                             

                            This is my stateless session bean

                             

                            package com.siemens.SessionBean.FileManager;

                            import java.io.File;
                            import java.io.FileInputStream;
                            import java.io.FileNotFoundException;
                            import java.io.FileOutputStream;
                            import java.io.IOException;
                            import java.nio.channels.FileChannel;

                            import javax.ejb.Stateless;

                            @Stateless (name="FileManager")
                            public class FileManagerBean implements FileManagerBeanLocal,
                            FileManagerBeanRemote {

                            public static final String RemoteJNDIName =  FileManagerBean.class.getSimpleName() + "/remote";
                            public static final String LocalJNDIName =  FileManagerBean.class.getSimpleName() + "/local";
                            public FileManagerBean(){};

                            public void moveFile(String source, String destination) throws FileNotFoundException,IOException {
                              // TODO Auto-generated method stub

                              try {

                               File sourceFile = new File(source);
                               File destFile = new File(destination);
                               destFile.createNewFile();
                               if(sourceFile.isFile() && sourceFile.canRead() && destFile.canWrite())

                             

                             


                               {
                                FileChannel inChannel = new FileInputStream(sourceFile).getChannel();
                                FileChannel outChannel = new FileOutputStream(destFile).getChannel();
                                outChannel.transferFrom(inChannel, 0, inChannel.size());
                                inChannel.close();
                                outChannel.close();
                               }

                               if(!sourceFile.exists())
                               {
                                String message = "Cannot find configuration file!";         
                                throw new FileNotFoundException(message);

                               }
                               if(!sourceFile.canRead())
                               {
                                String message = "Cannot read configuration file!";         
                                throw new IOException(message);

                               }
                               if(!destFile.canWrite())
                               {
                                String message = "Cannot write configuration file!";         
                                throw new IOException(message);

                               }

                              }

                              catch (IOException e) {
                               // TODO Auto-generated catch block
                               e.printStackTrace();
                              }

                            }

                            }

                             

                             

                             

                             

                            This is my client

                             

                             

                            public

                            Test() {

                            }

                             

                             

                             

                            public static void main(String[] args) throws FileNotFoundException, IOException {

                             

                            Test searchFacadeTest =

                            new Test();

                            searchFacadeTest.doTest();

                            }

                             

                              

                             

                            void doTest() throws FileNotFoundException, IOException{

                             

                             

                            try {

                             

                            InitialContext jndiContext =

                            new InitialContext();

                            FileManagerBeanRemote fileManager= (FileManagerBeanRemote)jndiContext.lookup(FileManagerBean.

                            RemoteJNDIName);

                            fileManager.moveFile(

                            "C:\\test.txt", "C:\\Documents and Settings\\tr1a6358\\bowling.txt");

                            }

                             

                            catch (Exception e) {

                            e.printStackTrace();

                            }

                            }

                            • 11. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                              deryaaltuntas

                              But this gives exception

                              But this gives

                               

                              javax.naming.NoInitialContextException

                               

                               

                              Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

                               

                              at javax.naming.spi.NamingManager.getInitialContext(

                               

                              NamingManager.java:645

                               

                               

                               

                               

                               

                              • 12. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                                wdfink

                                Do something like

                                public static final String RemoteJNDIName =  FileManagerBean.class.getSimpleName() + "/remote";
                                public static final String LocalJNDIName =  FileManagerBean.class.getSimpleName() + "/local";

                                in your implementation class and use it as client lookup is not a good idea because you must have the implementation @client !?

                                 

                                To get the correct name look in your logfile for some output like:

                                [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (main) Binding the following Entries in Global JNDI:

                                        CustomerDomainBean/local - EJB3.x Default Local Business Interface

                                        CustomerDomainBean/local-com.orga.opsc.gold.bas.persistence.odal.CustomerDomain - EJB3.x Local Business Interface

                                 

                                Also you should should mark where the exception occour.

                                 

                                You might set the properties for JNDI like:

                                      System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");

                                      System.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

                                      System.setProperty(Context.PROVIDER_URL, "jnp://localhost:1100");

                                or use InitialContext(myProperties)

                                 


                                • 13. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                                  deryaaltuntas

                                  Sorry I know I asked alot.But which is my lookup name.Bebause I can not see anything like java:comp/env/ejb

                                   

                                  17:57:27,213 INFO  [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU
                                  17:57:27,213 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                                  17:57:27,228 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU
                                  17:57:27,228 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
                                  17:57:27,228 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                                  17:57:27,228 INFO  [SessionSpecContainer] Starting jboss.j2ee:jar=SiguardEJB.jar,name=FileManager,service=EJB3
                                  17:57:27,228 INFO  [EJBContainer] STARTED EJB: com.siemens.SessionBean.FileManager.FileManagerBean ejbName: FileManager
                                  17:57:27,275 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

                                  FileManager/remote - EJB3.x Default Remote Business Interface
                                  FileManager/remote-com.siemens.SessionBean.FileManager.FileManagerBeanRemote - EJB3.x Remote Business Interface
                                  FileManager/local - EJB3.x Default Local Business Interface
                                  FileManager/local-com.siemens.SessionBean.FileManager.FileManagerBeanLocal - EJB3.x Local Business Interface

                                   

                                   

                                   

                                   

                                  Also I have made a function in client

                                   

                                  public static Context getInitialContext( ) throws javax.naming.NamingException {

                                        Properties p = new Properties( );

                                        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

                                        p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

                                        p.put(Context.PROVIDER_URL, "jnp://localhost:1100");

                                        return new javax.naming.InitialContext(p);

                                       }

                                   

                                   

                                   

                                   

                                   

                                  • 14. DEPLOYMENTS MISSING DEPENDENCIES (should be in state "Installed", but is actually in state "Create")
                                    wdfink

                                    I'm not sure whether JAR deployment works similar to EARs, but suppose it.

                                     

                                    Your JAR is SiguardEJB.jar, the deploy 'FileManager/remote'

                                    so lookup "SiguardEJB/FileManager/remote" should work.

                                     

                                    For such questions you might look to the jmx-console, search for section JBoss->service:JNDIView and invoke the method list().

                                    It will show you the complete Global name space

                                    1 2 Previous Next