[jboss-user] [JBoss Seam] - Re: can't find datasource problem when mirgrate from seam1.2

tangdazhu do-not-reply at jboss.com
Thu Nov 29 22:02:38 EST 2007


I forgot to tell that i was trying under the tomcat6 with embedded jboss, And i also tried to deploy hibernate example in the Seam2 into tomcat6, but with the same exceptions:

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.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
	at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
	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:915)
	at org.jboss.seam.persistence.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:165)
	at org.jboss.seam.persistence.HibernateSessionFactory.startup(HibernateSessionFactory.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
	at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
	at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
	at org.jboss.seam.Component.newInstance(Component.java:1968)
	at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
	at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
	at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
	at org.jboss.seam.init.Initialization.init(Initialization.java:555)
	at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
	at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
	at org.jboss.embedded.tomcat.jndi.ENCFactory.getObjectInstance(ENCFactory.java:73)
	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
	at javax.naming.spi.NamingManager.getContext(NamingManager.java:422)
	at javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:38)
	at javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:770)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:718)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:590)
	at javax.naming.InitialContext.lookup(InitialContext.java:351)
	at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
	... 47 more

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

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



More information about the jboss-user mailing list