[rules-users] ImputDrl

Niloy Debnath niloy_rcc at yahoo.co.in
Thu May 3 06:57:51 EDT 2007


sir,
     if you want to take any .drl file as an input of your JAVA program then you can try this code,

final Reader source = new InputStreamReader( ClassExample.class.getResourceAsStream( "Class.drl" ) );

here ClassExample is corresponding JAVA program of your  Class.drl  file and ClassExample is your main class which contain main 

with regards,
Niloy Debnath

fakhfakh ismail <ismail_info2005 at yahoo.fr> wrote: Hello,
First sorry for my bad english,

I set all the class .java is in package hero.client.test
and the file .drl is in folser Drl
the call of file .drl 
InputStream in = DroolsTest.class.getResourceAsStream("Drl/Sample.drl");

but the problem is they didn't find the file .drl 
always an exception is affiched

Exception in thread "main" java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
    at  org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown Source)
    at hero.client.test.DroolsTest.main(DroolsTest.java:34)
Please I need your help
Best regards
Ismail
                  

---------------------------------
  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !  Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses._______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


       
---------------------------------
 Check out what you're missing if you're not on Yahoo! Messenger 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070503/64b6eeab/attachment.html 


More information about the rules-users mailing list