drools-dev] Working with decision table

来源:百度文库 编辑:神马文学网 时间:2024/04/23 17:19:10
Inbox
Subir Das  to dev
More options   Oct 31 (2 days ago)
Hi,
I‘m trying to work the decision table supported by Drools.
I can run the supplied example in drools-example successfully.
But, if I try to create my own application package and run it, I‘m getting the
following error :
-----------------------------------------------------------------
(null: 1, 292): cvc-elt.1: Cannot find the declaration of element ‘rule-set‘.
Exception in thread "main" org.xml.sax.SAXParseException: no semantic module for
namespace ‘http://drools.org/rules‘ (import)
at org.drools.io.RuleSetReader.startElement(RuleSetReader.java:558)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Sou
rce)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known 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(SAXParser.java:345)
at org.drools.io.RuleSetReader .read(RuleSetReader.java:443)
at org.drools.io.RuleSetReader.read(RuleSetReader.java:323)
at org.drools.io.RuleBaseLoader.loadFromReader(RuleBaseLoader.java:313)
at org.drools.io.RuleBaseLoader.loadFromReader(RuleBaseLoader.java:271)
at org.drools.io.RuleBaseLoader.loadFromReader(RuleBaseLoader.java:256)
at org.drools.decisiontable.DecisionTableLoader.loadFromInputStream(Unkn
own Source)
at com.mybusinessrule.drools.LimitManage
ment.loadRuleBase(LimitManagement.java:39)
at com.mybusinessrule.drools.LimitManage
ment.main(LimitManagement.java:56)
-----------------------------------------------------------------
Would appreciate if anyone can help me out.
Thanks.
Subir Das
ReplyForward
Geoffrey Wiseman  to dev
More options   Nov 1 (1 day ago)
On 10/31/05, Subir Das wrote:
>
> I‘m trying to work the decision table supported by Drools.
> I can run the supplied example in drools-example successfully.
>
> But, if I try to create my own application package and run it, I‘m getting
> the
> following error :
>
> -----------------------------------------------------------------
> (null: 1, 292): cvc-elt.1: Cannot find the declaration of element
> ‘rule-set‘.
> Exception in thread "main" org.xml.sax.SAXParseException: no semantic
> module for
> namespace ‘http://drools.org/rules‘ (import)
> at org.drools.io.RuleSetReader.startElement(RuleSetReader.java:558)
> at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Off the top of my head, this looks like your classpath is missing one of the
Drools JARs when running LimitManagement‘s main(). The ‘import‘ declaration
should be part of drools-base.jar, IIRC.
- Geoffrey
--
Geoffrey Wiseman
ReplyForward
Subir Das  to dev
More options   Nov 1 (1 day ago)
Geoffrey Wiseman gmail.com> writes:
Off the top of my head, this looks like your classpath is missing one of the
Drools JARs when running LimitManagement‘s main(). The ‘import‘ declaration
should be part of drools-base.jar, IIRC.
- Geoffrey
--
Geoffrey Wiseman
Thanks for your mail,Geoffrey.
Actually, I have figured out the problem.
The ‘rules.xsd‘ file was not present in the META-INF folder.
Cheers.
Subir
ReplyForward
Geoffrey Wiseman  to dev
More options   Nov 1 (1 day ago)
On 10/31/05, Subir Das wrote:
>
> Thanks for your mail,Geoffrey.
> Actually, I have figured out the problem.
> The ‘rules.xsd‘ file was not present in the META-INF folder.
>
It should be present in the META-INF of drools-base.jar; are you adding it
explicitly to your own application?
- Geoffrey
--
Geoffrey Wiseman
ReplyForward
Subir Das  to dev
More options   Nov 1 (13 hours ago)
Geoffrey Wiseman gmail.com> writes:
On 10/31/05, Subir Das hotmail.com> wrote:
>
> Thanks for your mail,Geoffrey.
> Actually, I have figured out the problem.
> The ‘rules.xsd‘ file was not present in the META-INF folder.
>
It should be present in the META-INF of drools-base.jar; are you adding it
explicitly to your own application?
- Geoffrey
--
Geoffrey Wiseman
Yes. Otherwise, I‘m getting that error.
Subir
_xyz