May someone help find the cause of this problem?
I am using the tutorial.
best regards
16:58:42,704 INFO Environment:500 - Hibernate 3.2.0 16:58:42,782 INFO Environment:518 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.max_fetch_depth=1, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.username=sa, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.url=jdbc:hsqldb:./build/db/hsqldb/hibernate, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1} 16:58:42,782 INFO Environment:549 - using java.io streams to persist binary types 16:58:42,782 INFO Environment:667 - Bytecode provider name : cglib 16:58:42,798 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling 16:58:42,922 INFO Configuration:1350 - configuring from resource: /hibernate.cfg.xml 16:58:42,922 INFO Configuration:1327 - Configuration resource: /hibernate.cfg.xml 16:58:43,078 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] 16:58:43,078 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ 16:58:43,078 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath 16:58:43,172 DEBUG Configuration:1311 - connection.driver_class=org.postgresql.Driver 16:58:43,172 DEBUG Configuration:1311 - connection.url=jdbc:hsqldb:hsql://192.168.1.28/HibernateTest 16:58:43,172 DEBUG Configuration:1311 - connection.username=postgres 16:58:43,172 DEBUG Configuration:1311 - connection.password= 16:58:43,172 DEBUG Configuration:1311 - connection.pool_size=1 16:58:43,453 DEBUG Configuration:1311 - dialect=org.hibernate.dialect.PostgreSQLDialect 16:58:43,453 DEBUG Configuration:1311 - current_session_context_class=thread 16:58:43,453 DEBUG Configuration:1311 - cache.provider_class=org.hibernate.cache.NoCacheProvider 16:58:43,453 DEBUG Configuration:1311 - show_sql=true 16:58:43,453 DEBUG Configuration:1510 - null<-org.dom4j.tree.DefaultAttribute@36eb8241 [Attribute: name resource value "events/Event.hbm.xml"] 16:58:43,468 INFO Configuration:507 - Reading mappings from resource: events/Event.hbm.xml 16:58:43,468 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] 16:58:43,468 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ 16:58:43,468 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath 16:58:43,983 INFO HbmBinder:300 - Mapping class: Event -> EVENTS Initial SessionFactory creation failed.org.hibernate.InvalidMappingException: Could not parse mapping document from resource events/Event.hbm.xml Exception in thread "main" java.lang.ExceptionInInitializerError at util.HibernateUtil.<clinit>(HibernateUtil.java:28) at events.EventManager.listEvents(EventManager.java:51) at events.EventManager.main(EventManager.java:31) Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource events/Event.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:523) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432) at org.hibernate.cfg.Configuration.configure(Configuration.java:1352) at org.hibernate.cfg.Configuration.configure(Configuration.java:1338) at util.HibernateUtil.<clinit>(HibernateUtil.java:24) ... 2 more Caused by: org.hibernate.MappingException: class Event not found while looking for property: id at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:74) at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276) at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:401) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:334) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144) at org.hibernate.cfg.Configuration.add(Configuration.java:424) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465) at org.hibernate.cfg.Configuration.addResource(Configuration.java:520) ... 9 more Caused by: java.lang.ClassNotFoundException: Event at java.net.URLClassLoader.findClass(URLClassLoader.java:375) at java.lang.ClassLoader.loadClass(ClassLoader.java:562) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:442) at java.lang.ClassLoader.loadClass(ClassLoader.java:494) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100) at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:70) ... 17 more
|