<br> Hi Gaminda, <br><br> What you can't do in J2EE containers is to access the filesystem directly. Doing a getResourceAsStream() as you are doing is allowed, specially because your drl file may be inside the application jar/war/ear. If you are having a NPE, the problem is that the container is not finding your file in your classpath, so what you need to do is to fix the classpath. The strategy, though, is a valid one and works.
<br><br> Regards,<br> Edson<br><br><div><span class="gmail_quote">2007/4/6, Gaminda Jayakody <<a href="mailto:my_vista2007@yahoo.com">my_vista2007@yahoo.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi</div> <div>I wnat to implement drools at the Session Bean layer of a J2EE application. But reading .drl file as follows cause exceptin in the server. because of I/O operation</div> <div> </div> <div>final Reader source = new InputStreamReader(
BaseRuleImpl.class.getResourceAsStream(rulefile.drl));</div> <div> </div> <div>could you kindly give me a solutin to this.</div> <div>Thank You</div><span class="sg"> <div>Gaminda</div></span><span class="ad"> <div>
</div><p>
</p><hr size="1">Finding fabulous fares is fun.<br><a href="http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0A" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Let Yahoo! FareChase search your favorite travel sites</a> to find flight and hotel bargains.<p></p></span></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer
<br> Office: +55 11 3124-6000<br> Mobile: +55 11 9218-4151<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>