Browsing over the text, this hit my eye: DROOLS_GUVNOR_CHAGNE_SET_XML_PATH

Change this to CHANGE!
-W


On 30 August 2011 11:32, ayonchak <ayon.chakraborty@genworth.com> wrote:
Hi All,

I am getting Nullpointer exception the application is trying to
reloadKnwledgeBase. I have the following code in application.

public void init() {
               logger.info("Group Rule Engine Initiated..!!");
               /**
                * Polling interval needs to be externalized
                */

               knowledgeAgent = KnowledgeAgentFactory.newKnowledgeAgent("FiveSeries");
               knowledgeAgent.applyChangeSet(ResourceFactory
                               .newFileResource(propertyReader
                                               .getProperty("DROOLS_GUVNOR_CHAGNE_SET_XML_PATH")));

               ResourceFactory.getResourceChangeScannerService().start();
               ResourceFactory.getResourceChangeNotifierService().start();

               if (knowledgeAgent != null && knowledgeAgent.getKnowledgeBase()!=null &&
!knowledgeAgent.getKnowledgeBase().getKnowledgePackages().isEmpty()) {
                       knowledgeBase = knowledgeAgent.getKnowledgeBase();
               }
               logger.info("Group Rule Engine is ready to use..!!");
       }

       public void reloadKnowledgeBase() {
               if (knowledgeAgent != null && knowledgeAgent.getKnowledgeBase()!=null &&
!knowledgeAgent.getKnowledgeBase().getKnowledgePackages().isEmpty()) {
                       knowledgeBase = knowledgeAgent.getKnowledgeBase();
                       logger.debug("KnowledgeBase reloaded..!!");
               } else {
                       logger.info("KnowledgeBase not reloaded..!!");
                       ResourceFactory.getResourceChangeScannerService().stop();
                       ResourceFactory.getResourceChangeNotifierService().stop();
                       init();
               }
       }

reloadKnowledgeBase() is called once in application during Login. The
problem is occurring in Development application. When I am using that
Change-Set.xml in my local application, it is working perfectly fine. I m
not getting the problem. I bounced both Jboss and application servers but
still no luck!

--
View this message in context: http://drools.46999.n3.nabble.com/reloadKnowledgeBase-java-lang-NullPointerException-tp3295019p3295019.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users