Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1242

OSGi bundle for couchbase client

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0
    • None
    • 1

    Description

      It would be useful to add support for OSGi on Couchbase Java Client.

      You may find an old entry on this:
      https://forums.couchbase.com/t/osgi-bundle-for-couchbase-client/1129 

      Attachments

        For Gerrit Dashboard: JCBC-1242
        # Subject Branch Project Status CR V

        Activity

          We are getting this error:

          org.osgi.framework.BundleException: Could not create bundle object.
          .
          .
          .
          Caused by: java.lang.IllegalArgumentException: invalid version "0.31.0}": non-numeric "0}"

          Manifest-Version: 1.0
          Bundle-Description: The official Couchbase JVM Core IO Library
          Automatic-Module-Name: com.couchbase.client.core
          Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
          Bundle-SymbolicName: core-io
          Built-By: subhashni
          Bundle-ManifestVersion: 2
          Bundle-DocURL: http://couchbase.com
          Bundle-Vendor: Couchbase, Inc.
          Import-Package: rx;version="[1.3.7,1.3.7]",io.opentracing;version="[0.31.0,0.31.0}]",org.apache.log4j;version="[1.2.17,1.2.17]";resolution:=optional,org.slf4j;version="[1.7.7,1.7.7]";resolution:=optional
          Export-Package: com.couchbase.client.core;version="1.6.2",com.couchbas
          e.client.deps;version="1.6.2"
          Bundle-Name: Couchbase JVM Core IO
          Bundle-Version: 1.6.2
          Created-By: Apache Maven 3.5.4
          Build-Jdk: 1.8.0_172

          juan.rodriguezc Juan Francisco Rodriguez added a comment - We are getting this error: org.osgi.framework.BundleException: Could not create bundle object. . . . Caused by: java.lang.IllegalArgumentException: invalid version "0.31.0}": non-numeric "0}" Manifest-Version: 1.0 Bundle-Description: The official Couchbase JVM Core IO Library Automatic-Module-Name: com.couchbase.client.core Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-SymbolicName: core-io Built-By: subhashni Bundle-ManifestVersion: 2 Bundle-DocURL: http://couchbase.com Bundle-Vendor: Couchbase, Inc. Import-Package: rx;version=" [1.3.7,1.3.7] ",io.opentracing;version=" [0.31.0,0.31.0}] ",org.apache.log4j;version=" [1.2.17,1.2.17] ";resolution:=optional,org.slf4j;version=" [1.7.7,1.7.7] ";resolution:=optional Export-Package: com.couchbase.client.core;version="1.6.2",com.couchbas e.client.deps;version="1.6.2" Bundle-Name: Couchbase JVM Core IO Bundle-Version: 1.6.2 Created-By: Apache Maven 3.5.4 Build-Jdk: 1.8.0_172

          Juan Francisco Rodriguez yes this looks like a typo in the manifest. we'll get it fixed

          daschl Michael Nitschinger added a comment - Juan Francisco Rodriguez yes this looks like a typo in the manifest. we'll get it fixed

          Hi Michael Nitschinger, any news on this issue? Thanks!

           

          juan.rodriguezc Juan Francisco Rodriguez added a comment - Hi Michael Nitschinger , any news on this issue? Thanks!  

          Hi Juan Francisco Rodriguez, it would be great if you can verify the jars attached, as per last communication rxjava dependency was missing, but the OSGi module for rxjava has to be installed in the environment.  

          subhashni Subhashni Balakrishnan (Inactive) added a comment - Hi Juan Francisco Rodriguez , it would be great if you can verify the jars attached, as per last communication rxjava dependency was missing, but the OSGi module for rxjava has to be installed in the environment.  

          Hi Subhashni.
          We have reviewed the jars and we have put the OSGi dependency for rxjava. Rxjava problems were solved but now we have problems with the opentracing-api dependency.
          That dependency isn´t ready for the OSGi framework and core-io.jar uses that dependency.

          How could we solve it?

          Thanks.

          jmochales Jorge García-Mochales added a comment - Hi Subhashni. We have reviewed the jars and we have put the OSGi dependency for rxjava. Rxjava problems were solved but now we have problems with the opentracing-api dependency. That dependency isn´t ready for the OSGi framework and core-io.jar uses that dependency. How could we solve it? Thanks.

          Yes, thats true, we didn't not shade the dependency because there would be a mismatch when users pull in tracers which are compatible with other versions, so as to give the flexibility to override. 

          There can be a request made to open tracing owners in github to create OSGi module, it would be better if they create them as they maintain it. 

          subhashni Subhashni Balakrishnan (Inactive) added a comment - Yes, thats true, we didn't not shade the dependency because there would be a mismatch when users pull in tracers which are compatible with other versions, so as to give the flexibility to override.  There can be a request made to open tracing owners in github to create OSGi module, it would be better if they create them as they maintain it. 

          Hi Subhashni Balakrishnan, finally there will be official support to OSGi module?

          juan.rodriguezc Juan Francisco Rodriguez added a comment - Hi Subhashni Balakrishnan , finally there will be official support to OSGi module?

          Juan Francisco Rodriguez can you please try 2.7.4 and see if it works for you?

          daschl Michael Nitschinger added a comment - Juan Francisco Rodriguez can you please try 2.7.4 and see if it works for you?
          jmochales Jorge García-Mochales added a comment - - edited

          Michael Nitschinger , we have installed the versión 2.7.4 and we have the same problem, opentracing-api dependency  isn´t ready for the OSGi framework.

          What can we do?

          jmochales Jorge García-Mochales added a comment - - edited Michael Nitschinger , we have installed the versión 2.7.4 and we have the same problem, opentracing-api dependency  isn´t ready for the OSGi framework. What can we do?

          Hi Jorge García-Mochales

          I understand that this is the case, but opentracing-api is a standalone open source project which we do not have directly influence on. If you need OSGi support in opentracing, can you please engage with their community over here: https://github.com/opentracing/opentracing-java

          I am not an OSGi expert, but as a second approach I think there are plugins out there which help make non-OSGi ready dependencies "ready" as well.

          daschl Michael Nitschinger added a comment - Hi Jorge García-Mochales I understand that this is the case, but opentracing-api is a standalone open source project which we do not have directly influence on. If you need OSGi support in opentracing, can you please engage with their community over here: https://github.com/opentracing/opentracing-java I am not an OSGi expert, but as a second approach I think there are plugins out there which help make non-OSGi ready dependencies "ready" as well.

          Hi Michael Nitschinger

          Yes, we have a java-client of Couchbase adapted to OSGi built with Maven plugins, but we would need a oficial version adapted to OSGi tested by Couchbase.

           

          jmochales Jorge García-Mochales added a comment - Hi Michael Nitschinger Yes, we have a java-client of Couchbase adapted to OSGi built with Maven plugins, but we would need a oficial version adapted to OSGi tested by Couchbase.  

          People

            daschl Michael Nitschinger
            juan.rodriguezc Juan Francisco Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty