Announcement Announcement Module
No announcement yet.
Issue with Grails Upgrade from 2.0.1 to 2.2.3 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with Grails Upgrade from 2.0.1 to 2.2.3

    Currently our grails app runs on version 2.0.1 with spring security plugin v for security. We have role based access set up for app. And the user info is stored in mongodb for which we use grails mongodb plugin v 1.0.0.RC5.

    I have upgraded the app to grails v 2.2.3 which led to upgrade of mongodb plugin to v 1.3.0.GA.

    After the upgrade, when I try to login into the application through the UI using an existing user information, it seems to authenticate the login information but the page that shows up after says that user is not authorized to view the page(denied page).

    In the log, there is Access denied exception that shows up. I ran Spring Security logging in debug mode and found that the roles are not being fetch from the db as I see ROLE_NO_ROLES being assigned as role for the user even though it seems like the authentication is successful.
    I am not sure why the roles are being fetched from mongodb as the collections for user, user roles are there in the db. and the config.groovy file has these set up for spring secuirty from before(the upgrade):
    grails.plugins.springsecurity.userLookup.userDomai nClassName = 'com.paydiant.domain.adminportal.user.SecurityUser '
    grails.plugins.springsecurity.userLookup.authority JoinClassName = 'com.paydiant.domain.adminportal.user.SecurityUser SecurityRole'
    grails.plugins.springsecurity.authority.className = 'com.paydiant.domain.adminportal.user.SecurityRole '

    Could someone please help me with this!

    Here is a part of the log in springsecurity log in debug mode:
    29 Aug 2013 16:15:15,523 DEBUG FilterSecurityInterceptor Previously Authenticated: [email protected]: Principal: org.codehaus.groovy.grails.plugins.springsecurity. [email protected]: Username: admin; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_NO_ROLES; Credentials: [PROTECTED]; Authenticated: true; Details: [email protected]: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 3AE55CB76226E3BE4E510AC8ACA78313; Granted Authorities: ROLE_NO_ROLES
    29 Aug 2013 16:15:15,523 DEBUG les.RoleHierarchyImpl getReachableGrantedAuthorities() - From the roles [ROLE_NO_ROLES] one can reach [ROLE_NO_ROLES] in zero or more steps.
    29 Aug 2013 16:15:15,534 ERROR StackTrace Full Stack Trace: ception: Access is denied
    at org.codehaus.groovy.grails.plugins.springsecurity. AuthenticatedVetoableDecisionManager.deny(Authenti
    at org.codehaus.groovy.grails.plugins.springsecurity. AuthenticatedVetoableDecisionManager.checkOtherVot ers(
    at org.codehaus.groovy.grails.plugins.springsecurity. AuthenticatedVetoableDecisionManager.decide(Authen
    at ractSecurityInterceptor.beforeInvocation(AbstractS
    at FilterSecurityInterceptor.invoke(FilterSecurityInt
    at FilterSecurityInterceptor.doFilter(FilterSecurityI
    at$ VirtualFilterChain.doFilter( 381)
    at ranslationFilter.doFilter(ExceptionTranslationFilt
    at$ VirtualFilterChain.doFilter( 381)
    at onymousAuthenticationFilter.doFilter(AnonymousAuth
    at$ VirtualFilterChain.doFilter( 381)
    at memberme.RememberMeAuthenticationFilter.doFilter(R
    at$ VirtualFilterChain.doFilter( 381)
    at tyContextHolderAwareRequestFilter.doFilter(Securit
    at$ VirtualFilterChain.doFilter( 381)
    at stractAuthenticationProcessingFilter.doFilter(Abst
    at org.codehaus.groovy.grails.plugins.springsecurity. RequestHolderAuthenticationFilter.doFilter(Request
    at$ VirtualFilterChain.doFilter( 381)
    at org.codehaus.groovy.grails.plugins.springsecurity. MutableLogoutFilter.doFilter(MutableLogoutFilter.j ava:79)
    at$ VirtualFilterChain.doFilter( 381)
    at ontextPersistenceFilter.doFilter(SecurityContextPe
    at$ VirtualFilterChain.doFilter( 381)
    at doFilter(
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(
    at ternalDoFilter(
    at Filter(
    at org.codehaus.groovy.grails.web.servlet.mvc.GrailsW ebRequestFilter.doFilterInternal(GrailsWebRequestF
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(
    at ternalDoFilter(
    at Filter(
    at org.codehaus.groovy.grails.web.filters.HiddenHttpM ethodFilter.doFilterInternal(HiddenHttpMethodFilte
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(
    at ternalDoFilter(
    at Filter(
    at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal( :88)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(
    at ternalDoFilter(
    at Filter(
    at org.apache.catalina.core.StandardWrapperValve.invo ke(
    at org.apache.catalina.core.StandardContextValve.invo ke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke (
    at org.apache.catalina.core.StandardEngineValve.invok e(
    at org.apache.catalina.connector.CoyoteAdapter.servic e(
    at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(
    at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$ (

    Thank you,

  • #2
    Found the solution to this, we are using dbrefs and since it was no longer applied by default by Mongodb plugin v 1.1 and above, this was breaking.

    It is working now, where I can login and am able to look at the pages/records etc once I put this in the config file:
    grails.mongo.default.mapping = {
    '*'(reference: true)