[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: No Persistence provider for EntityManager

dheerajsega do-not-reply at jboss.com
Tue Oct 30 17:06:47 EDT 2007


When I gave correct persistence unit name ..the following errors occured..




javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not find datasource
	at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217)
	at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
	at 
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:529)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:311)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:149)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:77)
	at org.testng.TestRunner.privateRun(TestRunner.java:614)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:221)
	at org.testng.SuiteRunner.run(SuiteRunner.java:147)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:576)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:539)
	at org.testng.TestNG.run(TestNG.java:316)
	at org.testng.TestNG.privateMain(TestNG.java:666)
	at org.testng.TestNG.main(TestNG.java:608)
Caused by: org.hibernate.HibernateException: Could not find datasource
	at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
	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:61)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
	at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
	at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
	at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
	... 21 more
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.(InitialContext.java:175)
	at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:28)
	at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
	... 30 more




javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'user'
	at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:52)
	at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:75)
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
	at org.jboss.seam.util.UnifiedELValueBinding.getValue(UnifiedELValueBinding.java:34)
	at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:69)
	at org.jboss.seam.core.Expressions.validate(Expressions.java:223)
	at org.jboss.seam.mock.SeamTest$Request.validateValue(SeamTest.java:383)
	at AuthenticatorTest$1.processValidations(AuthenticatorTest.java:42)
	at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:465)
	at 
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:529)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:398)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:625)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:88)
	at org.testng.TestRunner.privateRun(TestRunner.java:614)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:221)
	at org.testng.SuiteRunner.run(SuiteRunner.java:147)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:576)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:539)
	at org.testng.TestNG.run(TestNG.java:316)
	at org.testng.TestNG.privateMain(TestNG.java:666)
	at org.testng.TestNG.main(TestNG.java:608)


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100441#4100441

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100441



More information about the jboss-user mailing list