I am new at Hibernate I have a problem with the mapping file:
this is the hibernate configuration
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>
<!-- Database connection settings -->
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://http:localhost/django</property>
<property name="connection.username">root</property>
<property name="connection.password">vilu7240</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">2</property>
<!-- SQL dialect -->
<property
name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property
name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">false</property>
<mapping resource="entities/Categoria.hbm.xml"/><mapping />
<!-- mapping resource="/entities/Autore.hbm.xml"/><mapping /-->
<!-- mapping resource="src/django/entities/Postit.hbm.xml"/><mapping /-->
</session-factory>
</hibernate-configuration>
this is my mapping file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="entities.Catgoria" table="categorie" lazy="false">
<meta attribute="class-description">This class contains category details.</meta>
<id name="categoriaId" type="long" column="id">
<generator class="auto" />
</id>
<property name="categoria" type="string" column="categoria"/>
<key>
<column name="categoriaId" />
</key>
</class>
</hibernate-mapping>
thi is the error that Eclipse reports to me
Quote:
The content of element type "class" must match
"(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-
id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|
component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-
array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-
update?,sql-delete?,filter*,fetch-profile*,resultset*,(query|sql-query)*)".
I should not have so many difficulties for this file, couse is an easy configuration, can someone tell what is my mistake? thanks a lot in advance