[
https://jira.jboss.org/jira/browse/JBPM-2478?page=com.atlassian.jira.plug...
]
Michael Feichtegger updated JBPM-2478:
--------------------------------------
Summary: jBPM4 and Spring: unintended wiring PropertiesFactoryBean to
RepositoryCacheImpl.deployments field (was: jBPM4 and Spring : unintended wiring
PropertiesFactoryBean to RepositoryCacheImpl.deployments field)
jBPM4 and Spring: unintended wiring PropertiesFactoryBean to
RepositoryCacheImpl.deployments field
--------------------------------------------------------------------------------------------------
Key: JBPM-2478
URL:
https://jira.jboss.org/jira/browse/JBPM-2478
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0
Environment: Windows XP Service Pack 3, JDK 1.6.0_13, Eclipse Galileo JavaEE,
jBPM4
Reporter: Michael Feichtegger
If you define a spring bean (<bean name="configProperties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean" ) this
bean will be an instance of java.util.Hashtable (java.util.Properties) at runtime.
During jBPM initialization various ObjectDescriptiors create instances they describe. So
do the descriptor of org.jbpm.pvm.internal.repository.RepositoryCacheImpl.
After creation the auto-wire mechanism tries to set-up the fields. In case of
RepositoryCacheImpl there is just one field: Map<String, Object> deployments.
The "configProperties" bean will be found in the SpringContext since
java.util.Hashtable implements java.util.Map and the field
"RepositoryCacheImpl.deployments" will be set because there is just one object
of the requested type (java.util.Map). The isAutoWireEnabled attribute is set to
"true" (hardcoded) at RepositoryCacheBinding.
This behavior causes a NullPointerException when deleting a deployment
RepositoryCacheImpl.java line 45
deployments.put(deploymentId, null);
That statement works on java.util.HashMap (created when instantiate RepositoryCacheImpl)
but not on java.util.Hashtable.
That behaviour might influence several other components.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira