Como mudar HSQLDB para Mysql?

Obrgado a todos os programadores que sem fins lucrativos vem me ajudando nesse novo mundo que o java, minha pergunta e senhores programadores :

tenho um sistema que usa o Banco HSQLDB, gostaria de testar ele usando Mysql, esse exemplo que me refiro e o exemplo:
http://sourceforge.net/project/showfiles.php?group_id=158027
usa hibernate + Vraptor

  1. em baixo o arquivo do hibernate.cfg.xml, como ficaria esse aquivo para o Mysql?
  2. terei que fazer alguma coisa a mais ?

&lt?xml version=‘1.0’ encoding=‘utf-8’?&gt
<!DOCTYPE hibernate-configuration PUBLIC
“-//Hibernate/Hibernate Configuration DTD 3.0//EN”
http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”>

<hibernate-configuration>

&lt;session-factory&gt;

	&lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.HSQLDialect&lt;/property&gt;
	&lt;property name="hibernate.connection.url"&gt;jdbc:hsqldb:file:mydvdsDB&lt;/property&gt;
	&lt;property name="hibernate.connection.driver_class"&gt;org.hsqldb.jdbcDriver&lt;/property&gt;
	&lt;property name="hibernate.connection.username"&gt;sa&lt;/property&gt;
	&lt;property name="hibernate.connection.password"&gt;&lt;/property&gt;

	&lt;property name="hibernate.show_sql"&gt;false&lt;/property&gt;
	&lt;property name="hibernate.hbm2ddl.auto"&gt;update&lt;/property&gt;
	&lt;property name="hibernate.cache.provider_class"&gt;org.hibernate.cache.HashtableCacheProvider&lt;/property&gt;

	&lt;mapping class="org.vraptor.mydvds.model.Dvd" /&gt;
	&lt;mapping class="org.vraptor.mydvds.model.User" /&gt;

&lt;/session-factory&gt;

</hibernate-configuration>

Olá juniorsatanas, vc só precisará mudar o hibernate-dialect para usar o mysql, por exemplo:

org.hibernate.dialect.MySQLDialect = mysql 

Lembrando que vc deverá mudar tambem o seu “hibernate.connection.driver_class” para usar o driver para o mysql, e o seu
hibernate.connection.url” paera acessar o endereço da nova base.

Espero ter ajudado.

mudei tudo mais nao pega !

Junior,

O que acontece? Dá algum erro? Você criou um database no mysql?

fsquadro, sim eu fiz o BANCO com o mesmo nome, e as tabelas com os mesmos ca,pos.

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:36

root cause

java.lang.ExceptionInInitializerError
org.vraptor.mydvds.dao.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:36)
org.vraptor.mydvds.interceptor.DaoInterceptor.intercept(DaoInterceptor.java:41)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.RegisterAttributesInteceptor.intercept(RegisterAttributesInteceptor.java:3
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.core.VRaptorExecution.execute(VRaptorExecution.java:8
org.vraptor.core.DefaultController.execute(DefaultController.java:42)
org.vraptor.VRaptorServlet.service(VRaptorServlet.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:36

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
Apache Tomcat/5.5.17