ENV: Tomcat 5.5.17, Eclipse 3.2, Hibernate 3.2

The application runs in Eclipse, but not "standalone" in Tomcat
What does Tomcat need to find the datasource?
Error:
13:09:03,936  INFO NamingHelper:26 - JNDI InitialContext properties:{}
13:09:03,936 FATAL DatasourceConnectionProvider:55 - Could not find datasource: java:comp/env/jdbc/hfydb
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>

<hibernate-configuration>
<session-factory>
        <!-- Use a Tomcat 5.5 JNDI datasource - see Context.xml -->
        <property name="connection.datasource">
                java:comp/env/jdbc/hfydb
        </property>

        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">true</property>
        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

        <!-- Drop and re-create the database schema on startup -->
        <property name="hibernate.hbm2ddl.auto">update</property>

        <!-- Mapping files -->
        <mapping resource="mapping/tutorial.hbm.xml"/>
        <mapping resource="mapping/office.hbm.xml"/>
        <mapping resource="mapping/property.hbm.xml"/>
        <mapping resource="mapping/address.hbm.xml"/>
        <mapping resource="mapping/room.hbm.xml"/>
        <mapping resource="mapping/type.hbm.xml"/>
</session-factory>
</hibernate-configuration>


13:09:03,936  INFO NamingHelper:26 - JNDI InitialContext properties:{}
13:09:03,936 FATAL DatasourceConnectionProvider:55 - Could not find datasource: java:comp/env/jdbc/hfydb
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
        at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
        at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) 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:397)
        at 
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
        at 
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
        at tomcatJndi.HibernateUtil.<clinit>(HibernateUtil.java:27)
        at action.SearchPropertyAction.execute(SearchPropertyAction.java:35)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

_________________________________________________________________
Say hello to the next generation of Search. Live Search – try it now. http://www.live.com/?mkt=en-ca


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to