title: FactoryBeanNotInitializedException while autowire EntityManager into service
body: <p><strong>Question:</strong> From where to start when trying to resolve <code>FactoryBeanNotInitializedException</code> exception while injecting <code>EntityManager</code> into service?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>@Service
  public class MyService {
      ....
      @Autowired
      private EntityManager entityManager;
  </code></pre>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
  </code></pre>