[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4653) Setting the "referencedColumnName" in @JoinColumnOrFormula throws an NPE

Edgar Espina (JIRA) noreply at atlassian.com
Tue Dec 8 11:36:11 EST 2009


Setting the "referencedColumnName" in @JoinColumnOrFormula throws an NPE
------------------------------------------------------------------------

                 Key: HHH-4653
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4653
             Project: Hibernate Core
          Issue Type: Bug
          Components: annotations
    Affects Versions: 3.5.0-Beta-2
         Environment: Hibernate-3.5.0-Beta-2
MySQL 5.1.37-1ubuntu5
            Reporter: Edgar Espina
         Attachments: Ejb3JoinColumn.java.patch, joinColumnOrFormula.zip

Setting the "referencedColumnName" in @JoinColumnOrFormula throws an NPE at startup time.

Exception in thread "main" java.lang.NullPointerException
	at org.hibernate.cfg.Ejb3JoinColumn.overrideFromReferencedColumnIfNecessary(Ejb3JoinColumn.java:574)
	at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:332)
	at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:111)
	at org.hibernate.cfg.AnnotationConfiguration.processEndOfQueue(AnnotationConfiguration.java:502)
	at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:484)
	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:334)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1359)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:858)
	at hibernateproofofconcept.Hibernate_3_5.main(Hibernate_3_5.java:16)

A maven project is attached for testing purpose.

I created a patch that fix the problem.

Thanks


-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list