I downloaded caveatemptor.HiA-SE-3.1alpha1.zip Hibernate sample and build a Web project using Eclipse Eclispe3.1M6. I got the following exception when I tried to run UserTest to export the Database schema. The Eclipse is defined to use JDK1.5 already. Any clue? Thanks
17:03:56,355 INFO Environment: Hibernate 3.1alpha1
17:03:56,355 INFO Environment: hibernate.properties not found
17:03:56,371 INFO Environment: using CGLIB reflection optimizer
17:03:56,371 INFO Environment: using JDK 1.4 java.sql.Timestamp handling
17:03:56,449 INFO Configuration: configuring from resource: /hibernate.cfg.xml
17:03:56,449 INFO Configuration: Configuration resource: /hibernate.cfg.xml
17:03:56,605 INFO AnnotationConfiguration: Mapping package org.hibernate.ce.auction.persistence
17:03:56,668 ERROR HibernateUtil: Building SessionFactory failed.
java.lang.ClassFormatError: Illegal class modifiers in class org/hibernate/ce/auction/persistence/package-info: 0x1600
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
at org.hibernate.cfg.AnnotationBinder.bindPackage(AnnotationBinder.java:157)
at org.hibernate.cfg.AnnotationConfiguration.addPackage(AnnotationConfiguration.java:112)
at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:256)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1201)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1183)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1159)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1088)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1074)
at org.hibernate.ce.auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:34)
at org.hibernate.ce.auction.test.UserTest.main(UserTest.java:44)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.hibernate.ce.auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:41)
at org.hibernate.ce.auction.test.UserTest.main(UserTest.java:44)
Caused by: java.lang.ClassFormatError: Illegal class modifiers in class org/hibernate/ce/auction/persistence/package-info: 0x1600
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
at org.hibernate.cfg.AnnotationBinder.bindPackage(AnnotationBinder.java:157)
at org.hibernate.cfg.AnnotationConfiguration.addPackage(AnnotationConfiguration.java:112)
at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:256)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1201)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1183)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1159)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1088)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1074)
at org.hibernate.ce.auction.persistence.HibernateUtil.<clinit>(HibernateUtil.java:34)
... 1 more
|