[jboss-jira] [JBoss JIRA] Created: (JBRULES-2930) KnowledgeAgentDefinitionParser can get NPEs

stevearoonie (JIRA) jira-events at lists.jboss.org
Mon Mar 21 20:49:45 EDT 2011


KnowledgeAgentDefinitionParser can get NPEs
-------------------------------------------

                 Key: JBRULES-2930
                 URL: https://issues.jboss.org/browse/JBRULES-2930
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-spring
    Affects Versions: 5.1.1.FINAL
            Reporter: stevearoonie
            Assignee: Mark Proctor


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="messageTemplateService" class="au.com.promedicus.template.freemarker.FreemarkerTemplateService">
		<constructor-arg ref="workflowFreemarkerConfiguration"/>
	</bean>
	
	<bean id="workflowFreemarkerConfiguration" parent="freemarkerConfiguration">
		<property name="templateLoader">
			<bean class="au.com.promedicus.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() ) ) {



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list