apache / apache/grails-core

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

Open
#13,389 3 comments 0 reactions 0 assignees View on GitHub
status: awaiting feedback
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Grails 5.3.1 startup failure using the dependency versions and JDK/Groovy environment listed. Read org.grails.web.mapping.servlet.UrlMappingsErrorPageCustomizer and the grails.web.mapping.UrlMappings injection point. Done means the application starts successfully without the missing-bean error.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.