Hi,

We are using Drools Semantic Module Framework and are using our own DSL.
The schema for the same goes as below.
We have created the drools.conf and drools-<semantic>.conf  and have created 
Condition and Consequence Factories for the semantic
We have placed these in META-INF directory along with rules.xsd
However when we try to run the rules using the below drools xml
It throws the following exception. It appears that the schema file is not 
available to the drools engine

How to reslove this?When does this exception occur?
Any help would be greatly appreciated

SCHEMA
=======================================================
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
           
targetNamespace="http://www.gs.com/com/gs/fw/cmpl/bos/analytics/rules";
           elementFormDefault="qualified"
           xmlns:bos-
analytics="http://www.gs.com/com/gs/fw/cmpl/bos/analytics/rules";
           xmlns:rules="http://drools.org/rules";>
        <xs:import namespace="http://drools.org/rules"; 
schemaLocation="rules.xsd"/>
        <xs:element name="import"     type="xs:string" 
substitutionGroup="rules:abstractImport" />
        <xs:element name="functions"  type="xs:string" 
substitutionGroup="rules:abstractFunctions" />
        <xs:element name="class"      type="xs:string" 
substitutionGroup="rules:abstractClass" />
        <xs:element name="analytics-condition" 
substitutionGroup="rules:abstractCondition" type="bos-analytics:analytics-
condition-type"/>
        <xs:element name="analytics-action" 
substitutionGroup="rules:abstractConsequence" type="bos-analytics:analytics-
action-type"/>
        <xs:complexType name="analytics-condition-type">
                ...
                ...
                ...
        </xs:complexType>
        <xs:complexType name="analytics-action-type">
        <xs:complexType name="analytics-condition-type">
                ...
                ...
                ...
        </xs:complexType>
</xs:schema>
 
DROOLS XML
===================================================\
<?xml version="1.0"?>
<rule-set name="generic-exclusions"
          xmlns="http://drools.org/rules";
          xmlns:bos-
analytics="http://www.gs.com/com/gs/fw/cmpl/bos/analytics/rules";
          xmlns:xs="http://www.w3.org/2001/XMLSchema-instance";
          xs:schemaLocation="http://drools.org/rules rules.xsd
                                                 
http://www.gs.com/com/gs/fw/cmpl/bos/analytics/rules ./analytics-schema.xsd">

                <rule name="excluded-products">
                                <bos-analytics:analytics-condition>
                                        <bos-analytics:is-excluded-product>
                                                <bos-analytics:value>Y</bos-
analytics:value>
                                        </bos-analytics:is-excluded-product>
                                </bos-analytics:analytics-condition>
                                <bos-analytics:analytics-action>
                                        <bos-analytics:exclude-position/>
                                </bos-analytics:analytics-action>
                </rule>
</rule-set> 


EXCEPTION DETAILS
===================================================
org.xml.sax.SAXParseException: unknown tag 'analytics-condition' in 
namespace 'http://www.gs.com/com/gs/fw/cmpl/bos/analytics/rules'
        at org.drools.io.RuleSetReader.startElement(RuleSetReader.java:553)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown 
Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement
(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.drools.io.RuleSetReader.read(RuleSetReader.java:445)
        at org.drools.io.RuleSetReader.read(RuleSetReader.java:339)
        at org.drools.io.RuleBaseLoader.loadFromInputStream
(RuleBaseLoader.java:234)
        at org.drools.io.RuleBaseLoader.loadFromInputStream
(RuleBaseLoader.java:193)
        at org.drools.io.RuleBaseLoader.loadFromInputStream
(RuleBaseLoader.java:177)


How do we resolve this?We are using Drols2.0

Any help would be greatly appreciated
Ajeya


Reply via email to