-
Bug
-
Resolution: Done
-
Major
-
jBPM 4.0
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.
- is related to
-
JBPM-2859 spring3 cause autowire exception
- Resolved