now i get this error
13:06:01,672 INFO Environment:432 - Hibernate 2.1.1
13:06:01,702 INFO Environment:466 - loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.filename=/WEB-INF/lib/mysql-connector-java-3.0.10-stable-bin.jar, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/test, hibernate.connection.driver_class=com.mysql.jdbc.Driver}
13:06:01,702 INFO Environment:481 - using CGLIB reflection optimizer
13:06:01,722 INFO Configuration:318 - Mapping resource: test/hibernate/Product.hbm.xml
13:06:01,993 INFO Binder:225 - Mapping class: test.hibernate.Product -> products
13:06:02,103 INFO Configuration:584 - processing one-to-many association mappings
13:06:02,103 INFO Configuration:593 - processing one-to-one association property references
13:06:02,103 INFO Configuration:618 - processing foreign key constraints
13:06:02,133 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect
13:06:02,133 INFO SettingsFactory:62 - Use outer join fetching: true
13:06:02,143 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
13:06:02,143 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
13:06:02,153 INFO DriverManagerConnectionProvider:71 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/test
13:06:02,153 INFO DriverManagerConnectionProvider:72 - connection properties: {user=root, password=}
13:06:02,173 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
13:06:02,433 INFO SettingsFactory:89 - Use scrollable result sets: true
13:06:02,433 INFO SettingsFactory:90 - JDBC 2 max batch size: 15
13:06:02,433 INFO SettingsFactory:99 - Query language substitutions: {}
13:06:02,433 INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
13:06:02,433 INFO Configuration:1057 - instantiating and configuring caches
13:06:02,604 INFO SessionFactoryImpl:119 - building session factory
13:06:03,094 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
[Product] milk(null) price=1.99 amount=100
java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:312)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:325)
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:333)
at test.InsertProduct.main(InsertProduct.java:29)
Exception in thread "main"
|