Topic
6 replies Latest Post - ‏2013-07-18T11:06:36Z by Ravi's page
Ravi's page
Ravi's page
12 Posts
ACCEPTED ANSWER

Pinned topic Problem in Liberty Feature deployment

‏2013-07-08T07:47:36Z |

Hi All,

As part of custom blueprint namespace we developed one user feature, which has a dependency on org.slf4j package. As part of liberty kernel (kernelCore-1.0.mf) slf4j bundles are started but slf4j API is not exposed. How to solve this issue?

If we add slf4j as part of our feature getting Package uses conflict: Import-Package: org.osgi.service.blueprint; version="[1.0.0,2.0.0)"  exception, as experted. 

  • MarkN
    MarkN
    10 Posts
    ACCEPTED ANSWER

    Re: Problem in Liberty Feature deployment

    ‏2013-07-08T13:30:35Z  in response to Ravi's page

    Hi Ravi, 

    One thing to try would be to add slf4j to your user feature, and then include a ;bundle-symbolic-name=your.slf4j.bundle.symbolic.name directive to those bundles that need to use org.slf4j. You may need to steer clear of using the org.apache.aries.blueprint.ext and org.apache.aries.blueprint.utils packages since they're wired to our version of org.slf4j, which is not exposed to user features. 

    Regards, 

    Mark

    • Ravi's page
      Ravi's page
      12 Posts
      ACCEPTED ANSWER

      Re: Problem in Liberty Feature deployment

      ‏2013-07-08T17:43:13Z  in response to MarkN

      Hi,

      It doesn't sound great, we have a third party bundle in feature which has a dependency on org.slf4jorg.osgi.service.blueprint and org.osgi.util.tracker packages. Any inputs please?

      • MarkN
        MarkN
        10 Posts
        ACCEPTED ANSWER

        Re: Problem in Liberty Feature deployment

        ‏2013-07-11T08:53:39Z  in response to Ravi's page

        Hi Ravi, 

        org.osgi.service.blueprint is a 'marker' package used to ensure class space compatibility as per section 121.3.1 of the OSGi R5 Enterprise spec. You could try removing from import from your third party bundle; it might then work correctly with your own version of slf4j. 

        Regards, 

        Mark

        • This reply was deleted by Ravi's page 2013-07-18T06:48:30Z.
        • Ravi's page
          Ravi's page
          12 Posts
          ACCEPTED ANSWER

          Re: Problem in Liberty Feature deployment

          ‏2013-07-18T07:40:38Z  in response to MarkN

          Hi Mark,

          It is not practically possible to delete org.slf4j dependence from all jars. Do you mean org.slf4j and blueprint together we can't use in LIBERTY osgi ? if it so, it looks scary ? 

          • MarkN
            MarkN
            10 Posts
            ACCEPTED ANSWER

            Re: Problem in Liberty Feature deployment

            ‏2013-07-18T08:51:28Z  in response to Ravi's page

            Hi Ravi, 

            I did not mean to suggest deleting any slf4j dependencies. What I meantwas to remove 'org.osgi.service.blueprint' from any of your bundles' Import-Package headers. 

            If this does not work, please open a PMR and let me know the number so that I can correspond with our service team about it. Thank you!

            Regards, 

            Mark

            • Ravi's page
              Ravi's page
              12 Posts
              ACCEPTED ANSWER

              Re: Problem in Liberty Feature deployment

              ‏2013-07-18T11:06:36Z  in response to MarkN

              Hi Mark,

              service request number is 52085,999,616