I'm having this problem as well. I can live with the System.err messages, but i could use the XSD for configuration validation. Is there a way of obtaining this "file"?

thanks in advance,
_ miguel

2010/4/13 Chang Liu <CLiu@deltadentalmi.com>

Hi there,


Error message:

(null: 5, 77): schema_reference.4: Failed to read schema document 'drools.org/drools-5.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.


I ran into this issue when experimenting a project that transforming the rules back and forth from DRL to XML with utility classes as documented in following link:




My code:

XmlPackageReader xmlReader = new XmlPackageReader(null);

StringReader sr = new StringReader(rulesInXml);

try {

                PackageDescr  packageDescr = xmlReader.read(sr);

DrlDumper drlDumper = new DrlDumper();

String drlString = drlDumper.dump(packageDescr);


catch (Exception ex) {




where string “rulesInXml” is the result xml string transformed from a valid .drl file. It looks like:

<?xml version="1.0" encoding="UTF-8"?>

<package name="com.sample" 



      xs:schemaLocation="http://drools.org/drools-5.0 drools.org/drools-5.0.xsd">

<import name="com.sample.DroolsTest.Message" />


<rule name="Hello World">

<lhs><pattern identifier="m" object-type="Message" >

<field-constraint field-name="status">

<qualified-identifier-restriction evaluator="==">Message.HELLO </qualified-identifier-restriction>


<field-binding field-name="message" identifier="myMessage" />




<rhs>       System.out.println( myMessage );

            m.setMessage( "Goodbye cruel world" );

            m.setStatus( Message.GOODBYE );

            update( m );




<rule name="GoodBye">

<lhs><pattern object-type="Message" >

<field-constraint field-name="status">

<qualified-identifier-restriction evaluator="==">Message.GOODBYE </qualified-identifier-restriction>



<field-binding field-name="message" identifier="myMessage" />




<rhs>       System.out.println( myMessage );





What did I miss here?


Moreover, the Drools 5.0 API’s for XML support are poorly-documented. For example, the constructors of class “XmlPackageReader” has an arg of “SemanticModules” type which is not documented. L


Any help would be highly appreciated!




CONFIDENTIALITY NOTICE: The information contained in this email is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient, you are hereby notified that any unauthorized review, use, dissemination, distribution or copying of this communication is prohibited and may be subject to legal restriction or sanction. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of the information and all copies. If you are the intended recipient but do not wish to receive communications through this medium, please advise the sender immediately. Thank you

rules-users mailing list

"To understand what is recursion you must first understand recursion"