Possible NPE in MapBinder.bindKeyFromAssociationTable if @JoinColumn not present
--------------------------------------------------------------------------------
Key: HCANN-26
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HCANN-26
Project: Hibernate Commons Annotations
Issue Type: Bug
Affects Versions: 3.1.0.GA
Reporter: Sergey Vladimirov
Priority: Minor
NPE can occur in MapBinder.bindKeyFromAssociationTable if @JoinColumn not present
java.lang.NullPointerException
org.hibernate.cfg.annotations.MapBinder.bindKeyFromAssociationTable(MapBinder.java:161)
org.hibernate.cfg.annotations.MapBinder.access$000(MapBinder.java:77)
org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:111)
org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:66)
org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1221)
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:383)
org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206)
org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1449)
org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193)
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1077)
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:868)
mapKeyType = property.getMapKey().getName();
Hibernate should check if annotation/mapkey specified and throw human-friendly exception,
not NPE.
--
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