Sorry but I do not know how to erase my message and now my program goes well.
Hello! can you tell where do you think is my mistake? when I run my program with ant, the logers return this:
[java] 18:04:26,372 INFO Environment:479 - Hibernate 3.1.3
[java] 18:04:26,383 INFO Environment:509 - hibernate.properties not found
[java] 18:04:26,386 INFO Environment:525 - using CGLIB reflection optimizer
[java] 18:04:26,389 INFO Environment:555 - using JDK 1.4 java.sql.Timestamp handling
[java] 18:04:26,464 INFO Configuration:1308 - configuring from resource: /hibernate.cfg.xml
[java] 18:04:26,465 INFO Configuration:1285 - Configuration resource: /hibernate.cfg.xml
[java] 18:04:26,763 INFO Configuration:469 - Reading mappings from resource: configuracion/ConfigurationObject.hbm.xml
[java] 18:04:26,899 INFO HbmBinder:309 - Mapping class: configuracion.ConfigurationObject -> CONFIGURACIONES
[java] 18:04:26,942 INFO Configuration:469 - Reading mappings from resource: configuracion/Event.hbm.xml
[java] 18:04:26,997 INFO HbmBinder:309 - Mapping class: configuracion.Event -> EVENTS
[java] 18:04:27,002 INFO Configuration:1419 - Configured SessionFactory: null
[java] Initial SessionFactory creation failed.org.hibernate.MappingException: property mapping has wrong number of columns: configuracion.ConfigurationObject.config type: object
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at configuracion.ConfigManager.createAndStoreEvent(Unknown Source)
[java] at configuracion.Principio2.main(Unknown Source)
[java] Caused by: org.hibernate.MappingException: property mapping has wrong number of columns: configuracion.ConfigurationObject.config type: object
[java] at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:396)
[java] at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
[java] at org.hibernate.cfg.Configuration.validate(Configuration.java:984)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1169)
[java] ... 3 more
[java] Java Result: 1
In this program I use the same hbm.xml files than in other programs that run right!
Thank you very much for your help
|