Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm 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):

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

kie-context.xml: (imported in 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>

Details: enter image description here

Can anybody see what's wrong with my set up?

like image 310
kmansoor Avatar asked Nov 22 '25 18:11

kmansoor


1 Answers

The right location can also be referred to by using the classpath : URL handler

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"

like image 68
Omar Vega Avatar answered Nov 24 '25 07:11

Omar Vega



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!