Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2868

NullPointerException in KnowledgeSessionDefinitionParser

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 5.2.0.M1
    • Fix Version/s: 5.2.0.M1
    • Component/s: drools-spring
    • Labels:
      None

      Description

      Stack trace:
      Caused by: java.lang.NullPointerException
      at org.drools.container.spring.namespace.KnowledgeSessionDefinitionParser.parseInternal(KnowledgeSessionDefinitionParser.java:321)
      at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
      at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)

      For example, my applicationContext.xml:

      .....
      <bean id="config" factory-method="getConfiguration" factory-bean="configFactory" />
      .....

      solution:

      class: org.drools.container.spring.namespace.KnowledgeSessionDefinitionParser
      method: parseInternal

      line :
      if ( def.getBeanClassName().equals( KnowledgeAgentBeanFactory.class.getName() ) ) {

      should be replaced with somethig like this:
      if ( KnowledgeAgentBeanFactory.class.getName().equals( def.getBeanClassName() ) ) {

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  KrisVerlaenen Kris Verlaenen
                  Reporter:
                  urdo2 bodi bajk
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: