Como el título indica la excepción que me da es esta:
Código:
org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/persona/Persona.hbm.xml
Aquí muesto el hibernate.cfg.xml y el Persona.hbm.xml:
hibernate.cfg.xml
Código:
<?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.cache.use_minimal_puts">true</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/prueba</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<mapping resource="com/persona/Persona.hbm.xml" />
</session-factory>
</hibernate-configuration>
Persona.hbm.xml
Código:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 26-ago-2009 11:06:38 by Hibernate Tools 3.2.0.beta7 -->
<hibernate-mapping>
<class name="Persona" table="persona" catalog="prueba">
<comment></comment>
<id name="id" type="int">
<column name="id" />
<generator class="assigned" />
</id>
<property name="nombre" type="string">
<column name="nombre" length="30">
<comment></comment>
</column>
</property>
<property name="apellidos" type="string">
<column name="apellidos" length="60">
<comment></comment>
</column>
</property>
<property name="telefono" type="java.lang.Integer">
<column name="telefono">
<comment></comment>
</column>
</property>
</class>
</hibernate-mapping>
Espero sus respuestas. Gracias.