Sorry for not posting the config file. Here is the contents of the file:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-configuration PUBLIC

            "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

            "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

    <session-factory>

        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>

        <property name="hibernate.connection.password">password</property>

        <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/dbname?autoReconnect=true</property>

        <property name="hibernate.connection.username">username</property>

        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

    </session-factory>

</hibernate-configuration>

 

I did put the hibernate.cfg.xml in the WEB-INF/classes directory and added a hibernate.properties file as well.

Hope this gives you a better idea of what I am doing wrong.

 

Thanks for your help.

Johan

 

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Bobby Quinne
Sent: Tuesday, August 15, 2006 7:40 AM
To: [email protected]
Subject: [CTJUG Forum] Re: Hibernate and Tomcat and Eclipse

 

Is your hibernate.cfg.xml configured to use a JNDI lookup for the datasource?  That would be my suspicion given the lack of an config in the post.

On 8/15/06, Johan Meyer <[EMAIL PROTECTED]> wrote:

Hallo all

I am looking for help using Hibernate with Eclipse and tomcat. I found the following plugin: Hibernate Tools 3.2.0.beta6a but for some reason when I run the generated code using Tomcat I keep on getting the following error: javax.naming.NameNotFoundException: Name SessionFactory is not bound in this Context.

 

I have no idea how to fix this error. Any ideas?

Thanks

 

Johan Meyer


UUNET Bandwidth Barn
Buitengracht Center
125 Buitengracht Street - Fourth Floor
Cape Town, 8001
South Africa

Tel:
  +27 83 302 4749
Fax: +27 21 409 7050
Web: www.nellymoser.com

 

 

 


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.9/417 - Release Date: 8/11/2006




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.10/418 - Release Date: 8/14/2006

Reply via email to