Daniel Zweifel created ARIES-1008:
-------------------------------------
Summary: Exception with tx decorated bean as ref argument of
factory method
Key: ARIES-1008
URL: https://issues.apache.org/jira/browse/ARIES-1008
Project: Aries
Issue Type: Bug
Components: Blueprint
Affects Versions: blueprint-core-1.0.1
Environment: FuseESB 7.1 on Windows 7
Reporter: Daniel Zweifel
I have a bean and a factory:
public class SimpleBean {
public SimpleBean() {
}
}
public class BeanFactory {
public SimpleBean createBean(SimpleBean bean) {
return bean;
}
}
and the blueprint configuration:
<bean id="factoryBean" class="ch.suisa.common.utils.BeanFactory"/>
<bean id="simpleBean" class="ch.suisa.common.utils.SimpleBean">
<tx:transaction method="*" value="Required" />
</bean>
<bean id="extBean" factory-ref="factoryBean" factory-method="createBean">
<argument ref="simpleBean"/>
</bean>
When I start the bundle I get the following exception:
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
find a matching factory method createBean on class
ch.suisa.common.utils.BeanFactory for arguments
[org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@2ae73efd]
when instanciating bean extBean
at
org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:303)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_04]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_04]
at
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:649)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:356)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintExtender.checkBundle(BlueprintExtender.java:325)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:243)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:471)[8:org.apache.aries.blueprint.core:1.0.1.fuse-71-047]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:198)[10:org.apache.aries.util:1.0.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:128)[10:org.apache.aries.util:1.0.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:468)[10:org.apache.aries.util:1.0.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:161)[10:org.apache.aries.util:1.0.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:117)[10:org.apache.aries.util:1.0.0]
at
org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
at
org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:696)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:484)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
at
org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4479)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
at
org.apache.felix.framework.Felix$4.run(Felix.java:2019)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
at
org.apache.felix.framework.Felix$5.run(Felix.java:2061)[org.apache.felix.framework-4.0.3.fuse-71-047.jar:]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_04]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_04]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_04]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_04]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_04]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_04]
Without the tx:transaction decoration I can start the bundle. This was working
with the version 7.0 of Fuse (Aries 0.3).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira