1 Reply Latest reply on Apr 27, 2006 4:59 AM by Dan Liu

    Entity test stopped working when update to rc2.

    Dan Liu Apprentice

      It worked fine with seam beta 2. Here is the error:

      ERROR 26-04 23:54:30,359 (NamingHelper.java:getInitialContext:33) -Could not obtain initial context
      javax.naming.NamingException: Local server is not initialized
      at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)


      Here is my test code.

      Map<String, String> params = new HashMap<String, String>();
      
       if (emf == null) {
       emf = Persistence.createEntityManagerFactory(getDataSource(), params);
       }
      
       em = emf.createEntityManager();
       em.getTransaction().begin();
      


      Any idea?

        • 1. Re: Entity test stopped working when update to rc2.
          Dan Liu Apprentice

          Local Server is not initialized.

          Caused by: javax.naming.NamingException: Local server is not initialized
           at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
           at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
           at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
           at javax.naming.InitialContext.init(InitialContext.java:223)
           at javax.naming.InitialContext.<init>(InitialContext.java:175)
           at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:28)
           at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:23)