org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'securityChecker'

Spring JIRA | Stéphane Nicoll | 11 months ago
  1. 0

    The {{condition}} attribute does not allow to use bean references. Assuming the following setup and a {{securityChecker}} bean with the requested method {code:java} @Cacheable(cacheNames = "myCache", condition = "@securityChecker.isSecured()") {code} We get {noformat} org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'securityChecker' at org.springframework.expression.spel.ast.BeanReference.getValueInternal(BeanReference.java:48) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:51) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:87) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:299) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.ExpressionEvaluator.condition(ExpressionEvaluator.java:119) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.isConditionPassing(CacheAspectSupport.java:607) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.isConditionPassing(CacheAspectSupport.java:481) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.findCachedItem(CacheAspectSupport.java:433) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:336) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] {noformat}

    Spring JIRA | 11 months ago | Stéphane Nicoll
    org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'securityChecker'
  2. 0

    The {{condition}} attribute does not allow to use bean references. Assuming the following setup and a {{securityChecker}} bean with the requested method {code:java} @Cacheable(cacheNames = "myCache", condition = "@securityChecker.isSecured()") {code} We get {noformat} org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'securityChecker' at org.springframework.expression.spel.ast.BeanReference.getValueInternal(BeanReference.java:48) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:51) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:87) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:299) ~[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.ExpressionEvaluator.condition(ExpressionEvaluator.java:119) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.isConditionPassing(CacheAspectSupport.java:607) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.isConditionPassing(CacheAspectSupport.java:481) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.findCachedItem(CacheAspectSupport.java:433) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:336) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] {noformat}

    Spring JIRA | 11 months ago | Stéphane Nicoll
    org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'securityChecker'
  3. 0

    Can't evict from Spring Cache in Guice DI app

    Stack Overflow | 4 years ago | pls
    org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 10): Field or property 'id' cannot be found on null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to implement CacheLoader so that @Cacheable key is read

    Stack Overflow | 2 years ago | blue-sky
    org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'myKey' cannot be found on object of type 'org.springframework.cache.interceptor.CacheExpressionRootObject'
  6. 0

    spring @Cacheable with Ehcache, spel find null for valid object

    Stack Overflow | 2 years ago | JayabalanAaron
    org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 0): Field or property 'applicationID' cannot be found on null

  1. serious2monkeys 2 times, last 4 months ago
  2. Malcshour 9 times, last 5 months ago
  3. tvrmsmith 2 times, last 3 weeks ago
  4. Pilleo 2 times, last 2 months ago
  5. Tahir 4 times, last 3 months ago
6 more registered users
49 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.expression.spel.SpelEvaluationException

    EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'securityChecker'

    at org.springframework.expression.spel.ast.BeanReference.getValueInternal()
  2. Spring Expression Language (SpEL)
    SpelExpression.getValue
    1. org.springframework.expression.spel.ast.BeanReference.getValueInternal(BeanReference.java:48)[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    2. org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:51)[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3. org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:87)[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    4. org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131)[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    5. org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:299)[spring-expression-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    5 frames
  3. Spring Context
    CacheInterceptor.invoke
    1. org.springframework.cache.interceptor.ExpressionEvaluator.condition(ExpressionEvaluator.java:119)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    2. org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.isConditionPassing(CacheAspectSupport.java:607)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3. org.springframework.cache.interceptor.CacheAspectSupport.isConditionPassing(CacheAspectSupport.java:481)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    4. org.springframework.cache.interceptor.CacheAspectSupport.findCachedItem(CacheAspectSupport.java:433)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    5. org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:336)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    6. org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    7. org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    7 frames