[#1218] - Can't use Hibernate Annotations with Hibernate connection

Category:
Bug report
Priority:
High
Status:
Assigned
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

I'm using in my project only annotations to map my classes. When I try to create a hibernate connection in iReport using my hibernate.cfg.xml with <mapping class and <mapping package I get this error:

"An AnnotationConfiguration instance is required to use <mapping clazz="visualcontrol.model.entity.CliFor"/>"

This issue is commented in art2703 and art1499.

I'm using iReport 2.0.4

AttachmentSize
File hibernate.cfg.xml2.27 KB
fmcypriano's picture
Joined: Feb 14 2008 - 7:08pm
Last seen: 15 years 7 months ago

3 Comments:

#1

In artifact art1499 the discussions says that iReport uses AnnotationConfiguration instead of Configuration. But, if this is true this error should not happen.

#2

Attached the hibernate.cfg.xml

#3

Using iReport inside Netbeans I was able to see the exception and be sure that error occurs because iReport don\'t use the AnnotationConfiguration:

org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping clazz="visualcontrol.model.entity.CliFor"/>
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1273)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1235)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1217)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1184)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)
at com.jaspersoft.ireport.designer.connection.JRHibernateConnection$1.run(JRHibernateConnection.java:151)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

Feedback