-
Feb 26th, 2008, 01:33 PM
#1
samples.TaskExecutorLauncher crashes in Eclipse
Dear friends:
I'm trying to run the samples in Eclipse. It builds without errors. Please help me. Thank you very much.
When I run the TaskExecutorLauncher it crashes with this errors (I include the source of the TaskExecutorLauncher):
Error creating bean with name 'org.springframework.jmx.export.MBeanExporter#0' defined in class path resource [jobs/adhocLoopJob.xml]----------------------------------------
HERE IS THE COMPLETE ERROR LISTING
Started application. Please connect using JMX (remember to use -Dcom.sun.management.jmxremote if you can't see anything in Jconsole).
19:21:28,613 INFO Thread-2 SimpleJobLauncher:130 - No TaskExecutor has been set, defaulting to synchronous executor.
Exception in thread "Thread-2" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.jmx.export.MBeanExporter#0' defined in class path resource [jobs/adhocLoopJob.xml]: Cannot create inner bean 'org.springframework.aop.framework.ProxyFactoryBea n#381d92' of type [org.springframework.aop.framework.ProxyFactoryBean] while setting bean property 'beans' with key [TypedStringValue: value [spring:service=batch,bean=configurationLoader], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.aop.framework.ProxyFactoryBea n#381d92': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'convertingMethodInterceptor' is defined
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBean(BeanDefinitio nValueResolver.java:229)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:117)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveManagedMap(BeanDefiniti onValueResolver.java:319)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:134)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1274)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1042)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:169)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:413)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:735)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:369)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:122)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:88)
at org.springframework.batch.sample.TaskExecutorLaunc her$1.run(TaskExecutorLauncher.java:48)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.aop.framework.ProxyFactoryBea n#381d92': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'convertingMethodInterceptor' is defined
at org.springframework.beans.factory.support.Abstract BeanFactory$3.run(AbstractBeanFactory.java:1310)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectFromFactoryBean(AbstractBeanF actory.java:1299)
at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBean(BeanDefinitio nValueResolver.java:222)
... 20 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'convertingMethodInterceptor' is defined
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeanDefinition(DefaultListab leBeanFactory.java:391)
at org.springframework.beans.factory.support.Abstract BeanFactory.getMergedLocalBeanDefinition(AbstractB eanFactory.java:999)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:174)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:227)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.aop.framework.ProxyFactoryBean .initializeAdvisorChain(ProxyFactoryBean.java:442)
at org.springframework.aop.framework.ProxyFactoryBean .getObject(ProxyFactoryBean.java:230)
at org.springframework.beans.factory.support.Abstract BeanFactory$3.run(AbstractBeanFactory.java:1304)
... 23 more
---------------------------------------------------------------
HERE IS THE SOURCE
package org.springframework.batch.sample;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlAp plicationContext;
/**
* @author Dave Syer
*
*/
public class TaskExecutorLauncher {
public static void main(String[] args) throws Exception {
// Paths to individual job configurations. Each one must include the
// step scope and the jobConfigurationRegistryBeanPostProcessor.
final String[] paths = new String[] { "jobs/adhocLoopJob.xml",
// "jobs/footballJob.xml" };
"jobs/simpleTaskletJob.xml" };
// The simple execution environment will be used as a parent
// context for each of the job contexts. The standard version of this
// from the Spring Batch samples does not have an MBean for the
// JobLauncher, nor does the JobLauncher have an asynchronous
// TaskExecutor. The adhocLoopJob has both, which is why it has to be
// included in the paths above.
final ApplicationContext parent = new ClassPathXmlApplicationContext(
"simple-container-definition.xml");
new Thread(new Runnable() {
public void run() {
for (int i = 0; i < paths.length; i++) {
String path = paths[i];
new ClassPathXmlApplicationContext(new String[] { path },
parent);
}
};
}).start();
System.out
.println("Started application. "
+ "Please connect using JMX (remember to use -Dcom.sun.management.jmxremote if you can't see anything in Jconsole).");
System.in.read();
}
}
IT CRASHES WITH THIS ERRORS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules