Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2531

Phoenix thin-client jar has incorrect META-INF/services/java.sql.Driver file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 4.7.0
    • None
    • None

    Description

      Trying to hook up the thin-client to pherf, I was having some troubles with being unable to find the thin-client Driver. I knew that we should be getting it loaded by the service definition contained in the jar META-INF/services/java.sql.Driver.

      Upon inspection of the "normal" jar produced by phoenix-server-client, the contents of the file were as we expect org.apache.phoenix.queryserver.client.Driver. However, the top-level "thin-client" jar we bundle in the tarball had a value of org.apache.calcite.avatica.remote.Driver instead.

      It seems like when we built phoenix-$VERSION-thin-client.jar (jar-with-dependencies is all it is, really), Avatica's META-INF/services/java.sql.Driver was overwriting the copy we had in phoenix-server-client/src/main/resources. I'm not sure how/why we didn't notice this yet (for example, why did sqlline-thin.py work?), but it's definitely busted for how it should work.

      It's a simple enough fix to explicitly set the file in the assembly descriptor.

      Attachments

        1. PHOENIX-2531.patch
          1 kB
          Josh Elser

        Activity

          People

            elserj Josh Elser
            elserj Josh Elser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: