Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-703

ClassNotFoundException when trying to connect using two-authentication in an OSGI environment.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.4.2
    • Component/s: authentication
    • Labels:
      None
    • Environment:
      Windows+Glassfish+Blueprint

      Description

      There is bug in your mariadb-java-client jar version 2.4.1 that means it doesn't work within an OSGI environment when the database connections is secured with SSL/TLS using two way authentication.
      When attempting a database connection you get a ClassNotFoundException javax.security.auth.x509.X509Principal.

      This is due a couple of missing import statements in the pom.xml that is used to build the jar file.

      You currently have this

                       <Import-Package> 
                                        javax.naming, 
                                        javax.management, 
                                        javax.net;resolution:=optional, 
                                        javax.net.ssl;resolution:=optional, 
                                        javax.sql,javax.transaction.xa;resolution:=optional, 
                                        org.slf4j;resolution:=optional, 
                        </Import-Package> 
      

      But I have found 3 additional imports need to be added, giving this:

                        <Import-Package> 
                                        javax.naming, 
                                        javax.management, 
                                        javax.net;resolution:=optional, 
                                        javax.net.ssl;resolution:=optional, 
                                        javax.sql,javax.transaction.xa;resolution:=optional, 
                                        org.slf4j;resolution:=optional, 
                                        waffle.windows.auth;resolution:=optional, 
                                        waffle.windows.auth.impl;resolution:=optional, 
                                        
                                        * 
                        </Import-Package> 
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              diego dupin Diego Dupin
              Reporter:
              simonh Simon Haslam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: