org.springframework.expression.spel.SpelEvaluationException

tip

You can only access stepExecutionContext within a bean defined in the scope = "step", add "scope = "step"" to your bean declaration.

tip

Flow files only know how to work with Spring Beans, annotate ManagedBean with @Component('serviceProviderSubscriptionBB') or declare the managed bean directly on flow with

tip

If you're not using an embedded servlet container, try do disable the white label in your application.properties, with "server.error.whitelabel.enabled = false" otherwise check this answer on stackoverflow: https://goo.gl/rG0vKE

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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}
    via by Stéphane Nicoll,
  • 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}
    via by Stéphane Nicoll,
  • Can't evict from Spring Cache in Guice DI app
    via Stack Overflow by pls
    ,
  • Spring Caching key generator
    via Stack Overflow by user3561481
    ,
    • 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]

    Users with the same issue

    serious2monkeys
    2 times, last one,
    Malcshour
    9 times, last one,
    Unknown visitor1 times, last one,
    aidoan
    2 times, last one,
    Casper
    6 times, last one,
    64 more bugmates