分享

drools-dev] Working with decision table

 accesine 2005-11-02
   Inbox
Subir Das 
<subir_k_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:///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 
<geoffrey.wiseman@> to dev
 More options   Nov 1 (1 day ago)
On 10/31/05, Subir Das <subir_k_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:///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 
<subir_k_das@> to dev
 More options   Nov 1 (1 day ago)
Geoffrey Wiseman <geoffrey.wiseman <at> > 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 
<geoffrey.wiseman@> to dev
 More options   Nov 1 (1 day ago)
On 10/31/05, Subir Das <subir_k_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 
<subir_k_das@> to dev
 More options   Nov 1 (13 hours ago)
Geoffrey Wiseman <geoffrey.wiseman <at> > writes:


 On 10/31/05, Subir Das <subir_k_das <at> > 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

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多