-->
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.  [ 6 posts ] 
Author Message
 Post subject: ClassCastException when using annotations alpha 4
PostPosted: Thu Mar 03, 2005 9:14 pm 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
When I execute "new AnnotationConfiguration().configure().buildSessionFactory();" the following exception occurs:

java.lang.ClassCastException: [Lorg.hibernate.cfg.Ejb3Column;
org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:717)
org.hibernate.cfg.AnnotationBinder.processElementsOfAClass(AnnotationBinder.java:532)
org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:382)
org.hibernate.cfg.AnnotationConfiguration.addAnnotatedClass(AnnotationConfiguration.java:44)
org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:182)
org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1353)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1335)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1302)
org.hibernate.cfg.Configuration.configure(Configuration.java:1230)
org.hibernate.cfg.Configuration.configure(Configuration.java:1216)
com.be.desktopbeautifier.servlet.DefaultServlet.init(DefaultServlet.java:47)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)

Any ideas?


Top
 Profile  
 
 Post subject: Re: ClassCastException when using annotations alpha 4
PostPosted: Thu Mar 03, 2005 10:11 pm 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
This turns out to be caused by the fact that I used a @Column annotation with a @ManyToOne annotation instead of @JoinColumn as expected.

Can someone from the Hibernate team please revisit this issue and ensure that Hibernate throws a cleaner error message?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 3:25 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is an alpha quality release and I currently don't manage user error.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 3:37 pm 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
emmanuel wrote:
This is an alpha quality release and I currently don't manage user error.


I understand but should I file a RFE for future releases?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 3:40 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Go ahead

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 05, 2005 4:57 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I did fix this one today in CVS

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.