Potential Regression bug: Grails 2.4.0 -> 2.4.2 using PostConstruct in a Controller -


i have few controllers , services grab values grailsapplication using postconstruct annotation. these working fine in 2.4.0 , before, after upgrading 2.4.2 error during startup:

message: error creating bean name 'com.domain.authenticationcontroller': invocation of init method failed; nested exception java.lang.illegalstateexception: no thread-bound request found: referring request attributes outside of actual web request, or processing request outside of receiving thread? if operating within web request , still receive message, code running outside of dispatcherservlet/dispatcherportlet: in case, use requestcontextlistener or requestcontextfilter expose current request.

the init method in question:

@postconstruct def init() {     tokenvalidity = grailsapplication.config.user.accesstoken.validity } 

as can see, i'm not using nor referencing request object in init method @ all. seems coming use of config.

any appreciated.

looks app not have webxml plugin installed. please double check it.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -