java.lang.ClassCastException with hibernate-2.1.4
I have made small program but when I run it inside eclipse I get the following error.
please somebody help.
21:10:35,784 INFO Environment:462 - Hibernate 2.1.3
21:10:35,804 INFO Environment:496 - loaded properties from resource hibernate.properties: {hibernate.connection.username=system, hibernate.connection.password=sofus1, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.OracleDialect, hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:pusdb, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver}
21:10:35,824 INFO Environment:519 - using CGLIB reflection optimizer
21:10:35,834 INFO Configuration:872 - configuring from resource: /hibernate.cfg.xml
21:10:35,834 INFO Configuration:844 - Configuration resource: /hibernate.cfg.xml
21:10:37,246 INFO Configuration:328 - Mapping resource: Flights.hbm.xml
21:10:37,446 INFO Binder:229 - Mapping class: TEST.Flights -> FLIGHTS
21:10:37,616 INFO Configuration:328 - Mapping resource: Persons.hbm.xml
21:10:37,676 INFO Binder:229 - Mapping class: TEST.Persons -> PERSONS
21:10:37,676 INFO Configuration:328 - Mapping resource: Reservations.hbm.xml
21:10:37,746 INFO Binder:229 - Mapping class: TEST.Reservations -> RESERVATIONS
21:10:38,057 INFO Configuration:1030 - Configured SessionFactory: null
21:10:38,057 INFO Configuration:613 - processing one-to-many association mappings
21:10:38,067 INFO Binder:1168 - Mapping collection: TEST.Flights.RESERVATIONSSet -> RESERVATIONS
21:10:38,067 INFO Binder:1168 - Mapping collection: TEST.Persons.RESERVATIONSSet -> RESERVATIONS
21:10:38,067 INFO Configuration:622 - processing one-to-one association property references
21:10:38,077 INFO Configuration:647 - processing foreign key constraints
21:10:38,127 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.OracleDialect
21:10:38,137 INFO SettingsFactory:62 - Use outer join fetching: true
21:10:38,157 INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
21:10:38,157 INFO DriverManagerConnectionProvider:43 - Hibernate connection pool size: 20
21:10:38,227 INFO DriverManagerConnectionProvider:77 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:pusdb
21:10:38,227 INFO DriverManagerConnectionProvider:78 - connection properties: {user=system, password=sofus1}
21:10:38,237 INFO TransactionFactoryFactory:31 - Transaction strategy: net.sf.hibernate.transaction.JBossTransactionManagerLookup
java.lang.ClassCastException
at net.sf.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(TransactionFactoryFactory.java:34)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:65)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1132)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:766)
at TEST.base._BaseRootDAO.initialize(_BaseRootDAO.java:53)
at TEST.base._BaseRootDAO.initialize(_BaseRootDAO.java:37)
at test4.main(test4.java:36)
|