Hi,
I'm using drools-annotation without spring (drools 2.0) and I've used "
drools-annotation-2.0.jar". I'm trying a simple program like this:
RuleBase ruleBase = RuleBaseLoader.loadFromUrl(
                    HelloAnno.class.getResource( "HelloAnn.drl" ) );
            WorkingMemory workingMemory = ruleBase.newWorkingMemory( );
            workingMemory.addEventListener(
                new DebugWorkingMemoryEventListener( ) );
            workingMemory.assertObject( "Hello" );
            workingMemory.fireAllRules( );

and my drl file is like this :
<rule-set name="newRules" >
    <annotation:rule name="NewRule" salience="10"
        class="demo.HelloAnno" />
</rule-set>

I'm getting the errors :
(file:/usr/local/anagha/ecl32-workspace/drools-nospring/demo/HelloAnn.drl:
1, 28): cvc-elt.1: Cannot find the declaration of element 'rule-set'.
(file:/usr/local/anagha/ecl32-workspace/drools-nospring/demo/HelloAnn.drl:
3, 34): The prefix "annotation" for element "annotation:rule" is not bound.
org.xml.sax.SAXParseException: The prefix "annotation" for element
"annotation:rule" is not bound.
    at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)

The error is of SAXParser. I'm using "xercesimple-2.6.2.jar" and "
xml-apis-1.0.b2.jar" in the build path.

What is the thing I'm missing out?

Any help is welcome.
--
Thanks & Regards,
Anagha

Reply via email to