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

NoSuchBeanDefinitionException: No bean named 'grailsApplication' in 3.0.8 (working in 3.0.4) #9307

Closed
enr opened this issue Oct 1, 2015 · 4 comments

Comments

@enr
Copy link

enr commented Oct 1, 2015

I have a multimodule project using Spring Security Core 3: https://github.com/enr/s2oauth

using Grails 3.0.4 everything was all right, upgrading to 3.0.8 (and Gradle 2.7) I have some weird message at startup:

WARN org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory - Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloworld.UserRolePersistentClass': Cannot resolve reference to b
ean 'helloworld.UserRoleDomainClass' while setting bean property 'targetObject'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloworld.UserRoleDomainClass': Cannot resolve reference to bean 'grailsApplication' while
 setting bean property 'targetObject'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'grailsApplication' is defined

moreover, on windows, using grails run-app I have an exception related to Spring Loaded

ERROR org.springsource.loaded.agent.SpringLoadedPreProcessor - Unexpected problem transforming call sites
java.util.ConcurrentModificationException: null
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) ~[na:1.8.0_45]

Other relevant difference is the port from application.groovy to application.yml of the SSC configuration.

To replicate:

https://github.com/enr/s2oauth
cd helloworld
grails run-app

You should see error messages.

To see the 3.0.4 version:

git reset --hard b1eefa193cff469e36959b900a0b24b0a9a089ad
sdk use grails 3.0.4
grails run-app

Diff between current version and the version based on 3.0.4:

enr/s2oauth@b1eefa1...HEAD

@graemerocher graemerocher added this to the grails-3.0.9 milestone Oct 1, 2015
@olliefreeman
Copy link

I've been getting the same OptimizedAutowireCapableBeanFactory warning

@mohsenmadi
Copy link

Thanks for taking care of this. Any idea when to expect grails-3.0.9 please?

@graemerocher
Copy link
Member

next week

@graemerocher
Copy link
Member

This is fixed by dd8695f

However, note the error is only a warning and doesn't impact the running of the application ,so I have downgraded from a blocker to major

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