1 Reply Latest reply on Jul 31, 2012 4:46 PM by Michał Warecki

    Issue when trying to import javax.ejb in my OSGI bundle

    Vincent Mahe Newbie

      Hello everyone,


      I am trying to use JPA and Hibernate in order to handle my Bean persistency in my bundle.


      It was quite hard to have hibernate work with Fuse ESB but I found out that when you install the following custom feature, it works fine :

        <feature name="my-jpa-hibernate" version="4.4.1-fuse-07-11">





      I wanted to share this with you all because it was very difficult to find this


      Now the issue I have is that I have the following DAO declared as an <osgi:service> in my Spring config :


      public class UserDAOImpl implements UserDAO {



      private EntityManager em;


      But for some reason I don't know, my EntityManager variable is null.

      Looking at the following article

      I thought I could solve this by adding the @Stateless EJB annotation to my DAO class.


      But now the issue I have when I deploy my bundle is that Karaf tells me it can't find the missing package javax.ejb.


      I'v added the following dependency :






      to my pom.xml file.

      And also added this to my bundle plugin configuration :



      but it stills tells me that the javax.ejb package is missing.


      Any idea ?








      Edited by: vmahe on Jul 31, 2012 5:00 PM