2017-02-21 32 views
0

Привет я внедрил схему Spring-Xd и я добавил конфигурации XML в моей пружинного module.xmlПолучение springframework FatalBeanException

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:int-aws="http://www.springframework.org/schema/integration/aws" 
    xmlns:int-file="http://www.springframework.org/schema/integration/file" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
         http://www.springframework.org/schema/beans/spring-beans.xsd 
         http://www.springframework.org/schema/integration/file 
         http://www.springframework.org/schema/integration/file/spring-integration-file.xsd 
         http://www.springframework.org/schema/context 
         http://www.springframework.org/schema/context/spring-context.xsd 
         http://www.springframework.org/schema/integration 
         http://www.springframework.org/schema/integration/spring-integration.xsd 
         http://www.springframework.org/schema/integration/aws 
         http://www.springframework.org/schema/integration/aws/spring-integration-aws.xsd"> 

При попытке развернуть это приложение, я получаю ниже исключения.

Deployment status for stream 'Stream3': DeploymentStatus 
{state=failed,error(s)=org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/C:/spring-xd/xd/custom-modules/source/samplespringxd.jar!/config/spring-module.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.s 
pringframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.f 
actory.xml.NamespaceHandler] interface 
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414) 
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) 
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) 
     at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:180) 
     at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:138) 
     at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127) 
     at org.springframework.boot.SpringApplication.load(SpringApplication.java:615) 
     at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) 
     at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) 
     at org.springframework.xd.module.core.SimpleModule.initialize(SimpleModule.java:213) 
     at org.springframework.xd.dirt.module.ModuleDeployer.doDeploy(ModuleDeployer.java:217) 
     at org.springframework.xd.dirt.module.ModuleDeployer.deploy(ModuleDeployer.java:200) 
     at org.springframework.xd.dirt.server.container.DeploymentListener.deployModule(DeploymentListener.java:365) 
     at org.springframework.xd.dirt.server.container.DeploymentListener.deployStreamModule(DeploymentListener.java:334) 
     at org.springframework.xd.dirt.server.container.DeploymentListener.onChildAdded(DeploymentListener.java:181) 
     at org.springframework.xd.dirt.server.container.DeploymentListener.childEvent(DeploymentListener.java:149) 
     at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) 
     at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) 
     at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) 
     at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) 
     at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) 
     at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500) 
     at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) 
     at org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) 
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
     at java.lang.Thread.run(Thread.java:745) 
Caused by: org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.or 
g/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface 
     at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:128) 
     at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1422) 
     at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417) 
     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:174) 
     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144) 
     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100) 
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510) 
     at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392) 
     ... 30 more 

Почему я получаю это исключение. Какие изменения мне нужно сделать, чтобы исправить эту проблему.

ответ

0

Это похоже на проблему загрузчика класса. Возможно, вы положили в свой модуль spring-context банку /lib; это столкнутся с собственной пружинной банкой XD. Вы не должны класть весовые баночки в lib вашего модуля.