java.lang.IllegalArgumentException: Failed to evaluate expression '@primaryAuth.authentication.mayReadMe(principal)'

tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Can @PreAuthorize expressions return a value of a type other than `boolean`?

    GitHub | 7 months ago | lyubomyr-shaydariv
    java.lang.IllegalArgumentException: Failed to evaluate expression '@primaryAuth.authentication.mayReadMe(principal)'
  2. 0

    Spring Security: How do I enable custom expression result type support?

    Stack Overflow | 7 months ago | Lyubomyr Shaydariv
    java.lang.IllegalArgumentException: Failed to evaluate expression '@primaryAuth.authentication.mayReadMe(principal)'
  3. 0

    Cannot replace DPU

    GitHub | 2 years ago | jakubklimek
    java.lang.IllegalArgumentException: Filter target must be a collection or array type, but was E-DatasetMetadata
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.IllegalArgumentException: Failed to evaluate expression 'USER'

    concretepage.com | 11 months ago
    java.lang.IllegalArgumentException: Failed to evaluate expression 'USER'

  1. serious2monkeys 2 times, last 4 months ago

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Failed to evaluate expression '@primaryAuth.authentication.mayReadMe(principal)'

    at org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean()
  2. spring-security-core
    MethodSecurityInterceptor.invoke
    1. org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean(ExpressionUtils.java:15)
    2. org.springframework.security.access.expression.method.ExpressionBasedPreInvocationAdvice.before(ExpressionBasedPreInvocationAdvice.java:44)
    3. org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter.vote(PreInvocationAuthorizationAdviceVoter.java:57)
    4. org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter.vote(PreInvocationAuthorizationAdviceVoter.java:25)
    5. org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:62)
    6. org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:232)
    7. org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
    7 frames
  3. Spring AOP
    CglibAopProxy$DynamicAdvisedInterceptor.intercept
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
    2 frames