7 Replies Latest reply on Apr 29, 2007 12:24 AM by Surya De

    Any Help? Run booking example out of container error.

    shaucle dustin Newbie

      When I run booking example as unit test (out of container), it failed, it cost me two days, I googled that, and only found 2 similar results, but not resolved. (Sorry for my english)
      Any advice is appreciate.

      Here are some of the logs:

      [java] 23:22:54,078 INFO [Initialization] done initializing Seam
      [java] 23:22:54,109 INFO [Version] Hibernate EntityManager 3.2.0.CR1
      [java] 23:22:54,140 INFO [Version] Hibernate Annotations 3.2.0.CR1
      [java] 23:22:54,140 INFO [Environment] Hibernate 3.2 cr2
      [java] 23:22:54,156 INFO [Environment] hibernate.properties not found
      [java] 23:22:54,156 INFO [Environment] Bytecode provider name : cglib
      [java] 23:22:54,156 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      [java] 23:22:54,593 FATAL [Ejb3Configuration] jndi.propertiesO-:-Ofalse
      [java] 23:22:54,593 FATAL [Ejb3Configuration] META-INF/ejb-jar.xmlO-:-Ofalse
      [java] 23:22:54,593 FATAL [Ejb3Configuration] META-INF/jboss-beans.xmlO-:-Ofalse
      [java] 23:22:54,593 FATAL [Ejb3Configuration] META-INF/MANIFEST.MFO-:-Ofalse
      [java] 23:22:54,609 FATAL [Ejb3Configuration] META-INF/persistence.xmlO-:-Ofalse
      [java] 23:22:54,640 FATAL [Ejb3Configuration] org/jboss/seam/example/booking/test/testng.xmlO-:-Ofalse
      [java] 23:22:54,734 INFO [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.booking.User
      [java] 23:22:54,796 INFO [EntityBinder] Bind entity org.jboss.seam.example.booking.User on table Customer
      [java] 23:22:54,828 INFO [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.booking.Bookin
      [java] 23:22:54,828 INFO [EntityBinder] Bind entity org.jboss.seam.example.booking.Booking on table Booking
      [java] 23:22:54,843 INFO [AnnotationBinder] Binding entity from annotated class: org.jboss.seam.example.booking.Hotel
      [java] 23:22:54,843 INFO [EntityBinder] Bind entity org.jboss.seam.example.booking.Hotel on table Hotel
      [java] 23:22:55,031 INFO [NamingHelper] JNDI InitialContext properties:{}
      [java] 23:22:55,062 ERROR [NamingHelper] Could not obtain initial context
      [java] javax.naming.NamingException: Local server is not initialized
      [java] at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
      [java] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
      [java] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
      [java] at javax.naming.InitialContext.init(InitialContext.java:223)
      [java] at javax.naming.InitialContext.(InitialContext.java:175)
      [java] at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:28)
      [java] at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
      [java] at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:1
      [java] at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
      [java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
      [java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
      [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
      [java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
      [java] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
      [java] at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
      [java] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
      [java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
      [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
      [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
      [java] at org.jboss.seam.example.booking.test.BookingUnitTest.testHotelSearching(BookingUnitTest.java:46)
      [java] at org.jboss.seam.example.booking.test.BookingUnitTest.main(BookingUnitTest.java:28)
      [java] Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not f
      rce
      [java] at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217)
      [java] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
      [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
      [java] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
      [java] at org.jboss.seam.example.booking.test.BookingUnitTest.testHotelSearching(BookingUnitTest.java:46)
      [java] at org.jboss.seam.example.booking.test.BookingUnitTest.main(BookingUnitTest.java:28)