
02/06/2007, 05:26
|
 | | | Fecha de Ingreso: abril-2007 Ubicación: Salamanca
Mensajes: 254
Antigüedad: 17 años, 9 meses Puntos: 0 | |
Re: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping proyecto. pongo el mapeo en hibernte.cfg.xml:
<mapping resource="proyecto/hibernate/Usuario.hbm.xml"></mapping>
<mapping resource="proyecto/hibernate/Cliente.hbm.xml" />
<mapping resource="proyecto/hibernate/Expediente.hbm.xml" />
<mapping resource="proyecto/hibernate/Variables.hbm.xml" />
<mapping resource="proyecto/hibernate/Contacto.hbm.xml" />
<mapping resource="proyecto/hibernate/Actuaciones.hbm.xml" />
<mapping resource="proyecto/hibernate/Ingresos.hbm.xml" />
<mapping resource="proyecto/hibernate/Factura.hbm.xml" />
<mapping resource="proyecto/hibernate/Escritos.hbm.xml" />
<mapping resource="proyecto/hibernate/Gastos.hbm.xml" />
ahorta viene lo mejor, el resulatdo de ejecutar lo mismo unas cuantas veces, el error es el mismo pero la causa no:
1.- %%%% Error Creating SessionFactory %%%%
org.hibernate.PropertyNotFoundException: Could not find a getter for numGasto in class proyecto.hibernate.Gastos y por eso la session es nula y me dice lo del puntero
2.- %%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource: proyecto/hibernate/Usuario.hbm.xml
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping proyecto.hibernate.Usuario
si en la primera ejecucion no uso los gastos para nada no entiendo el error. y para la segunda he mirado que no haya 2 ficheros iguales y el mapping ya lo veis
no se que le pasa |