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