[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2689) [drools-spring] KnowledgeSessionDefinitionParser generates nullpointerexception on parsing spring xml file due to missing class attribute on bean

Alex Wood (JIRA) jira-events at lists.jboss.org
Sat Nov 20 16:52:53 EST 2010


    [ https://jira.jboss.org/browse/JBRULES-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564453#comment-12564453 ] 

Alex Wood commented on JBRULES-2689:
------------------------------------

You can work around this issue by setting the class attribute equal to the empty string.  Just a tip until they get it fixed.

> [drools-spring] KnowledgeSessionDefinitionParser generates nullpointerexception on parsing spring xml file due to missing class attribute on bean
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-2689
>                 URL: https://jira.jboss.org/browse/JBRULES-2689
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.1.0.FINAL
>            Reporter: David Coleman
>            Assignee: Mark Proctor
>            Priority: Minor
>
> The error below is generated on application load when a spring bean does not specify the class attribute. Spring beans do not need to specify the class attribute as it can use the attribute parent to inherit other spring beans.
> Caused by: java.lang.NullPointerException
> 	at org.drools.container.spring.namespace.KnowledgeSessionDefinitionParser.parseInternal(KnowledgeSessionDefinitionParser.java:287)
> 	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:136)
> 	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)
> The equals comparison on 287 should be reversed to avoidthe null pointer exception but it should also take the class of the parent into account if it has been defined.

-- 
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