title: Importing a OSGi service that is a singleton bean (that has a factory method)
body: <p><strong>How do I import the exported OSGi service that's a Singleton bean?</strong></p>
  
  <p>I end up getting the Exception as follows:</p>
  
  <pre><code>Unable to start blueprint container for bundle opaClient
  org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to find a matching constructor on class com.opa.gateway.OPAGateway for arguments [] when instantiating bean opaGateway
      at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:336)
  </code></pre>
  
  <hr>
  
  <p><strong>My Blueprint xml where the service is exported is as follows:</strong></p>
  
  <pre><code>&lt;bean id="opaGateway" class="com.opa.gateway.OPAGateway" factory-method="getInstance"/&gt;
  &lt;service ref="opaGateway" interface="com.opa.gateway.IOPAGateway" /&gt;
  </code></pre>
  
  <p><strong>And the service is referenced in another bundle as follows:</strong></p>
  
  <pre><code>&lt;reference interface="com.opa.gateway.OPAGateway" component-name="opaGateway" availability="mandatory" /&gt;
  </code></pre>
  
  <p>Is there a way to directly reference a singleton bean that's a OSGi service? </p>