Bookmark Topic Watch Topic
  • New Topic

Cannot Open Connection problem in Hibernate + MySQL + Tomcat

 
Saravanamuthu Krishnan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi
I am a beginner to hibernate. I have prefered to use hibernate with tomcat and mysql.

I have done all things that are all to integrate hibernate and mysql. But i got an error.

org.hibernate.exception.GenericJDBCException: Cannot open connection

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/hibernatetutorial</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">syncro</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<mapping resource="contact.hbm.xml"/>
</session-factory>
</hibernate-configuration>
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!