-->
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: Hibernate Tools Suite - ClassCastException
PostPosted: Sat Jan 08, 2011 6:40 am 
Beginner
Beginner

Joined: Thu Mar 27, 2008 8:49 am
Posts: 27
I recently did a re-install of my machine, I have tried the copy of the Hibernate Tools Suite that was on my old machine, as well as a new copy. I have also deleted the old configuration folder, and started again. I am getting this error when I try to connect:

Code:
java.lang.ClassCastException: org.hibernate.cfg.Configuration cannot be cast to org.hibernate.cfg.Configuration
   at net.java.dev.hts.SessionFactoryDescriptor.createConfiguration(SessionFactoryDescriptor.java:439)
   at net.java.dev.hts.SessionFactoryDescriptor.openSession(SessionFactoryDescriptor.java:469)
   at net.java.dev.hts.SessionFactoryDescriptor.access$000(SessionFactoryDescriptor.java:54)
   at net.java.dev.hts.SessionFactoryDescriptor$1.run(SessionFactoryDescriptor.java:413)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)


Does any one have any suggestions for getting this working. I installed the OS twice, and each time I had the same problem.


Top
 Profile  
 
 Post subject: Re: Hibernate Tools Suite - ClassCastException
PostPosted: Mon Jan 10, 2011 8:52 am 
Beginner
Beginner

Joined: Thu Mar 27, 2008 8:49 am
Posts: 27
Pretty please?


Top
 Profile  
 
 Post subject: Re: Hibernate Tools Suite - ClassCastException
PostPosted: Sat Jan 15, 2011 11:26 am 
Beginner
Beginner

Joined: Thu Mar 27, 2008 8:49 am
Posts: 27
OK, this was simple enough in the end. The distribution of the Hibernate Tools Suite included a copy of hibernate3.jar, and I had also added the one in my app to the classpath within HTS. I simply removed the entry I added, and everything was fine. This must have been a classloader issue.


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.