Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1172

bson-ruby's org.bson.ByteBuf clashes with Java driver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: bson-5.0.0, 12_01_17
    • Component/s: BSON
    • Labels:
    • Environment:
      jruby
    • Backwards Compatibility:
      Fully Compatible

      Description

      `bson-ruby` includes a jar file that defines a few classes in the org.bson package.

      Java/Scala drivers define several classes in the org.bson package.

      Running `mongo-ruby-driver` within JRuby Embed, along with the Java/Scala driver in the top-level JVM, leads to namespace clashes.

      To test:

      • Create simple Scala app with the Scala driver.
      • Use JRuby Embed and include `mongo-ruby-driver` in your ScriptingContainer.
      • Try loading any document from within the ScriptingContainer. The operation will fail if your classpath prefers the Java driver's version of org.bson.ByteBuf.

      The solution is simple: https://github.com/fedenusy/bson-ruby/commit/d5160e41c256201a410ddc11aea590bb80131e1d

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              fedenusy13 Federico Nusymowicz
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: