Mule验证模块在tomcat中作为战争运行时XSD失败

时间:2016-06-08 02:28:36

标签: tomcat7 mule mule-component

当我尝试在tomcat 7中作为战争运行mule时,我收到了以下错误

    org.mule.api.config.ConfigurationException: Unexpected exception parsing XML document from mule-config.xml;
    nested exception is java.lang.IllegalStateException: Could not obtain handledExtensions manager (org.mule.api.lifecycle.
    InitialisationException)
            at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
            at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
            at org.mule.context.DefaultMuleContextFactory$2.configure(DefaultMuleContextFactory.java:108)
            at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222)
            at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:103)
            at org.mule.config.builders.MuleXmlBuilderContextListener.createMuleContext(MuleXmlBuilderContextListener.java:165)
            at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:94)
            at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:70)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
            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.mule.api.lifecycle.InitialisationException: Unexpected exception parsing XML document from mule-config.xml; 
    nested exception is java.lang.IllegalStateException: Could not obtain handledExtensions manager
            at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:112)
            at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:172)
            at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:95)
            at org.mule.config.builders.WebappMuleXmlConfigurationBuilder.doConfigure(WebappMuleXmlConfigurationBuilder.java:79)
            at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
            ... 16 more
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from 
    mule-config.xml; nested exception is java.lang.IllegalStateException: Could not obtain handledExtensions manager
            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.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
            at org.mule.config.spring.MuleArtifactContext.loadBeanDefinitions(MuleArtifactContext.java:191)
            at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
            at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
            at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:108)
            at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:104)
            ... 20 more
    Caused by: java.lang.IllegalStateException: Could not obtain handledExtensions manager
            at org.mule.util.Preconditions.checkState(Preconditions.java:38)
            at org.mule.module.extension.internal.config.ExtensionsNamespaceHandler.init(ExtensionsNamespaceHandler.java:64)
            at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:131)
            at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:85)
            at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:140)
            at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:140)
            at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:180)
            at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:56)
            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)
            ... 29 more

    org.mule.api.config.ConfigurationException: Unexpected exception parsing XML document from mule-config.xml;
    nested exception is java.lang.IllegalStateException: Could not obtain handledExtensions manager (org.mule.api.lifecycle.
    InitialisationException)
            at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
            at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
            at org.mule.context.DefaultMuleContextFactory$2.configure(DefaultMuleContextFactory.java:108)
            at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222)
            at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:103)
            at org.mule.config.builders.MuleXmlBuilderContextListener.createMuleContext(MuleXmlBuilderContextListener.java:165)
            at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:94)
            at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:70)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
            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.mule.api.lifecycle.InitialisationException: Unexpected exception parsing XML document from mu
    le-config.xml; nested exception is java.lang.IllegalStateException: Could not obtain handledExtensions manager
            at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:112)
            at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:172)
            at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:95)
            at org.mule.config.builders.WebappMuleXmlConfigurationBuilder.doConfigure(WebappMuleXmlConfigurationBuilder.java:79)
            at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
            ... 16 more
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document fro
    m mule-config.xml; nested exception is java.lang.IllegalStateException: Could not obtain handledExtensions m
    anager
            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.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
            at org.mule.config.spring.MuleArtifactContext.loadBeanDefinitions(MuleArtifactContext.java:191)
            at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
            at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
            at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:108)
            at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:104)
            ... 20 more
    Caused by: java.lang.IllegalStateException: Could not obtain handledExtensions manager
            at org.mule.util.Preconditions.checkState(Preconditions.java:38)
            at org.mule.module.extension.internal.config.ExtensionsNamespaceHandler.init(ExtensionsNamespaceHandler.java:64)
            at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:131)
            at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:85)
            at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:140)
            at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:140)
            at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:180)
            at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:56)
            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)
            ... 29 more

当我删除下面的验证时,我已经使用过,那么就不会抛出此错误

e.g。

<validation:is-true  expression="#[payload != null" 
          message="Null Payload returned" />

这个https://www.mulesoft.org/jira/browse/MULE-8487的骡子3.7中有一个报告的错误,标记为不同场景的修复(“独立执行”)。

我正在使用mule 3.7.0并在tomcat 7上运行

问题:

  1. 如果修复了我需要在pom.xml中更改的jar [

            <groupId>org.mule.extensions</groupId>
            <artifactId>mule-extensions-api</artifactId>
            <version>1.0.0-alpha-1</version>
    
  2. 因为它提到它是Extensions API我试过它买它没有成功

    1. 或者应该如何处理这个问题?

1 个答案:

答案 0 :(得分:1)

将此依赖项添加到您的POM并进行测试。

<!-- http://mvnrepository.com/artifact/org.mule/mule-extensions -->
<dependency>
   <groupId>org.mule</groupId>
   <artifactId>mule-extensions</artifactId>
   <version>3.7.0</version>
   <type>pom</type>
</dependency>

此POM提供了mule-extension支持所需的所有依赖项。由于社区无法亲自测试您的情况,请尝试此操作。您在上面提到的POM依赖关系代码段包含在此POM中,但也包含许多与Mule扩展相关的其他内容。试试这个,请注意问题是否有效。