2017-02-21 33 views
0

こんにちは私は春XDフレームワークを実装していると私は、私は例外の下に取得しています。このアプリケーションを展開しようとすると私は私の春-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"> 

にXML設定を追加しました。

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 jarを入れた/libディレクトリ。これはXD独自のスプリングジャーと衝突します。モジュールのlibに春の瓶を入れてはいけません。

関連する問題