<div>Hi All</div>
<div>Thanks a lot for your kind response.</div>
<div>After putting properties file in the "WEB-INF/classes" it worked.</div>
<div>I will try the method suggested by you too.</div>
<div> </div>
<div>Thanks & Regards</div>
<div>Shekhar</div>
<div>Bangalore</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 4/30/10, <b class="gmail_sendername">Gayatri Chandak</b> <<a href="mailto:gayatri.chandak@tcs.com">gayatri.chandak@tcs.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I had also faced the same problem.<br>Use the below code, it works proeprly.<br><br>Properties properties = new Properties();<br>
InputStream stream = DiscountCheckServlet.class.getResourceAsStream<br>("<mention your properties file here>");<br>properties.load(stream);<br>RuleAgent agent = RuleAgent.newRuleAgent(properties);<br><br>Please let me know if it works.<br>
<br>Regards,<br>Gayatri Chandak<br>TEG-Open Source<br>Tata Consultancy Services<br>Yantra Park -(STPI)<br>2nd Pokharan Road,<br>Opp HRD Voltas Center,Subash Nagar<br>Mumbai - 400 601,Maharashtra<br>India<br>Ph:- 022-67782556<br>
Mailto: <a href="mailto:gayatri.chandak@tcs.com">gayatri.chandak@tcs.com</a><br>Website: <a href="http://www.tcs.com">http://www.tcs.com</a><br>____________________________________________<br>Experience certainty. IT Services<br>
Business Solutions<br> Outsourcing<br>____________________________________________<br><br><br><br>From: shekharputtur puttur <<a href="mailto:shekharputtur@gmail.com">shekharputtur@gmail.com</a>><br>
<br>To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><br>Date: 04/30/2010 02:29 PM<br><br>Subject: [rules-users] RuleAgent in webservice<br><br>Sent by: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a><br>
<br><br><br><br><br><br>Hi All,<br>I am using drools API, and developed a webservice out of it.<br>I created rule binary package using BRMS Guvnor.<br>I used RuleAgent to acces the properties file.<br>ie RuleAgent agent = RuleAgent.newRuleAgent("/<br>
application.properties");<br>"application.properties" file was stored in current working directory.<br>I executed my application using eclipse, it was fine .<br><br>For testing purpose i deployed the application in tomcat application<br>
server.<br>Now it is unable to find "application.properties" file. and shows<br>following in "catalina.out" file:<br>java.lang.NullPointerException<br> at java.util.Properties$LineReader.readLine(Properties.java:418)<br>
at java.util.Properties.load0(Properties.java:337)<br> at java.util.Properties.load(Properties.java:325)<br> at org.drools.agent.RuleAgent.loadFromProperties<br>(RuleAgent.java:299)<br> at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)<br>
My question is, in which location should i keep the<br>"application.properties" file , so that RuleAgent can access it.<br><br>Could you please tell me the solution.<br><br>Thanks & Regards<br>Shekhar_______________________________________________<br>
rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br><br><br>=====-----=====-----=====<br>Notice: The information contained in this e-mail<br>message and/or attachments to it may contain<br>confidential or privileged information. If you are<br>not the intended recipient, any dissemination, use,<br>
review, distribution, printing or copying of the<br>information contained in this e-mail message<br>and/or attachments to it are strictly prohibited. If<br>you have received this communication in error,<br>please notify us by reply e-mail or telephone and<br>
immediately and permanently delete the message<br>and any attachments. Thank you<br><br><br><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>