[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2930) KnowledgeAgentDefinitionParser can get NPEs
stevearoonie (JIRA)
jira-events at lists.jboss.org
Tue Jul 12 19:22:23 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613823#comment-12613823 ]
stevearoonie commented on JBRULES-2930:
---------------------------------------
Until this is fixed the workaround is to redundantly specify the bean class in the child bean definitions. Note this is all bean definitions, not just Drools related ones.
> 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: Mauricio Salatino
> Fix For: 5.3.0.Beta1
>
>
> 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() ) ) {
--
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