grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.78k stars 950 forks source link

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

Open dj-kevincr opened 6 months ago

dj-kevincr commented 6 months ago

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:

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 commented 6 months ago

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

matrei commented 6 months ago

@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.