Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.1.1, 1.2 final
-
Fix Version/s: 1.2.1
-
Component/s: None
-
Labels:None
-
Environment:Ubuntu 9.10 JDK 1.6.0/Mac OSX 10.6 JDK 1.6.0
-
Testcase included:yes
Description
So I originally hit a DuplicateMappingException when trying to upgrade a large 1.1.1 project to 1.2.0. When I consulted the mailing list I was told that placing hbm.xml mapped domain classes in grails-app/domain only worked in 1.1.1 because of a bug and they should be moved to src/groovy. When I moved the affected classes to src/groovy the DuplicateMappingException was replaced with a NullPointerException that was traced back GrailsDomainBinder.java:459. Mailing list conversation: http://old.nabble.com/Grails-1.2.0-DuplicateMappingException-td27055291.html.
Attached is a grails bug-report of a simple project I created using 1.2.0 that is affected by the NullPointerException problem when starting Spring. Any task that starts Spring should fail, i.e. grails shell. If the attached bug-report is run under 1.1.1 it will fail with the same NullPointerException.
If you move src/groovy/Book.groovy to grails-app/domain 1.1.1 is happy again, but 1.2.0 throws DuplicateMappingException.
Might be related to http://jira.codehaus.org/browse/GRAILS-141 ???