Closed JohnM1991 closed 10 years ago
Can not reproduce, I tried with grails.app.context="/" and it redirects me to http://localhost:8080/login?targetUri=foo See NimbleFilterBase.groovy if you want to dig further. NimbleFilterBase.onNotAuthenticated is called when access is denied, and it redirects to login
For ClassNotFoundException: ensure that you have webxml plugin installed, it should be acquired through transitive deps, but still you can try declaring it in plugin dependencies and see how it goes.
Nimble does not have dependency on webxml plugin, i think resources plugin depends on it.
Thanks for the webxml suggestion, I managed to recreate it on a test app (that doesn't mean it will be reproducible for you, maybe my environment is somehow bad!):
https://dl.dropboxusercontent.com/u/32868579/nimbleTest-bug-report-12102013.zip
Steps:
grails create-app nimbleTest
put
compile ":nimble:0.5.2"
compile ":webxml:1.4.1"
and comment
// compile ':cache:1.1.1'
in BuildConfig.groovy
put
grails.app.context="/"
in Config.groovy
grails run-app
grails jack-be-nimble test TestUser TestProfile
grails run-war
launch http://localhost:8080/ get working home page
click on grails.plugin.nimble.core.UserController
get redirected to http://localhost:8080//login?targetUri=administration%2Fusers%2Flist
shown
HTTP Status 404 - //login
type Status report
message //login
description The requested resource is not available.
Apache Tomcat/7.0.42
Right, It reproduces, Weird, probably some thing related to grails rather thn nimble. Why would grails redirect to http://localhost:8080//login? for filter.redirect(controller: 'auth', 'action: 'login')
Its a grails bug, should be reproducible for other scenarios as well, try to redirect from a filter to a controller action which has some url mapping like '/foo'
btw: why are you commenting cache plugin, any specific reason ?
I agree it is not likely a Nimble bug, I just assumed it was initially because I got it on the Nimble redirect. I closed it.
I did not submit a ticket to Grails JIRA BTW (will do later IF I get a clean non-nimble test case).
I commented cache because of GPCACHE-33 for which you provided another, better, workaround of "{ excludes "servlet-api" }" for the nimble plugin include but typing in "//" in front of the cache is less symbols.:)
Thanks for your quick response.
GPCACHE-33 I had a guess :)
I don't have a good isolated test case (tried to make one but a seemingly clean grails app with nimble added and cache disabled fails with ClassNotFoundException: grails.plugin.webxml.FilterManager for some reason) nor am I fully certain it is a Nimble problem, but when running my application with "grails run-war" it fails with:
redirecting to
and getting a 404.
When run as "grails run-app" and when the .war is deployed under Tomcat7 it works fine (redirects to "http://localhost:8080/login?targetUri=%2Fhome%2Findex" as expected).
I have
in Config.groovy which could be at fault because if I set it to "/test" then
redirects to
as expected.