yes that should work fine. That error is cause there is no package name (if
you print out the string you will find no package declaration at the top).
Nothing to do with Readers or databases.

On 12/13/06, Joj <[EMAIL PROTECTED]> wrote:


hi,

in the HelloWorld example, the rule file is read as follows:
final Reader source = new InputStreamReader(
HelloWorldExample.class.getResourceAsStream( "HelloWorld.drl" ) );

can't we read these rules from database as follows ?
final Reader source = new StringReader(tmp);
where tmp is the rule file content as String, read it from a table.

it didnt work for me. got the exception below :
org.drools.compiler.PackageBuilder$MissingPackageNameException: Missing
package name for rule package.

at this line:
builder.addPackageFromDrl( source );

is there any way to read rules from database, s.t. no need to keep rule
files inside my project?

plz reply A.S.A.P.
thanx in advance
joj


--
View this message in context:
http://www.nabble.com/Keep-Rules-in-Database-%28Avoiding-physical-Rule-files%29-tf2812375.html#a7848148
Sent from the drools - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to