java.lang.IllegalStateException: Failed to instantiate CompiledExpression

Spring JIRA | Andrei Ivanov | 12 months ago
  1. 0

    Trying to use {{@Cachable}} on a method triggers a SpEL compiler exception: {code} @Cacheable(cacheManager = "eohsCacheManager", cacheNames = "eohsManagersCache", key = "#userId.toLowerCase(T(java.util.Locale).ENGLISH)") private Manager getRemoteManager(String userId) { } {code} Also tried with {{#userId.toString().toLowerCase(T(java.util.Locale).ENGLISH)}}, fails the same way. Works with {{#userId.toLowerCase()}}. Stacktrace is actually from my 4.2.4 SNAPSHOT test. {noformat} 2015-12-09 14:27:00,271 taskExecutor-5 ||| DEBUG [o.s.e.s.s.SpelCompiler] - SpEL: compiling #userId.toLowerCase(T(java.util.Locale).ENGLISH) 2015-12-09 14:27:00,287 taskExecutor-5 ||| ERROR [o.q.c.JobRunShell] - Job DEFAULT.personsSyncJob threw an unhandled Exception: java.lang.IllegalStateException: Failed to instantiate CompiledExpression at org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:111) at org.springframework.expression.spel.standard.SpelExpression.compileExpression(SpelExpression.java:467) at org.springframework.expression.spel.standard.SpelExpression.checkCompile(SpelExpression.java:437) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:243) at org.springframework.cache.interceptor.ExpressionEvaluator.key(ExpressionEvaluator.java:115) at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:635) at org.springframework.cache.interceptor.CacheAspectSupport.generateKey(CacheAspectSupport.java:490) at org.springframework.cache.interceptor.CacheAspectSupport.collectPutRequests(CacheAspectSupport.java:461) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:341) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302) at org.springframework.cache.aspectj.AbstractCacheAspect.ajc$around$org_springframework_cache_aspectj_AbstractCacheAspect$1$2bc714b5(AbstractCacheAspect.aj:74) ..... Caused by: java.lang.VerifyError: (class: spel/Ex2, method: getValue signature: (Ljava/lang/Object;Lorg/springframework/expression/EvaluationContext;)Ljava/lang/Object;) Incompatible object argument for function call at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:108) {noformat}

    Spring JIRA | 12 months ago | Andrei Ivanov
    java.lang.IllegalStateException: Failed to instantiate CompiledExpression
  2. 0

    Trying to use {{@Cachable}} on a method triggers a SpEL compiler exception: {code} @Cacheable(cacheManager = "eohsCacheManager", cacheNames = "eohsManagersCache", key = "#userId.toLowerCase(T(java.util.Locale).ENGLISH)") private Manager getRemoteManager(String userId) { } {code} Also tried with {{#userId.toString().toLowerCase(T(java.util.Locale).ENGLISH)}}, fails the same way. Works with {{#userId.toLowerCase()}}. Stacktrace is actually from my 4.2.4 SNAPSHOT test. {noformat} 2015-12-09 14:27:00,271 taskExecutor-5 ||| DEBUG [o.s.e.s.s.SpelCompiler] - SpEL: compiling #userId.toLowerCase(T(java.util.Locale).ENGLISH) 2015-12-09 14:27:00,287 taskExecutor-5 ||| ERROR [o.q.c.JobRunShell] - Job DEFAULT.personsSyncJob threw an unhandled Exception: java.lang.IllegalStateException: Failed to instantiate CompiledExpression at org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:111) at org.springframework.expression.spel.standard.SpelExpression.compileExpression(SpelExpression.java:467) at org.springframework.expression.spel.standard.SpelExpression.checkCompile(SpelExpression.java:437) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:243) at org.springframework.cache.interceptor.ExpressionEvaluator.key(ExpressionEvaluator.java:115) at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:635) at org.springframework.cache.interceptor.CacheAspectSupport.generateKey(CacheAspectSupport.java:490) at org.springframework.cache.interceptor.CacheAspectSupport.collectPutRequests(CacheAspectSupport.java:461) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:341) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302) at org.springframework.cache.aspectj.AbstractCacheAspect.ajc$around$org_springframework_cache_aspectj_AbstractCacheAspect$1$2bc714b5(AbstractCacheAspect.aj:74) ..... Caused by: java.lang.VerifyError: (class: spel/Ex2, method: getValue signature: (Ljava/lang/Object;Lorg/springframework/expression/EvaluationContext;)Ljava/lang/Object;) Incompatible object argument for function call at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:108) {noformat}

    Spring JIRA | 12 months ago | Andrei Ivanov
    java.lang.IllegalStateException: Failed to instantiate CompiledExpression
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    wildfly 10 database login module

    Stack Overflow | 3 months ago | Drswaki69
    java.lang.IllegalStateException: PBOX00071: Failed to instantiate interface org.jboss.security.authorization.AuthorizationModule class
  5. 0

    Failed to instantiate JaxbAnnotationIntrospector

    Stack Overflow | 2 years ago | Java Manz
    java.lang.IllegalStateException: Failed to instantiate JaxbAnnotationIntrospector: org.codehaus.jackson.xc.JaxbAnnotationIntrospector cannot be cast to org.codehaus.jackson.map.AnnotationIntrospector

    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. java.lang.IllegalStateException

      Failed to instantiate CompiledExpression

      at org.springframework.expression.spel.standard.SpelCompiler.compile()
    2. Spring Expression Language (SpEL)
      SpelExpression.getValue
      1. org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:111)
      2. org.springframework.expression.spel.standard.SpelExpression.compileExpression(SpelExpression.java:467)
      3. org.springframework.expression.spel.standard.SpelExpression.checkCompile(SpelExpression.java:437)
      4. org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:243)
      4 frames
    3. Spring Context
      CacheAspectSupport.execute
      1. org.springframework.cache.interceptor.ExpressionEvaluator.key(ExpressionEvaluator.java:115)
      2. org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:635)
      3. org.springframework.cache.interceptor.CacheAspectSupport.generateKey(CacheAspectSupport.java:490)
      4. org.springframework.cache.interceptor.CacheAspectSupport.collectPutRequests(CacheAspectSupport.java:461)
      5. org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:341)
      6. org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302)
      6 frames
    4. Spring Aspects
      AbstractCacheAspect.ajc$around$org_springframework_cache_aspectj_AbstractCacheAspect$1$2bc714b5
      1. org.springframework.cache.aspectj.AbstractCacheAspect.ajc$around$org_springframework_cache_aspectj_AbstractCacheAspect$1$2bc714b5(AbstractCacheAspect.aj:74)
      1 frame