E aí pessoal, sou eu denovo com problemas com hibernate
Acontece o seguinte …
Minha classe:
/*
- teste.java
- Created on 10 de Agosto de 2004, 21:49
*/
package br.com.priori.expert.teste;
import xdoclet.modules.hibernate.HibernateDocletTask;
import net.sf.hibernate.tool.hbm2ddl.SchemaExportTask;
import net.sf.hibernate.MappingException;
import net.sf.hibernate.cfg.Configuration;
import net.sf.hibernate.SessionFactory;
import net.sf.hibernate.Session;
import net.sf.hibernate.HibernateException;
/**
*
-
@author Fernando
*/
public class teste {public static void main(String args[]){
try{
Configuration cfg = new Configuration().addClass(br.com.priori.expert.dado.Objetivo.class);
SessionFactory factory = cfg.buildSessionFactory();
factory.close();
Session s = factory.openSession();
System.out.println(s.toString());
s.close();
} catch (MappingException e){
System.out.println(e.getMessage());
}
catch (HibernateException e){
System.out.println(e.getMessage());
}
}
}
E gera o seguinte erro:
Error reading resource: br/com/priori/expert/dado/Objetivo.hbm.xml
Mas o qruivo esta lah, na mesma pasta q o arquvo class e estah assim:
<?xml version=“1.0”?>
<!DOCTYPE hibernate-mapping PUBLIC
“-//Hibernate/Hibernate Mapping DTD 2.0//EN”
“http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd”>
<hibernate-mapping>
<class
name=“br.com.priori.expert.dado.Objetivo”
table=“Objetivo”
dynamic-update=“false”
dynamic-insert=“false”
>
<id
name="codigo"
column="Codigo"
type="long"
>
<generator class="increment">
</generator>
</id>
<property
name="nome"
type="string"
update="true"
insert="true"
access="property"
column="Nome"
/>
<property
name="descricao"
type="string"
update="true"
insert="true"
access="property"
column="Descricao"
/>
<property
name="observacao"
type="string"
update="true"
insert="true"
access="property"
column="Observacao"
/>
<property
name="cadasto"
type="java.sql.Date"
update="true"
insert="true"
access="property"
column="Cadastro"
/>
<property
name="operador"
type="long"
update="true"
insert="true"
access="property"
column="Operador"
/>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Objetivo.xml
containing the additional properties and place it in your merge dir.
-->
</class>
</hibernate-mapping>
Alguem sabe me dizer oq pode ser?
Obrigadão!