Spring -Drools Integration: the link file (kie- spring.xsd) contains errors

I am trying to use drools with Spring. Spring version 4.01 Drools / Kie version 6.0.1

My kie-context.xml has the following error (in Eclipse):

The linked file contains errors ( http://drools.org/schema/kie-spring.xsd ). For more information, right-click the message in the Problems window and select "Show Details ..."

kie-context.xml: (imported into applicationContext.xml)

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

    <kie:kmodule id="ng-rule-server">
        <kie:kbase name="kbase1" packages="org.drools.server">
            <kie:ksession name="ksession1" type="stateless" />
        </kie:kbase>
    </kie:kmodule>

    <bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor" />
</beans>

Relevant pom.xml:

        <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-api</artifactId>
        <version>${kie.version}</version>
    </dependency>
    <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-internal</artifactId>
        <version>${kie.version}</version>
    </dependency>
    <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-core</artifactId>
        <version>${drools.version}</version>
    </dependency>
    <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-compiler</artifactId>
        <version>${drools.version}</version>
    </dependency>
    <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-spring</artifactId>
        <version>${kie.version}</version>
    </dependency>

<kie.version>6.0.1.Final</kie.version>            
<drools.version>6.0.1.Final</drools.version>

More details: enter image description here

Can anyone understand what is wrong with my setup?

+3
source share
3 answers

I missed this error by pointing xsi: schemaLocation directly to the github address.

: https://raw.github.com/droolsjbpm/droolsjbpm-integration/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd

kie-context.xml:

<?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:kie="http://drools.org/schema/kie-spring"
xsi:schemaLocation="
    http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://drools.org/schema/kie-spring
    https://raw.github.com/droolsjbpm/droolsjbpm-integration/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd">

<kie:kmodule id="sample_module">
    <kie:kbase name="kbase1">
        <kie:ksession name="ksession1" />
    </kie:kbase>
</kie:kmodule>
<bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>
</beans>

, . , .

+2

classpath: URL

xmlns:kie="http://drools.org/schema/kie-spring" xsi:schemaLocation="http://drools.org/schema/kie-spring classpath:org/kie/spring/kie-spring-6.0.0.xsd"

+2

eclipse Spring 3.2.8 Drools 6.0.0.Final. :

, "xs: appinfo" "xs: documentation". Saw 'Drools - JBoss'.

kie- spring .

    <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-spring</artifactId>
        <version>${org.drools.version}</version>
    </dependency>
+1
source

All Articles