Pessoal, estou tentando trabalhar com hibernate aqui, criei o schema do banco no mysql, e marquei nas configurações, pro hibernate criar as tabelas só que venho enfrentando esse probleminha acima… criei uma classe pra mapear, apenas pra fazer alguns testes da seguinte forma:
CategoriaModel.java
[code]import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="CategoriaModel")
public class CategoriaModel {
@Id
private int codigo;
private int tipo;
private int quantidadeMaxima;
private Double valorHora;
private Double valorDiaria;
private Double valorMensalidade;
//…continua[/code]
e o meu arquivo de configuração da seguinte forma:
hibernateconfig.xml
[code]<?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 name="">
<property name=“hibernate.connection.driver_class”>org.gjt.mm.mysql.Driver
</property>
<property name=“hibernate.connection.url”>jdbc:mysql://localhost:3306/db
</property>
<property name=“hibernate.connection.username”>root</property>
<property name=“hibernate.connection.password”>nxsinter</property>
<property name=“hibernate.hbm2ddl.auto”>create</property>
<mapping class=“br.com.estacdione.CategoriaModel”/>
</session-factory>
</hibernate-configuration>[/code]
No entanto, tenho as seguintes msg de erro:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: org.hibernate.MappingException: invalid configuration
Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.