-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: java.lang.ClassCastException with hibernate-2.1.4
PostPosted: Thu Jun 10, 2004 3:13 pm 
Beginner
Beginner

Joined: Sun Sep 07, 2003 9:04 am
Posts: 48
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)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 12:40 pm 
Newbie

Joined: Wed Jun 16, 2004 12:37 pm
Posts: 2
I had the same issue until I stopped using the JBossTransactionManagerLookup and used the Hibernate default.

Anyone know why?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2004 1:32 am 
Newbie

Joined: Fri Jun 18, 2004 1:26 am
Posts: 1
[quote="jhowk"]I had the same issue until I stopped using the JBossTransactionManagerLookup and used the Hibernate default.

Anyone know why?[/quote]

I have the same problem, but which is the default strategy to use??? I just delete that property from hibernate.cfg.xml?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.