Bug 8294 - java.sql.SQLException: Unable to load authentication plugin
Summary: java.sql.SQLException: Unable to load authentication plugin
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 05:19 CET by Jan Pihlgren
Modified: 2013-11-23 16:14 CET (History)
0 users

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Jan Pihlgren 2012-12-04 05:19:44 CET
Description of problem:
I'm writing a java program to connect to a MariaDB.

Software: MySQL
Software version: 5.5.25-MariaDB - Mageia - MariaDB Community Edition (GPL)

The compilation run with no errors.
But running the program I get the following errormessage:

Connecting to database...
java.sql.SQLException: Unable to load authentication plugin ''.
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:923)
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1715)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
        at java.sql.DriverManager.getConnection(DriverManager.java:579)
        at java.sql.DriverManager.getConnection(DriverManager.java:221)
        at bison.main(bison.java:24)
Goodbye!

This is the part of the program:
   public static void main(String[] args) {
   Connection conn = null;
   Statement stmt = null;
   try{
      //STEP 2: Register JDBC driver
      Class.forName("com.mysql.jdbc.Driver");

      //STEP 3: Open a connection
      System.out.println("Connecting to database...");
      conn = DriverManager.getConnection(DB_URL, USER, PASS);

      //STEP 4: Execute a query
      System.out.println("Creating statement...");
      stmt = conn.createStatement();

The user and the user password is checkt and OK. It is possible to access the database and do transactions by the consol.

I found at Internet at least one post that says that this will be a known issue with MariaDB but not with MySQL.
Comment 1 Jan Pihlgren 2012-12-05 06:05:06 CET
Now I have used Netbeans 7.2 and made a project that I compiled within Netbeans (Run) and the program run OK.
My thougt is that the problem maybe in the javac compiler that for some reason
will include "authentication plugin" or that there might be some error when doing it.
Comment 2 Jan Pihlgren 2012-12-13 08:04:00 CET
I have found this at the webb:

Posted 04 October 2012 - 01:14 PM
Hello Adriano,

The cause of this issue is new version of OpenCMS and MariaDB. We'll research for this problem.
We can offer you a solution:
Please change topology of your environment this way: choose MySQL database instead of MariaDB.
It should help.

For me it looks like that this is a known bug in MariaDB or?
Comment 3 Manuel Hiebel 2013-10-22 12:11:33 CEST
This message is a reminder that Mageia 2 is nearing its end of life.
Approximately one month from now Mageia will stop maintaining and issuing updates for Mageia 2. At that time this bug will be closed as WONTFIX (EOL) if it remains open with a Mageia 'version' of '2'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Mageia version prior to Mageia 2's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Mageia 2 is end of life.  If you would still like to see this bug fixed and are able to reproduce it against a later version of Mageia, you are encouraged to click on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Mageia release includes newer upstream software that fixes bugs or makes them obsolete.

-- 
The Mageia Bugsquad
Comment 4 Manuel Hiebel 2013-11-23 16:14:50 CET
Mageia 2 changed to end-of-life (EOL) status on ''22 November''. Mageia 2 is no
longer maintained, which means that it will not receive any further security or
bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Mageia
please feel free to click on "Version" change it against that version of Mageia
and reopen this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--
The Mageia Bugsquad

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.