G'Day all,
I have been trying to run the tutorial in Chapter 2 of the Hibernate reference that ships with Hibernate. When I run the tutorial, I get the following output
bash-2.05b$ ant run -Daction=store
Buildfile: build.xml
clean:
[delete] Deleting directory /home/craig/workspace/HibernateTutorial/bin
[mkdir] Created dir: /home/craig/workspace/HibernateTutorial/bin
copy-resources:
[copy] Copying 6 files to /home/craig/workspace/HibernateTutorial/bin
compile:
[javac] Compiling 3 source files to /home/craig/workspace/HibernateTutorial/bin
run:
[java] 14:30:51,539 INFO Environment:464 - Hibernate 3.0.3
[java] 14:30:51,546 INFO Environment:477 - hibernate.properties not found
[java] 14:30:51,551 INFO Environment:510 - using CGLIB reflection optimizer
[java] 14:30:51,554 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
[java] 14:30:51,678 INFO Configuration:1160 - configuring from resource: /hibernate.cfg.xml
[java] 14:30:51,679 INFO Configuration:1131 - Configuration resource: /hibernate.cfg.xml
[java] 14:30:51,810 INFO Configuration:441 - Mapping resource: Event.hbm.xml
[java] 14:30:51,973 INFO HbmBinder:258 - Mapping class: Event -> EVENTS
[java] 14:30:52,019 INFO Configuration:1272 - Configured SessionFactory: null
[java] 14:30:52,021 INFO Configuration:852 - processing extends queue
[java] 14:30:52,022 INFO Configuration:856 - processing collection mappings
[java] 14:30:52,023 INFO Configuration:865 - processing association property references
[java] 14:30:52,025 INFO Configuration:894 - processing foreign key constraints
[java] 14:30:52,155 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
[java] 14:30:52,156 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
[java] 14:30:52,157 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
[java] 14:30:52,162 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:data/tutorial
[java] 14:30:52,163 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
[java] 14:30:52,677 INFO SettingsFactory:72 - RDBMS: HSQL Database Engine, version: 1.7.2
[java] 14:30:52,678 INFO SettingsFactory:73 - JDBC driver: HSQL Database Engine Driver, version: 1.7.2
[java] 14:30:52,714 INFO Dialect:92 - Using dialect: org.hibernate.dialect.HSQLDialect
[java] 14:30:52,732 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
[java] 14:30:52,738 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[java] 14:30:52,739 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
[java] 14:30:52,740 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
[java] 14:30:52,741 INFO SettingsFactory:137 - JDBC batch size: 15
[java] 14:30:52,745 INFO SettingsFactory:140 - JDBC batch updates for versioned data: disabled
[java] 14:30:52,748 INFO SettingsFactory:145 - Scrollable result sets: enabled
[java] 14:30:52,749 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
[java] 14:30:52,750 INFO SettingsFactory:161 - Connection release mode: null
[java] 14:30:52,757 INFO SettingsFactory:188 - Default batch fetch size: 1
[java] 14:30:52,758 INFO SettingsFactory:192 - Generate SQL with comments: disabled
[java] 14:30:52,759 INFO SettingsFactory:196 - Order SQL updates by primary key: disabled
[java] 14:30:52,761 INFO SettingsFactory:321 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[java] 14:30:52,765 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
[java] 14:30:52,767 INFO SettingsFactory:204 - Query language substitutions: {}
[java] 14:30:52,768 INFO SettingsFactory:210 - Second-level cache: enabled
[java] 14:30:52,769 INFO SettingsFactory:214 - Query cache: disabled
[java] 14:30:52,771 INFO SettingsFactory:308 - Cache provider: org.hibernate.cache.EhCacheProvider
[java] 14:30:52,874 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
[java] 14:30:52,875 INFO SettingsFactory:238 - Structured second-level cache entries: enabled
[java] 14:30:52,969 INFO SettingsFactory:258 - Echoing all SQL to stdout
[java] 14:30:52,970 INFO SettingsFactory:262 - Statistics: disabled
[java] 14:30:52,971 INFO SettingsFactory:266 - Deleted entity synthetic identifier rollback: disabled
[java] 14:30:52,973 INFO SettingsFactory:280 - Default entity-mode: pojo
[java] Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/objectweb/asm/Type
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at HibernateUtil.<clinit>(Unknown Source)
[java] at EventManager.createAndStoreEvent(Unknown Source)
[java] at EventManager.main(Unknown Source)
[java] Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type
[java] at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180)
[java] at net.sf.cglib.core.KeyFactory.<clinit>(KeyFactory.java:66)
[java] at org.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:319)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
[java] ... 3 more
[java] 14:30:53,216 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:data/tutorial
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 4 seconds
I have followed the tutorial to the letter, and I have checked that the jar files are indeed in the lib directory. I have searched the web for similar instances, and I am at a loss.
Any suggestions, tips, pointers, etc will be appreciated.
Thanking you in advance for your help,
Craig.
|