spring-batch
spring-batch copied to clipboard
SpelEvaluationException: EL1021E: A problem occurred whilst attempting to access the property 'input' #Documentation
Bug description Attempting to follow the Spring Batch Integration Configuration guide results in exception:
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1021E: A problem occurred whilst attempting to access the property 'input': 'Invalid property 'input' of bean class [org.springframework.batch.core.scope.context.StepContext]: Bean property 'input' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?'
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:209)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:91)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:55)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:91)
at org.springframework.expression.spel.ast.Indexer.getValueRef(Indexer.java:134)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:70)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:91)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:112)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:273)
at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:167)
... 29 common frames omitted
Caused by: org.springframework.beans.NotReadablePropertyException: Invalid property 'input' of bean class [org.springframework.batch.core.scope.context.StepContext]: Bean property 'input' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:627)
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:617)
at org.springframework.batch.core.scope.StepScope.resolveContextualObject(StepScope.java:91)
at org.springframework.beans.factory.config.BeanExpressionContext.containsObject(BeanExpressionContext.java:54)
at org.springframework.context.expression.BeanExpressionContextAccessor.canRead(BeanExpressionContextAccessor.java:39)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:198)
... 39 common frames omitted
Environment Spring Batch v4.3.7
$ java -version
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
Steps to reproduce Follow the guide.
Expected behavior The guide results in runnable proof-of-concept :)
Minimal Complete Reproducible example N/A
Known workaround
Rename input.file.name to ex: input_file_name