Hi All
I am using Guvnor for rule edition and modification.
I uploaded the Package containing the classes for writing rules.
Attributes are taken from the uploaded package.Package was developed in
eclipse editor.
Rule writing was successful. In property file i have stored URL given by the
Guvnor.
I have stored the property file at "WEB-INF/classes".The Rule agent is
reading the property file.
But when I run the project, it shows "ClassNotFoundException" for the class
I uploaded in the Guvnor.
When I viewed the Package source in the Guvnor I could see the import
statement
for the class,but still why this error?
Could anybody give me some hints to solve this.
Thanks & Regards
Shekhar
On Fri, Apr 30, 2010 at 11:19 PM, shekharputtur puttur <
shekharputtur(a)gmail.com> wrote:
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(a)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(a)tcs.com
> Website:
http://www.tcs.com
> ____________________________________________
> Experience certainty. IT Services
> Business Solutions
> Outsourcing
> ____________________________________________
>
>
>
> From: shekharputtur puttur <shekharputtur(a)gmail.com>
>
> To: rules-users(a)lists.jboss.org
>
> Date: 04/30/2010 02:29 PM
>
> Subject: [rules-users] RuleAgent in webservice
>
> Sent by: rules-users-bounces(a)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(a)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(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>