grails - GORM (Hibernate) tries to map non-domain classes; gives DuplicateMappingException -
i upgrading grails app version 2.1.0. prior upgrade application behaving fine. downloaded , set-up new version of grails (initially tried version 2.2.1 tried going 2.2.2 today) , did grails upgrade on app.
since upgrade app won't start, citing duplicatemappingexception.
duplicatemappingexception: duplicate import: user refers both com.mycompany.myapp.user , net.security.user (try using auto-import="false")
or
duplicatemappingexception: duplicate import: role refers both net.security.role , com.mycompany.myapp.role (try using auto-import="false")
so seems me gorm reason thinks needs map these net.security
classes database.
role
, user
domain classes use shiro security plugin grails.
i have tried adding autoimport false
mapping block in domain classes. caused problems in other parts of system user
or role
used. haven't pursued further because sure there shouldn't conflict here.
so i'm looking if has idea might causing this, or things might try fix it.
fyi have tried grails clean on project.
thanks
ok, problem net.security
classes not random classes thinking. net.security
default package shiro openid plugin classes. earlier in project added user
, role
classes our own package instead of using ones came shiro openid plugin. @ point must have removed corresponding classes grails-app
, src/groovy/net/security
directories in .grails/<version>/projects/<project>/plugins/shiro-openid-0.5
directory. when upgraded grails 2.2.2 plugin recreated these file , conflicting ones in our project.
for have deleted these class files manually, perhaps there way delete them automatically in buildconfig.groovy
? that's problem day though.
Comments
Post a Comment