Home  >  Forum  >  Spring
Post New Query

Access is denied (user is not anonymous); delegating to AccessDeniedHandler


joined on
May 13,2015
Asked on May 13,2015
I am working on spring security demo project. I am getting an exception. What are possible solution?

08:45:23.897 [http-nio-8080-exec-3] DEBUG o.s.s.w.a.ExceptionTranslationFilter - Access is denied (user is not anonymous); delegating to AccessDeniedHandler
org.springframework.security.access.AccessDeniedException: Access is denied
    at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:83) ~[AffirmativeBased.class:4.0.1.RELEASE]
    at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:232) ~[AbstractSecurityInterceptor.class:4.0.1.RELEASE]
    at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) ~[MethodSecurityInterceptor.class:4.0.1.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[ReflectiveMethodInvocation.class:4.1.6.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[JdkDynamicAopProxy.class:4.1.6.RELEASE]
    at com.sun.proxy.$Proxy31.methodTwo(Unknown Source) ~[na:na]

joined on
November 18,2013
Replied on May 13,2015

The possible scenarios are

1. You have logged in with a user that has given a role but accessing a URL pattern which is not authorized to that user.

2.  Or You have logged in with a user and accessing a method which is not authorized to that user role.

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us