esta es mi clase :
Código PHP:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package persistencia;
import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.SessionFactory;
/**
*
* @author (((Ju@n)))
*/
public class EventManager {
public static void main(String[]args){
new EventManager();
}
private SessionFactory session;
public EventManager(){
try{
System.out.println("Iniciando Hibernate");
session = new Configuration().
configure().buildSessionFactory();
System.out.println("Finalizando la Iniciacion de Hibernate");
System.exit(0);
}catch(HibernateException ex){
System.out.println(ex.getMessage() + ex.getLocalizedMessage() +
ex.getCause());
// ex.printStackTrace();
}
}
}
Código PHP:
run:
Iniciando Hibernate
06/03/2009 09:20:55 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.5
06/03/2009 09:20:55 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
06/03/2009 09:20:55 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
06/03/2009 09:20:55 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
06/03/2009 09:20:55 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
06/03/2009 09:20:55 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
06/03/2009 09:20:55 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Event.hbm.xml
06/03/2009 09:20:55 PM org.hibernate.util.XMLHelper$ErrorLogger error
GRAVE: Error parsing XML: XML InputStream(8) The content of element type "class" is incomplete, it 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*,resultset*,(query|sql-query)*)".
06/03/2009 09:20:55 PM org.hibernate.util.XMLHelper$ErrorLogger error
GRAVE: Error parsing XML: XML InputStream(16) The content of element type "hibernate-mapping" must match "(meta*,typedef*,import*,(class|subclass|joined-subclass|union-subclass)*,resultset*,(query|sql-query)*,filter-def*,database-object*)".
Could not parse mapping document from resource Event.hbm.xmlCould not parse mapping document from resource Event.hbm.xmlorg.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
GENERACIÓN CORRECTA (tiempo total: 0 segundos)
Event.hbm.xmlorg.hibernate.InvalidMappingException : Could not parse mapping document from invalid mapping
que significa ? o que le falta al Event.hbm.xml es donde hago el mapeo con mi clase