org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 6): Method call: Method values() cannot be found on java.util.ArrayList type

Spring JIRA | Franck MARCHAND | 2 years ago
  1. 0

    I think #this is not resolved correctly when it is used as an argument of a static method. If I try to execute this code : {code:title=TestExpr.java|borderStyle=solid} List<Map<String, Object>> myPayload = new ArrayList<Map<String, Object>>(); Map<String, Object> v1 = new HashMap<String, Object>(); Map<String, Object> v2 = new HashMap<String, Object>(); v1.put("test11", "test11"); v1.put("test12", "test12"); v2.put("test21", "test21"); v2.put("test22", "test22"); myPayload.add(v1); myPayload.add(v2); EvaluationContext context = new StandardEvaluationContext(myPayload); ExpressionParser parser=new SpelExpressionParser(); List res = parser.parseExpression("#root.![T(org.springframework.util.StringUtils).collectionToCommaDelimitedString(#this.values())]").getValue(context, List.class); {code} I get an exception : {code} org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 6): Method call: Method values() cannot be found on java.util.ArrayList type at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:211) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:125) at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49) at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:342) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88) at org.springframework.expression.spel.ast.MethodReference.getArguments(MethodReference.java:154) {code} In this case #this shouldn't be an ArrayList but a HashMap. If I don't use #this in the method collectionToCommaDelimitedString, but directly in the projection expression like this : {code} List res = parser.parseExpression("#root.![#this.values()]").getValue(context, List.class); {code} I don't have any exceptions and the result is the one I was expecting.

    Spring JIRA | 2 years ago | Franck MARCHAND
    org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 6): Method call: Method values() cannot be found on java.util.ArrayList type
  2. 0

    I think #this is not resolved correctly when it is used as an argument of a static method. If I try to execute this code : {code:title=TestExpr.java|borderStyle=solid} List<Map<String, Object>> myPayload = new ArrayList<Map<String, Object>>(); Map<String, Object> v1 = new HashMap<String, Object>(); Map<String, Object> v2 = new HashMap<String, Object>(); v1.put("test11", "test11"); v1.put("test12", "test12"); v2.put("test21", "test21"); v2.put("test22", "test22"); myPayload.add(v1); myPayload.add(v2); EvaluationContext context = new StandardEvaluationContext(myPayload); ExpressionParser parser=new SpelExpressionParser(); List res = parser.parseExpression("#root.![T(org.springframework.util.StringUtils).collectionToCommaDelimitedString(#this.values())]").getValue(context, List.class); {code} I get an exception : {code} org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 6): Method call: Method values() cannot be found on java.util.ArrayList type at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:211) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:125) at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49) at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:342) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88) at org.springframework.expression.spel.ast.MethodReference.getArguments(MethodReference.java:154) {code} In this case #this shouldn't be an ArrayList but a HashMap. If I don't use #this in the method collectionToCommaDelimitedString, but directly in the projection expression like this : {code} List res = parser.parseExpression("#root.![#this.values()]").getValue(context, List.class); {code} I don't have any exceptions and the result is the one I was expecting.

    Spring JIRA | 2 years ago | Franck MARCHAND
    org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 6): Method call: Method values() cannot be found on java.util.ArrayList type
  3. 0

    The evaluator incorrectly throws org.springframework.expression.spel.SpelEvaluationException: EL1004E: when matching a method parameter of parameterized type to an actual argument of the raw type. E.g. public Object someMethod(List<TaskInstance> tasks); //inferred element type is TaskInstance List rawList = new List(); //inferred element type is Object In a Spring weblow, expression "someObject.someMethod(rawList)" fails with EL1004E. The error is in org.springframework.core.convert.TypeDescriptor.isAssignableTo(), which incorrectly checks the element type of the collection. if (isCollection() && targetType.isCollection() || isArray() && targetType.isArray()) { return targetType.getType().isAssignableFrom(getType()) && getElementTypeDescriptor().isAssignableTo(targetType.getElementTypeDescriptor()); } According to rules of type erasure for parameterized types, only the raw types must match. This is a major issue because some data providers (e.g. jBPM, Ibatis) create and return raw collection types. Stack trace follows: org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@f4388b targetAction = [EvaluateAction@1ac5211 expression = redemptionModel.setInstructionGroupAccountViews(flowScope.instructionGroups), resultExpression = [null]], attributes = map[[empty]]] in state 'null' of flow 'redemption-detail-flow' -- action execution attributes were 'map[[empty]]' at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:60) at org.springframework.webflow.engine.ActionList.execute(ActionList.java:155) at org.springframework.webflow.engine.Flow.start(Flow.java:534) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:364) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:222) at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140) at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.fmr.commons.cs203.servlet.CS203CoreServletFilter.doFilter(CS203CoreServletFilter.java:86) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at com.fidelity.shares.web.common.Log4jMDCFilter.doFilter(Log4jMDCFilter.java:70) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at com.fidelity.shares.web.security.SecurityTokenFilter.doFilterHttp(SecurityTokenFilter.java:77) at com.fidelity.shares.web.security.SecurityTokenFilter.doFilter(SecurityTokenFilter.java:34) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at com.fidelity.shares.web.security.TimeoutFilter.doFilterHttp(TimeoutFilter.java:111) at com.fidelity.shares.web.security.TimeoutFilter.doFilter(TimeoutFilter.java:51) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:379) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.binding.expression.EvaluationException: An ELException occurred getting the value for expression 'redemptionModel.setInstructionGroupAccountViews(flowScope.instructionGroups)' on context [class org.springframework.webflow.engine.impl.RequestControlContextImpl] at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:86) at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:75) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) ... 64 more Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 16): Method call: Method setInstructionGroupAccountViews(java.util.ArrayList) cannot be found on com.fidelity.shares.web.admin.model.event.redemption.RedemptionDetailModel type at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:185) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:107) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:57) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97) at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:78) ... 68 more

    Spring JIRA | 6 years ago | Ken Abbott
    org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@f4388b targetAction = [EvaluateAction@1ac5211 expression = redemptionModel.setInstructionGroupAccountViews(flowScope.instructionGroups), resultExpression = [null]], attributes = map[[empty]]] in state 'null' of flow 'redemption-detail-flow' -- action execution attributes were 'map[[empty]]'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The evaluator incorrectly throws org.springframework.expression.spel.SpelEvaluationException: EL1004E: when matching a method parameter of parameterized type to an actual argument of the raw type. E.g. public Object someMethod(List<TaskInstance> tasks); //inferred element type is TaskInstance List rawList = new List(); //inferred element type is Object In a Spring weblow, expression "someObject.someMethod(rawList)" fails with EL1004E. The error is in org.springframework.core.convert.TypeDescriptor.isAssignableTo(), which incorrectly checks the element type of the collection. if (isCollection() && targetType.isCollection() || isArray() && targetType.isArray()) { return targetType.getType().isAssignableFrom(getType()) && getElementTypeDescriptor().isAssignableTo(targetType.getElementTypeDescriptor()); } According to rules of type erasure for parameterized types, only the raw types must match. This is a major issue because some data providers (e.g. jBPM, Ibatis) create and return raw collection types. Stack trace follows: org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@f4388b targetAction = [EvaluateAction@1ac5211 expression = redemptionModel.setInstructionGroupAccountViews(flowScope.instructionGroups), resultExpression = [null]], attributes = map[[empty]]] in state 'null' of flow 'redemption-detail-flow' -- action execution attributes were 'map[[empty]]' at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:60) at org.springframework.webflow.engine.ActionList.execute(ActionList.java:155) at org.springframework.webflow.engine.Flow.start(Flow.java:534) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:364) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:222) at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140) at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.fmr.commons.cs203.servlet.CS203CoreServletFilter.doFilter(CS203CoreServletFilter.java:86) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at com.fidelity.shares.web.common.Log4jMDCFilter.doFilter(Log4jMDCFilter.java:70) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at com.fidelity.shares.web.security.SecurityTokenFilter.doFilterHttp(SecurityTokenFilter.java:77) at com.fidelity.shares.web.security.SecurityTokenFilter.doFilter(SecurityTokenFilter.java:34) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at com.fidelity.shares.web.security.TimeoutFilter.doFilterHttp(TimeoutFilter.java:111) at com.fidelity.shares.web.security.TimeoutFilter.doFilter(TimeoutFilter.java:51) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:379) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.springframework.binding.expression.EvaluationException: An ELException occurred getting the value for expression 'redemptionModel.setInstructionGroupAccountViews(flowScope.instructionGroups)' on context [class org.springframework.webflow.engine.impl.RequestControlContextImpl] at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:86) at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:75) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) ... 64 more Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 16): Method call: Method setInstructionGroupAccountViews(java.util.ArrayList) cannot be found on com.fidelity.shares.web.admin.model.event.redemption.RedemptionDetailModel type at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:185) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:107) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:57) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97) at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:78) ... 68 more

    Spring JIRA | 6 years ago | Ken Abbott
    org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@f4388b targetAction = [EvaluateAction@1ac5211 expression = redemptionModel.setInstructionGroupAccountViews(flowScope.instructionGroups), resultExpression = [null]], attributes = map[[empty]]] in state 'null' of flow 'redemption-detail-flow' -- action execution attributes were 'map[[empty]]'
  6. 0

    SpEL getMethod don't work

    Stack Overflow | 2 years ago | Jade Tang
    org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 49): Method call: Method getMethod(java.lang.String) cannot be found on foo .PoJo type

    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

      EL1004E:(pos 6): Method call: Method values() cannot be found on java.util.ArrayList type

      at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod()
    2. Spring Expression Language (SpEL)
      MethodReference.getArguments
      1. org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:211)
      2. org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:125)
      3. org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49)
      4. org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:342)
      5. org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88)
      6. org.springframework.expression.spel.ast.MethodReference.getArguments(MethodReference.java:154)
      6 frames