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

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 2.4.1
    • 2.4.2
    • authentication
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.