4 Replies Latest reply on Aug 13, 2008 10:24 PM by Samuel Doyle

    TestNG problem with Eclipse

    Samuel Doyle Apprentice

      Hello,


      I have followed the instructions specified for the Eclipse TestNG plugin in the readme file within a seam-gen project however, I am getting this exception constantly when trying to run me testcases.


      FATAL [org.hibernate.connection.DatasourceConnectionProvider] Could not find datasource: java:/event-management-toolDatasource
      java.lang.RuntimeException: PROVIDER_URL not provided in jndi.properties.  Automatic discovery not implemented yet.
           at org.jboss.naming.JBossRemotingContextFactory.getInitialContext(JBossRemotingContextFactory.java:158)
           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.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
           at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
           at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
           at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
           at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
           at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
           at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:918)
           at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:656)
           at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
           at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
           at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)



      I have tried various configuration options including specifying the parameters directly instead of using JNDI within the persistence.xml. When I do this however it gives me an exception complaining about No Persistence provider for the persistent unit.


      Thanks for your time.