Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAILS-8805: Class reloading with table inheritance #2678

Closed
graemerocher opened this issue Feb 22, 2012 · 4 comments
Closed

GRAILS-8805: Class reloading with table inheritance #2678

graemerocher opened this issue Feb 22, 2012 · 4 comments

Comments

@graemerocher
Copy link
Member

Original Reporter: zorel
Environment: Not Specified
Version: 2.0.1
Migrated From: http://jira.grails.org/browse/GRAILS-8805

I encounter the following exception on my dev environment when I modify a domain using inheritance:

Message: Error creating bean with name 'org.grails.internal.SESSION_FACTORY_HOLDER': Cannot create inner bean '(inner bean)' of type [org.codehaus.groovy.grails.orm.hibernate.ConfigurableLocalSessionFactoryBean] while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Invocation of init method failed; nested exception is org.hibernate.DuplicateMappingException: Duplicate class/entity mapping test.ClassA

I wrote a simple test case to reproduce the error, it's quite simple: https://gist.github.com/1884458

The modification of rendered text in ClassA.pika() is sufficient to raise the exception.

@graemerocher
Copy link
Member Author

aperry said:
I can confirm this bug: this worked with 1.3.7, but fails under 2.0.1.

@graemerocher
Copy link
Member Author

serans said:
I confirm it also affects grails 2.1.1

@graemerocher
Copy link
Member Author

c.ross said:
Is there a workaround for this bug?

@graemerocher
Copy link
Member Author

graemerocher said:
It disables recreation of the Hibernate session factory on reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants