Blad : org.hibernate.MappingException: invalid configuration
hibernate.cfg.hml
<?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.dialect">org.hibernate.dialect.MySQLDialect</property>>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/hib</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">xx</property>
<property name="hibernate.show_sql">true</property>
<property name="hdm2ddl.auto">create</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<mapping resource="hiber.hbm.xml"/>
</session-factory>
</hibernate-configuration>
hiber.hbm.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="hiber" table="tab">
<id column="id" type="int" name="id">
<generator class="native"/>
</id>
<property column="imie" name="imie"/>
<property column="nazwisko" name="nazwisko"/>
</class>
</hibernate-mapping>
funkcja:
SessionFactory sF = new Configuration().configure().buildSessionFactory();
Session session = sF.openSession();
session.beginTransaction();
hiber h = new hiber();
h.setImie(this.imie);
h.setNazwisko(this.nazwisko);
session.save(h);
session.getTransaction().commit();
session.close();
Ktos wie co jest zle?
To moj pierwszy kontakt z Hibernate wiec sory za amatorszczyzne.