Я получаю сообщение об ошибке при запуске весеннего пакета Job с IBM JRE 1.7.Весенняя серия 3, ошибка при загрузке конфигурации на IBM JVM (BackToBackPatternClassifier)
Spring Batch версия 3.0.7, весна версия 4.3.5
Эта ошибка не происходит с Oracle JDK 1.7. Появляется, когда я загружаю конфигурацию Spring Batch XML Configuration, jobs-configuration.xml, прежде чем начать работу. Эта проблема появилась после того, как я модернизировал Spring Batch и Spring: org.springframework.batch.classify.BackToBackPatternClassifier от Spring Batch стал org.springframework.classify.BackToBackPatternClassifier (весной Retry)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'classifierCcsb01Writer' defined in class path resource [com/bob/batch/spring/configuration/jobs-configuration.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routerDelegate' threw exception; nested exception is java.lang.IllegalStateException: More than one non-void public method detected with single argument.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1523)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1231)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
... 26 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'routerDelegate' threw exception; nested exception is java.lang.IllegalStateException: More than one non-void public method detected with single argument.
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1519)
рабочие-configuration.xml:
<bean id="ItemWriter"
class="org.springframework.batch.item.support.ClassifierCompositeItemWriter">
<property name="classifier" ref="classifierCcsb01Writer" />
</bean>
<bean id="classifierCcsb01Writer"
class="org.springframework.classify.BackToBackPatternClassifier">
<property name="routerDelegate">
<bean
class="com.bob.batch.spring.writers.ClassifierCcsb01Writer" />
</property>
<property name="matcherMap">
<map>
<entry key="create" value-ref="ccsb01Writer" />
<entry key="ko" value-ref="ccsb01ErrorWriter" />
</map>
</property>
</bean>
И ClassifierCcsb01Writer:
package com.bob.batch.spring.writers;
import org.springframework.batch.support.annotation.Classifier;
import com.bob.batch.spring.bean.RoutingBean;
public class ClassifierCcsb01Writer {
@Classifier
public String classify(RoutingBean routingBean) {
return routingBean.getType();
}
}