3 Replies Latest reply on May 24, 2013 4:25 AM by Sameer K

    Unable to instantiate container with factories []

    Sabarinath Selvaraj Newbie

      Hi

       

      I got a problem while invoking createEJBContainer() in POJO class.

       

      public static void main(String[] args) throws NamingException {/*

              AccountBeanClient obj1 = new AccountBeanClient();

              Properties properties = new Properties();

              EJBContainer container = null;

       

               try {

                   container = javax.ejb.embeddable.EJBContainer.createEJBContainer();

                 Context namingContext = container.getContext();

                   EnrolleManagementBean testBean = (EnrolleManagementBean) namingContext.lookup("java:global/EnrolleeManagementBeanstateful/EnrolleManagementBean");

                   String hi = testBean.hello("client");

                   System.out.println("test: " + testBean);

               }

               catch (Exception e) {

                  System.out.println(e.getMessage());

                  e.printStackTrace();

              }

              

               finally {

                   if(container != null) {

                       container.close();

                   }

               }

         }

             

       

      Thanks

      Advance