grails 5.1.2: deploy plugin war: HTTP Status 404 The requested resource is not available
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
### Expected Behavior
I have a number of plugins that are also stand alone apps. i.e. they have a web user interface, but they also provide services (domain classes) to other grails apps as a plugin. This was all working fine in grails 4. It also works ok in grails 5.1.2 when using `grails run-app`. Where it has now stopped working when upgrading from grails 4 -> grails 5.1.2 is when deploying a war.
### Actual Behaviour
```
HTTP Status 404 – Not Found
Type Status Report
Message The requested resource [/myPlugin512-0.1/] is not available
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
```
There is absolutely nothing in the way of errors under tomcat. Which was extremely confusing for a long time. It happily deploys the war, but then nothing happens.
### Steps To Reproduce
```
sdk default grails 5.1.2
grails create-plugin myPlugin512
cd myPlugin512
vi build.gradle
```
Now add the ability to create a war:
`apply plugin:"war"`
Now build:
```
./gradlew bootWar
cp build/libs/myPlugin512-0.1.war /c/Programs/Tomcat9/webapps
```
Now try and access your app:
`http://localhost:8080/myPlugin512-0.1/`
Also, I don't think this is related to other Tomcat issues reported here. I tried the `providedRuntime "org.springframework.boot:spring-boot-starter-tomcat"` thing, but it didn't help.
### Environment Information
grails 5.1.2
java zulu 13.0.5-fx
Windows 11
Tomcat 9.0.56
### Example Application
_No response_
### Version
5.1.2
Contributor guide
Research direction
Start with the reproduced build.gradle change and run ./gradlew bootWar, then deploy build/libs/myPlugin512-0.1.war to Tomcat 9.0.56 as described. Compare the Grails 5.1.2 deployment behavior with grails run-app and verify that the application URL serves the plugin app instead of returning HTTP 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100