[
https://jira.jboss.org/jira/browse/JBPM-2478?page=com.atlassian.jira.plug...
]
Keith Byrne commented on JBPM-2478:
-----------------------------------
I ran into this same problem, except the System Properties were being injected into the
RepositoryCache. This resulted in DeploymentClassLoaders being put in the System
Properties, which caused maven unit test reports not to be generated because it calls
System.getProperties().getPropertyNames(). That call fails with a ClassCastException
because there are now non-Strings as keys in the System Properties. I got around the
problem by adding a dummy Hashtable bean to my Spring config.
Is there a way to turn off autowiring for specific classes?
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
Fix For: jBPM 4.x
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