grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Field urlMappings in org.grails.web.mapping.servlet.UrlMappingsErrorPageCustomizer required a bean of type 'grails.web.mapping.UrlMappings' that could not be found.

Open dj-kevincr opened this issue 1 year ago • 2 comments

Expected Behavior

Switched the application from Grails 4.0.3 to Grails 5.3.1. Now Grails application startup failed throwing below error. Works fine on 4.0.3. Please let me know any additional information is needed.

Actual Behaviour

Startup Error.


APPLICATION FAILED TO START


Description:

Field urlMappings in org.grails.web.mapping.servlet.UrlMappingsErrorPageCustomizer required a bean of type 'grails.web.mapping.UrlMappings' that could not be found.

The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean of type 'grails.web.mapping.UrlMappings' in your configuration.

Steps To Reproduce

Dependency Versions Used

grailsVersion=5.3.1 groovyVersion=3.0.11 gorm.version=7.3.3 hibernate5Version=7.2.2 springFrameworkVersion=5.3.25 springBootVersion=2.7.8 grailsGradlePlugin=5.3.1

Environment Information

JDK 1.8 Groovy 3.0.11 on Macos

Example Application

No response

Version

5.3.1

dj-kevincr avatar Feb 26 '24 10:02 dj-kevincr

@puneetbehl @matrei Any input on this to narrow down the root cause. Thank you in advance.

dj-kevincr avatar Feb 26 '24 14:02 dj-kevincr

@dj-kevincr Start from a clean 5.3 app and try to re-create the issue. You will most probably understand what is causing this. Otherwise, you will at least have an example application you can share so others can have a look.

matrei avatar Feb 26 '24 14:02 matrei