Drools-Spring MVC 集成 |无法读取架构文档 |找不到元素 'kie:kmodule' 的声明
Drools-Spring MVC Integration | Failed to read schema document | No declaration can be found for element 'kie:kmodule'
我正在尝试进行 POC 以将 Spring MVC 与 Drools 集成。
我的 mvc-dispatcher-servlet.xml 文件试图读取 kie-spring.xsd 文件。
drools 网站上的 file location 给出了 404.As 架构不可访问的结果,并给出如下警告。
"警告:忽略 XML 验证警告
org.xml.sax.SAXParseException;行号:25;列数:35; schema_reference.4: 无法读取模式文档“http://drools.org/schema/kie-spring.xsd”,因为 1) 找不到该文档; 2)文档无法读取; 3)文档的根元素不是.
上述警告似乎导致第 25 行出错。我的文件显示错误为 "The matching wildcard is strict, but no declaration can be found for element 'kie:kmodule'."
当下面是错误::
“严重:上下文初始化失败
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自 ServletContext 资源 [/WEB-INF/mvc-dispatcher-servlet.xml] 的 XML 文档中的第 25 行无效;嵌套异常是 org.xml.sax.SAXParseException;行号:25;列数:35; cvc-complex-type.2.4.c: 匹配的通配符是严格的,但是找不到元素'kie:kmodule'的声明。
我在另一个 Whosebug 问题 here 中发现了同样的问题。
但是针对它提到的两个解决方案并没有解决问题。
下面是 mvc-dispatcher-servlet.xml::
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:kie="http://drools.org/schema/kie-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd">
<context:component-scan base-package="com.kiespring.mvc.controller" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="kieUtil" class="org.kie.spring.KieSpringUtil"/>
<kie:kmodule id="sample_module">
<kie:kbase name="kbase1" packages="org.drools.spring.sample"/>
</kie:kmodule>
<bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>
</beans>
POM 文件:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kie.sample</groupId>
<artifactId>kie-springmvc</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>kie-springmvc Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>3.0.5.RELEASE</spring.version>
<kie.spring.version>6.0.1.FINAL</kie.spring.version>
</properties>
<dependencies>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-spring</artifactId>
<version>${kie.spring.version}</version>
</dependency>
</dependencies>
<build>
<finalName>kie-springmvc</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
我已经在我的 maven 安装全局和用户设置中对 settings.xml 中的 http 进行了更改。
欢迎任何反馈或建议。
Google 适合 kie-spring.xsd。例如:
github.com/kiegroup/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd
将其复制到您可以控制的位置。更改 URL.
我正在尝试进行 POC 以将 Spring MVC 与 Drools 集成。
我的 mvc-dispatcher-servlet.xml 文件试图读取 kie-spring.xsd 文件。
drools 网站上的 file location 给出了 404.As 架构不可访问的结果,并给出如下警告。
"警告:忽略 XML 验证警告 org.xml.sax.SAXParseException;行号:25;列数:35; schema_reference.4: 无法读取模式文档“http://drools.org/schema/kie-spring.xsd”,因为 1) 找不到该文档; 2)文档无法读取; 3)文档的根元素不是.
上述警告似乎导致第 25 行出错。我的文件显示错误为 "The matching wildcard is strict, but no declaration can be found for element 'kie:kmodule'." 当下面是错误::
“严重:上下文初始化失败 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:来自 ServletContext 资源 [/WEB-INF/mvc-dispatcher-servlet.xml] 的 XML 文档中的第 25 行无效;嵌套异常是 org.xml.sax.SAXParseException;行号:25;列数:35; cvc-complex-type.2.4.c: 匹配的通配符是严格的,但是找不到元素'kie:kmodule'的声明。
我在另一个 Whosebug 问题 here 中发现了同样的问题。 但是针对它提到的两个解决方案并没有解决问题。
下面是 mvc-dispatcher-servlet.xml::
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:kie="http://drools.org/schema/kie-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd">
<context:component-scan base-package="com.kiespring.mvc.controller" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="kieUtil" class="org.kie.spring.KieSpringUtil"/>
<kie:kmodule id="sample_module">
<kie:kbase name="kbase1" packages="org.drools.spring.sample"/>
</kie:kmodule>
<bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>
</beans>
POM 文件:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kie.sample</groupId>
<artifactId>kie-springmvc</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>kie-springmvc Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>3.0.5.RELEASE</spring.version>
<kie.spring.version>6.0.1.FINAL</kie.spring.version>
</properties>
<dependencies>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-spring</artifactId>
<version>${kie.spring.version}</version>
</dependency>
</dependencies>
<build>
<finalName>kie-springmvc</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
我已经在我的 maven 安装全局和用户设置中对 settings.xml 中的 http 进行了更改。
欢迎任何反馈或建议。
Google 适合 kie-spring.xsd。例如:
github.com/kiegroup/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd
将其复制到您可以控制的位置。更改 URL.