Spring集成异常

Spring集成异常,spring,spring-integration,Spring,Spring Integration,我在spring集成中遇到了一个例外。下面是我的spring.xml文件的片段 <int-file:inbound-channel-adapter id=ïncomingFile" directory="file:${myapp.incomingFile.path}"prevent-duplicates="true"filename-regex="${filenameRegex}> <int:poller id="poller"fixed-delay="5000"/>

我在spring集成中遇到了一个例外。下面是我的spring.xml文件的片段

<int-file:inbound-channel-adapter id=ïncomingFile" directory="file:${myapp.incomingFile.path}"prevent-duplicates="true"filename-regex="${filenameRegex}>

<int:poller id="poller"fixed-delay="5000"/>

</int-file:inbound-channeladapter> 

例外情况:

7 May 2014 13:52:17.903 [main] INFO  App.main - Starting with the main application
May 17, 2014 1:52:18 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@2814a18d: startup date [Sat May 17 13:52:18 EDT 2014]; root of context hierarchy
May 17, 2014 1:52:18 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [file:./src/main/resources/spring//Spring-All-Module.xml]
May 17, 2014 1:52:18 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [file:src/main/resources/spring//filetracker.xml]
May 17, 2014 1:52:18 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [jar:file:/C:/Users/sbhargava/.m2/repository/org/springframework/integration/spring-integration-core/4.0.0.RELEASE/spring-integration-core-4.0.0.RELEASE.jar!/META-INF/spring.integration.default.properties]
May 17, 2014 1:52:18 PM org.springframework.integration.config.IntegrationRegistrar registerHeaderChannelRegistry
INFO: No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
May 17, 2014 1:52:18 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from class path resource [config/filetracker.prop]
May 17, 2014 1:52:18 PM org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor registerErrorChannel
INFO: No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
May 17, 2014 1:52:18 PM org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor registerTaskScheduler
INFO: No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
May 17, 2014 1:52:18 PM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from URL [jar:file:/C:/Users/sbhargava/.m2/repository/org/springframework/integration/spring-integration-core/4.0.0.RELEASE/spring-integration-core-4.0.0.RELEASE.jar!/META-INF/spring.integration.default.properties]
May 17, 2014 1:52:18 PM org.springframework.scheduling.concurrent.ExecutorConfigurationSupport initialize
INFO: Initializing ExecutorService  'taskScheduler'
May 17, 2014 1:52:18 PM org.springframework.scheduling.concurrent.ExecutorConfigurationSupport shutdown
INFO: Shutting down ExecutorService 'taskScheduler'
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'incomingFiles.adapter': Cannot resolve reference to bean 'incomingFiles.adapter.source' while setting bean property 'source'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'incomingFiles.adapter.source': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/integration/MessagingException
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1456)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:681)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    at com.queryutility.jefferies.fileutility.App.main(App.java:28)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'incomingFiles.adapter.source': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/integration/MessagingException
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:151)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:320)
    ... 15 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/integration/MessagingException
    at org.springframework.integration.file.FileReadingMessageSource.<init>(FileReadingMessageSource.java:77)
    at org.springframework.integration.file.FileReadingMessageSource.<init>(FileReadingMessageSource.java:96)
    at org.springframework.integration.file.config.FileReadingMessageSourceFactoryBean.initSource(FileReadingMessageSourceFactoryBean.java:128)
    at org.springframework.integration.file.config.FileReadingMessageSourceFactoryBean.getObject(FileReadingMessageSourceFactoryBean.java:98)
    at org.springframework.integration.file.config.FileReadingMessageSourceFactoryBean.getObject(FileReadingMessageSourceFactoryBean.java:36)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:144)
    ... 20 more
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.MessagingException
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 26 more
2014年5月7日13:52:17.903[main]INFO App.main-从主应用程序开始
2014年5月17日下午1:52:18 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息:刷新org.springframework.context.support。ClassPathXmlApplicationContext@2814a18d:启动日期[美国东部夏令时2014年5月17日星期六13:52:18];上下文层次结构的根
2014年5月17日下午1:52:18 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息:从URL加载XMLBean定义[文件:./src/main/resources/spring//spring All Module.XML]
2014年5月17日下午1:52:18 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息:从URL[文件:src/main/resources/spring//filetracker.XML]加载XMLbean定义
2014年5月17日下午1:52:18 org.springframework.core.io.support.properties加载程序支持加载属性
信息:从URL加载属性文件[jar:file:/C:/Users/sbhargava/.m2/repository/org/springframework/integration/spring-integration-core/4.0.0.RELEASE/spring-integration-core-4.0.0.RELEASE.jar!/META-INF/spring.integration.default.properties]
2014年5月17日下午1:52:18 org.springframework.integration.config.integrationregistratorregisterheaderchannelregistry
信息:未明确定义名为“IntegrationHeaderChannel注册表”的bean。因此,将创建默认的DefaultHeaderChannel注册表。
2014年5月17日下午1:52:18 org.springframework.core.io.support.properties加载程序支持加载属性
信息:从类路径资源[config/filetracker.prop]加载属性文件
2014年5月17日下午1:52:18 org.springframework.integration.config.DefaultConfiguringBeanFactory后处理器注册表错误通道
信息:没有明确定义名为“errorChannel”的bean。因此,将创建一个默认的PublishSubscribeChannel。
2014年5月17日下午1:52:18 org.springframework.integration.config.defaultConfiguringBeanFactory后处理器注册表TaskScheduler
信息:没有明确定义名为“taskScheduler”的bean。因此,将创建默认的ThreadPoolTaskScheduler。
2014年5月17日下午1:52:18 org.springframework.core.io.support.properties加载程序支持加载属性
信息:从URL加载属性文件[jar:file:/C:/Users/sbhargava/.m2/repository/org/springframework/integration/spring-integration-core/4.0.0.RELEASE/spring-integration-core-4.0.0.RELEASE.jar!/META-INF/spring.integration.default.properties]
2014年5月17日下午1:52:18 org.springframework.scheduling.concurrent.ExecutionConfigurationSupport初始化
信息:正在初始化ExecutorService“taskScheduler”
2014年5月17日下午1:52:18 org.springframework.scheduling.concurrent.ExecutionConfigurationSupport关机
信息:正在关闭ExecutorService“taskScheduler”
线程“main”org.springframework.beans.factory.BeanCreationException中出现异常:创建名为“incomingFiles.adapter”的bean时出错:设置bean属性“source”时无法解析对bean“incomingFiles.adapter.source”的引用;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“incomingFiles.adapter.source”的bean时出错:FactoryBean在创建对象时引发异常;嵌套的异常是java.lang.NoClassDefFoundError:org/springframework/integration/MessaginException
位于org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
在org.springframework.beans.factory.support.BeanDefinitionValueResolver.ResolveValueIfNeeded上(BeanDefinitionValueResolver.java:107)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1456)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
位于org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
位于org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
位于org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
位于org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
位于org.springframework.beans.factory.support.DefaultListableBeanFactory.PreInstanceSingleton(DefaultListableBeanFactory.java:681)
位于org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
位于org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
位于org.springframework.context.support.ClassPathXmlApplicationContext。(ClassPathXmlApplicationContext.java:139)
位于org.springframework.context.support.ClassPathXmlApplicationContext。(ClassPathXmlApplicationContext.java:83)
位于com.queryutility.jefferies.fileutility.App.main(App.java:28)
原因:org.springframework.beans.factory.BeanCreationException:创建名为“incomingFiles.adapter.source”的bean时出错:FactoryBean在创建对象时引发异常;嵌套的异常是java.lang.NoClassDefFoundError:org/springframework/integration/MessaginException
位于org.springframework.beans.factory.support.FactoryBeanRegistrySupport.dogetObject fromFactoryBean(FactoryBeanRegistrySupport.java:151)
位于org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
位于org.springframework.be