[JBoss JIRA] Created: (JBRULES-2868) NullPointerException in KnowledgeSessionDefinitionParser
by bodi bajk (JIRA)
NullPointerException in KnowledgeSessionDefinitionParser
--------------------------------------------------------
Key: JBRULES-2868
URL: https://issues.jboss.org/browse/JBRULES-2868
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-spring
Affects Versions: 5.2.0.M1
Reporter: bodi bajk
Assignee: Mark Proctor
Fix For: FUTURE
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() ) ) {
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Created: (JBRULES-2689) [drools-spring] KnowledgeSessionDefinitionParser generates nullpointerexception on parsing spring xml file due to missing class attribute on bean
by David Coleman (JIRA)
[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.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Created: (JBRULES-2727) NullPointerException due to abstract Spring beans in KnowledgeSessionDefinitionParser
by Silvio Wangler (JIRA)
NullPointerException due to abstract Spring beans in KnowledgeSessionDefinitionParser
-------------------------------------------------------------------------------------
Key: JBRULES-2727
URL: https://jira.jboss.org/browse/JBRULES-2727
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.1.1.FINAL
Environment: Ubuntu 10.10, Windows XP, Java 6
Reporter: Silvio Wangler
Assignee: Mark Proctor
Priority: Blocker
Fix For: 5.2.0.M1
This bug is located in the drools-spring component in class _org.drools.container.spring.namespace.KnowledgeSessionDefinitionParser.java_
The class compares each Spring bean with a non NullPointer safe equals call.
{code}
// find any kagent's for the current kbase and assign
for ( String beanName : parserContext.getRegistry().getBeanDefinitionNames() ) {
BeanDefinition def = parserContext.getRegistry().getBeanDefinition(beanName); // is null if the Spring bean is abstract
if ( def.getBeanClassName().equals( KnowledgeAgentBeanFactory.class.getName() ) ) { // NullPointerException comes here due to the abstract bean that does not have a bean definition
PropertyValue pvalue = def.getPropertyValues().getPropertyValue( "kbase" );
RuntimeBeanReference tbf = ( RuntimeBeanReference ) pvalue.getValue();
if ( kbase.equals( tbf.getBeanName() ) ) {
factory.addPropertyValue( "knowledgeAgent", new RuntimeBeanReference( beanName ) );
}
}
}
{code}
We use abstract beans in our Spring project and it seems that an abstract bean does not have a _BeanDefinition_
{code}
<bean id="i18NServiceConfig" abstract="true">
<property name="xxx">
<ref local="yyy" />
</property>
</bean>
<bean class="de.corag.bpm.cone.service.i18n.I18NServiceImpl" parent="i18NServiceConfig">
<property name="messageDao"><ref bean="messageDao"/></property>
</bean>
{code}
if you change the equals statement like this no NullPointerException would be thrown
{code}
// find any kagent's for the current kbase and assign
for ( String beanName : parserContext.getRegistry().getBeanDefinitionNames() ) {
BeanDefinition def = parserContext.getRegistry().getBeanDefinition(beanName);
if ( KnowledgeAgentBeanFactory.class.getName().equals( def.getBeanClassName() ) ) { // NullPointerException comes here due to the abstract bean that does not have a bean definition
PropertyValue pvalue = def.getPropertyValues().getPropertyValue( "kbase" );
RuntimeBeanReference tbf = ( RuntimeBeanReference ) pvalue.getValue();
if ( kbase.equals( tbf.getBeanName() ) ) {
factory.addPropertyValue( "knowledgeAgent", new RuntimeBeanReference( beanName ) );
}
}
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Created: (JBJPA-34) CLONE - Hibernate logs warning for PersistenceUnitInfo.newTempClassLoader() == null, which it always is in EJB3
by Brad Maxwell (JIRA)
CLONE - Hibernate logs warning for PersistenceUnitInfo.newTempClassLoader() == null, which it always is in EJB3
---------------------------------------------------------------------------------------------------------------
Key: JBJPA-34
URL: https://issues.jboss.org/browse/JBJPA-34
Project: JBoss JPA
Issue Type: Bug
Components: mcint
Affects Versions: 1.0.0
Environment: JBoss Enterprise Application Platform 5.0.1
Reporter: Brad Maxwell
Assignee: Brad Maxwell
Fix For: 1.0.1
Looks like https://jira.jboss.org/browse/EJBTHREE-982 did not make it into JBoss 5
WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getN
ewTempClassLoader() is null.
Coming from org.hibernate.ejb.Ejb3Configuration
private void addXMLEntities(List<String> xmlFiles, PersistenceUnitInfo info, List<String> entities) {
//TODO handle inputstream related hbm files
ClassLoader newTempClassLoader = info.getNewTempClassLoader();
if (newTempClassLoader == null) {
log.warn( "Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null." );
return;
}
However, implementation of org.jboss.ejb3.entity.PersistenceUnitInfoImpl has:
public ClassLoader getNewTempClassLoader()
{
return null;
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Created: (JBJPA-32) Hibernate logs warning for PersistenceUnitInfo.newTempClassLoader() == null, which it always is in EJB3
by Brad Maxwell (JIRA)
Hibernate logs warning for PersistenceUnitInfo.newTempClassLoader() == null, which it always is in EJB3
-------------------------------------------------------------------------------------------------------
Key: JBJPA-32
URL: https://jira.jboss.org/browse/JBJPA-32
Project: JBoss JPA
Issue Type: Bug
Components: mcint
Affects Versions: 1.0.0
Environment: JBoss Enterprise Application Platform 5.0.1
Reporter: Brad Maxwell
Assignee: Carlo de Wolf
Looks like https://jira.jboss.org/browse/EJBTHREE-982 did not make it into JBoss 5
WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getN
ewTempClassLoader() is null.
Coming from org.hibernate.ejb.Ejb3Configuration
private void addXMLEntities(List<String> xmlFiles, PersistenceUnitInfo info, List<String> entities) {
//TODO handle inputstream related hbm files
ClassLoader newTempClassLoader = info.getNewTempClassLoader();
if (newTempClassLoader == null) {
log.warn( "Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null." );
return;
}
However, implementation of org.jboss.ejb3.entity.PersistenceUnitInfoImpl has:
public ClassLoader getNewTempClassLoader()
{
return null;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Created: (HIBERNATE-124) Superfluous event listener in Hibernate code
by Tom Ross (JIRA)
Superfluous event listener in Hibernate code
--------------------------------------------
Key: HIBERNATE-124
URL: https://issues.jboss.org/browse/HIBERNATE-124
Project: Hibernate Integration
Issue Type: Bug
Environment: JBoss EAP 5.1
Reporter: Tom Ross
Assignee: Steve Ebersole
Priority: Minor
When Hibernate initialises it prints a warning message "InitialContext did not implement EventContext". This is a result of a cast in the SessionFactoryObjectFactory.addInstance() method which is trying to cast javax.naming.InitialContext object to EventContext while trying to add an event listener to it. javax.naming does not implement the interface EventContext so the cast fails and the listener is never register. As it stands this code is completely superfluous at the moment since it is never used.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Created: (JGRP-1259) Reduce size of large headers: place data into message itself
by Bela Ban (JIRA)
Reduce size of large headers: place data into message itself
------------------------------------------------------------
Key: JGRP-1259
URL: https://jira.jboss.org/browse/JGRP-1259
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.12
When we send a view around, we essentially create an empty Message and attach a GmsHeader.VIEW with the new view.
If the view consists of 200 members, the view header will be very big and the message is still empty (null buffer).
The issue here is that FRAG2 only fragments the message's buffer (this is faster), and so a huge header might add so much to the size of a serialized message that the transport (UDP) won't be able to send it !
SOLUTION: still use the header (e.g. GmsHeader.VIEW), but place potentially large payloads into the message. This will allow FRAG2 to fragment the message very efficiently.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months