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

KnowledgeAgentDefinitionParser can get NPEs

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 6.0.0.Alpha1
    • 5.1.1.FINAL
    • drools-spring
    • None

    Description

      KnowledgeAgentDefinitionParser assumes that a spring bean definition has a bean class name, however when the bean extends a parent then it may not, as in the following example:

      <bean id="freemarkerConfiguration" class="freemarker.template.Configuration">
      </bean>

      <bean id="workflowFreemarkerConfiguration" parent="freemarkerConfiguration">
      <property name="templateLoader">
      <bean class="au.com.core.messaging.freemarker.FreemarkerMessageLayoutTemplateLoader" />
      </property>
      </bean>

      The BeanDefinition for bean "workflowFreemarkerConfiguration" has a null bean class name which causes KnowledgeAgentDefinitionParser.parseInternal to throw an NPE. Specifically this line:

      if ( def.getBeanClassName().equals( StatelessKnowledgeSessionBeanFactory.class.getName() ) ) {

      Attachments

        Activity

          People

            salaboy@gmail.com Mauricio Salatino (Inactive)
            stevearoonie stevearoonie (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Archived:

              PagerDuty