title: Failed to evaluate expression '#oauth2.throwOnError(#oauth2.hasRole('USER'))
body: <p>i start a new project with spring-boot and oauth. I try to secure some url of my project. </p>
  
  <p>Here my Httpsecurty config:</p>
  
  <pre><code>http.authorizeRequests()
                  .antMatchers("/test")
                  .access("#oauth2.hasRole('USER')")
  </code></pre>
  
  <p>and i have this configuration too for my clientdetailsserviceconfigurer:</p>
  
  <pre><code>    clients.inMemory()
          .withClient("xxxxx")
          .authorizedGrantTypes("password", "refresh_token")
          .authorities("USER")
          .scopes("read")
          .resourceIds(RESOURCE_ID)
          .secret("sssss")
  </code></pre>
  
  <p>I registred an user with the role "USER" and i received an access_token from the server. But when i try to access the /test/ url with this token, i got this execption</p>
  
  <pre><code>java.lang.IllegalArgumentException: Failed to evaluate expression '#oauth2.throwOnError(#oauth2.hasRole('USER'))'
      at org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean(ExpressionUtils.java:13)
      at org.springframework.security.web.access.expression.WebExpressionVoter.vote(WebExpressionVoter.java:34)
      at org.springframework.security.web.access.expression.WebExpressionVoter.vote(WebExpressionVoter.java:18)
      at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:62)
      at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:206)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:176)
  </code></pre>
  
  <p>And when i try it without the #oauth2 argument:</p>
  
  <pre><code>.access("hasRole('USER')")
  </code></pre>
  
  <p>, i got:</p>
  
  <pre><code>type=AUTHORIZATION_FAILURE, data={type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]
  </code></pre>
  
  <p>has someone any ideas?
  Thanks
  Cheers</p>