org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to find a matching factory method createBean on class com.mycompany.BeanFactory

Solution Verified - Updated -

Issue

Trying to create a transaction decorated bean using a Factory class in blueprint results in

org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to find a matching factory method
createBean on class com.mycompany.BeanFactory for arguments 
[org.apache.aries.blueprint.container.BeanRecipe$UnwrapperedBeanHolder@2ae73efd] when instanciating bean extBean

The blueprint definition would be similar to

<bean id="factoryBean" class="com.mycompany.BeanFactory"/>
<bean id="simpleBean" class="com.mycompany.SimpleBean">
  <tx:transaction method="*" value="Required" />
</bean>
<bean id="extBean" factory-ref="factoryBean" factory-method="createBean">
  <argument ref="simpleBean"/>
</bean> 

Environment

  • Fuse ESB Enterprise 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content