Hi Ismail,<br><br>1) Make sure .drl file is available thru the classpath<br><span>2) Try .class.getResourceAsStream("/Drl/Sample.drl") (with leading slash). The path is treated as relative </span><span>without the leading slash
</span><span>.<br><br>Alex<br></span><br><div><span class="gmail_quote">On 5/3/07, <b class="gmail_sendername">fakhfakh ismail</b> <<a href="mailto:ismail_info2005@yahoo.fr">ismail_info2005@yahoo.fr</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>First sorry for my bad english,<br><br>I set all the class .java is in package hero.client.test
<br>and the file .drl is in folser Drl<br>the call of file .drl <br><span style="color: rgb(0, 127, 64);">InputStream in = DroolsTest.class.getResourceAsStream("Drl/Sample.drl");</span><br><br>but the problem is they didn't find the file .drl
<br>always an exception is affiched<br><br><span style="color: rgb(255, 0, 0);">Exception in thread "main" java.lang.NullPointerException</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">
at java.io.Reader.<init>(Reader.java:61)</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> at java.io.InputStreamReader.<init>(InputStreamReader.java:55)</span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);"> at
org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown Source)</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> at hero.client.test.DroolsTest.main
(DroolsTest.java:34)</span><br>Please I need your help<br>Best regards<br><span class="sg">Ismail<br></span><span class="ad"><p>
</p><hr size="1">
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 <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Yahoo! Questions/Réponses</a>.<p></p></span><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br><br></blockquote></div><br>