2 Replies Latest reply on Sep 10, 2011 5:01 AM by Vanessa Towers

    OSGi bundle, javaee-api-6.0 library and javax.activation

    Vanessa Towers Newbie

      Hi guys,

       

      I am new to Fuse ESB and OSGi. I have a fairly simple CXF JAXRS service which I am trying to deploy as a OSGi bundle to Fuse ESB.

       

      The service uses javax.activation.DataHandler and so my project includes the javaee-api-6.0 library. I am finding that on deployment I see the following error message:

       

      Error executing command: The bundle "myBundle " could not be resolved. Reason: Missing Constraint: Import-Package

      : javax.activation; version="[6.0.0,7.0.0)"

       

      This is causing me much grief.

       

      A couple of things I have noticed digging around:

       

      in /etc/jre.properties javax.activation is commented out. What is this about?

       

      Also, if I do:

       

      >packages:exports | grep activation

       

      in the shell, I see

       

          0 # javax.activation; version="0.0.0"

          88 javax.activation; version="1.1.0"

         178 org.apache.axiom.util.activation; version="0.0.0"

         178 org.apache.axiom.ext.activation; version="0.0.0"

       

      I'm not really clear what is going on but I think that although javax.activation is floating around in the container it isn't version [6.0.0,7.0.0) or basically a match for my dependency?

       

      Would love some guidance on best way to proceed and clarification on what is happening.

       

      Note that if I don't use a javax.activation.DataHandler in my service deploys fine and starts up.

       

      Thanks in advance.