[
http://opensource.atlassian.com/projects/hibernate/browse/HCANN-29?page=c...
]
Emmanuel Bernard moved HHH-4275 to HCANN-29:
--------------------------------------------
Affects Version/s: (was: 3.5.3)
3.2.0
Component/s: (was: annotations)
Key: HCANN-29 (was: HHH-4275)
Project: Hibernate Commons Annotations (was: Hibernate Core)
Avoid chocking on weird types when property is marked as transient /
@Transient
-------------------------------------------------------------------------------
Key: HCANN-29
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HCANN-29
Project: Hibernate Commons Annotations
Issue Type: Bug
Affects Versions: 3.2.0
Environment: Hibernate 3.2.X, no database needed (happens during factory build
before connecting to db)
Reporter: Clint Popetz
Attachments: propertyTypeExtractorBug.tar.gz
The following source:
@javax.persistence.Entity
public class TestEntity {
@javax.persistence.Id
public int Id;
public java.util.ArrayList<Object[]> badMethod() { return null; }
public static void main(String args[]) {
new
org.hibernate.cfg.AnnotationConfiguration().addAnnotatedClass(TestEntity
.class).configure().buildSessionFactory();
}
}
will cause:
java.lang.IllegalArgumentException: No PropertyTypeExtractor available for type void
at
org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXType(JavaReflectionManager.java:164)^M
at
org.hibernate.annotations.common.reflection.java.JavaXMethod.create(JavaXMethod.java:18)
at
org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getXMethod(JavaReflectionManager.java:128)
at
org.hibernate.annotations.common.reflection.java.JavaXClass.getDeclaredMethods(JavaXClass.java:114)
at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:214)
at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:133)
at
org.hibernate.validator.event.ValidateEventListener.initialize(ValidateEventListener.java:91)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:356)
at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1304)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
Changing the return type to List<Object[]> avoids the bug.
Attached is a tgz of an ant-buildable project; typing "ant run" will illustrate
the bug.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira