无法找到架构命名空间的名称空间处理程序[http://www.hdiv.org/schema/hdiv]

时间:2018-04-13 09:59:36

标签: spring spring-mvc weblogic xml-namespaces hdiv

在weblogic服务器中部署应用程序时,我遇到错误 -

  

2018-04-13 15:18:10,856 [[ACTIVE] ExecuteThread:' 0'对于队列:   ' weblogic.kernel.Default(自我调整)']错误   org.springframework.web.context.ContextLoader.Context初始化   失败   org.springframework.beans.factory.parsing.BeanDefinitionParsingException:   配置问题:无法找到Spring NamespaceHandler   XML模式命名空间[http://www.hdiv.org/schema/hdiv]违规   resource:ServletContext资源[/WB-INF/hdiv-config.xml]

     

在   org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)     在   org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)     在   org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)     在   org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:261)     在   org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1111)     在   org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)     在   org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:133)     在   org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)     在   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)     在   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)     在   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)     在   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)     在   org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)     在   org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:390)     在   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)     在   org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)     在   org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)     在   org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:50)     在   weblogic.servlet.internal.EventsManager $ FireContextListenerAction.run(EventsManager.java:481)     在   weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)     在   weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)     在   weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)     在   weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1868)     在   weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3155)     在   weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)     在   weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)     在   weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:427)     在   weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54)     在   weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)     在   weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)     在   weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)     在   weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:427)     在   weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54)     在   weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)     在   weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)     在   weblogic.application.internal.BaseDeployment $ 2.next(BaseDeployment.java:672)     在   weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54)     在   weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)     在   weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:44)     在   weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)     在   weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)     在   weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)     在   weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)     在   weblogic.management.deploy.internal.DeploymentAdapter $ 1.doActivate(DeploymentAdapter.java:52)     在   weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)     在   weblogic.management.deploy.internal.AppTransition $ 2.transitionApp(AppTransition.java:31)     在   weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)     在   weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:170)     在   weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:124)     在   weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)     在   weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)     在weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)at   weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

这是我的hdiv-config -

<?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:hdiv="http://www.hdiv.org/schema/hdiv"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.hdiv.org/schema/hdiv 
    http://www.hdiv.org/schema/hdiv/hdiv.xsd">

    <hdiv:config excludedExtensions="css,png,jpg,eot,svg,ttf,woff,woff2,js,mp4" errorPage="/jsp/hdivErrorPage.jsp">
        <hdiv:sessionExpired loginPage="/welcome.do" homePage="/"/>
        <hdiv:startPages method="get">/,/welcome.do,/login.do,/captcha.do</hdiv:startPages>
        <hdiv:startPages method="post">/j_spring_security_check</hdiv:startPages>
        <hdiv:startParameters>_HDIV_STATE_</hdiv:startParameters>
    </hdiv:config>

    <!-- Accepted pattern within the application for all editable parameters (generated from textbox and textarea) -->
    <hdiv:validation id="safeText">
        <hdiv:acceptedPattern><![CDATA[^[a-zA-Z0-9@.\-_]*$]]></hdiv:acceptedPattern>
    </hdiv:validation>

    <!-- Finally, it's necessary to define editable data validation list for 
        the application -->
    <hdiv:editableValidations>
        <hdiv:validationRule url="/secure/.*"></hdiv:validationRule>
        <hdiv:validationRule url="/safetext/.*" enableDefaults="false">safeText</hdiv:validationRule>
    </hdiv:editableValidations>
</beans>

注 - 相同的部署在Tomcat服务器中有效。

谢谢。

1 个答案:

答案 0 :(得分:0)

似乎hdiv-config-x.x.x.jar不在类路径中。

命名空间(http://www.hdiv.org/schema/hdiv)在此库中定义