Grails Run-App Gotcha

Just an FYI ...

After installing Maia Build 10762, I created a Grails project called Foo. I created a new Domain class named Tea with a couple of String fields. I then ran the Grails "generate-all Tea" command. All the expected artifacts were created, including a TeaController, an index.gsp in the grails-app/views as well as the CRUD views under grails-app/views/tea.

However when doing a run-app and going to http://localhost:8080/Foo, I kept getting a 404 error ... "The requested URL /Foo/ was not found on this server" Strange.

So I tried http://localhost:8080 and immediately saw the problem ... I was running Oracle XE and it was handling localhost:8080!

Though surprised Grails run-app didn't report any conflict, I remedied the situation by modifying the Run configuration, adding -Dserver.port=8090 to the VM args and set the same for my Grails application defaults.


Please sign in to leave a comment.