Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31015

MariaDB Connect JavaWrappers.Jar not found

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.11.2
    • N/A
    • None
    • Ubuntu Docker Image

    Description

      I have a docker container which includes MariaDB v10.11, openjdk 8, ,MariaDB Connect and Javawrapper and java connector 8.

      The docker image is created like so:

      FROM mariadb:10.11
       
      RUN apt update \
          && apt install openjdk-8-jdk -y \
          && export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 \
          && apt install curl -y
       
      RUN curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash -s -- --mariadb-server-version="mariadb-10.11"
       
      RUN apt install mariadb-plugin-connect -y
          
      COPY JavaWrappers.jar /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/
      COPY mariadb-java-client-3.1.3.jar /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/
      # Additionally copy to plugin location
      COPY JavaWrappers.jar /usr/lib/mysql/plugin/
      COPY mariadb-java-client-3.1.3.jar /usr/lib/mysql/plugin/
      COPY ./connect.cnf /etc/mysql/mariadb.conf.d/connect.cnf
      RUN chmod 0444 /etc/mysql/mariadb.conf.d/connect.cnf
      

      It includes the Java Connector (Java 8 Connector v3.1.3) and Java Wrapper from MDEV-1093.

      Using this container image I ran two instances of MariaDB to test and migrate data from MariaDB to MariaDB using the following procedures:

      On MariaDB Image One:
      Create sample data

      create table sample (bloodType varchar(100) not null);
      INSERT INTO sample (bloodType) VALUES ("O"), ("A"), ("AB");
      

      On MariaDB Image Two:
      Use Connect Engine To Migrate Data From Server One to Two

      create table sample_server1 (
        bloodType varchar(100) not null)
      engine=CONNECT table_type=JDBC
      connection='jdbc:mariadb://10.50.6.101:3306/test?user=root&password=r00t';
       
      create table sample like sample_server1;
      set global connect_jvm_path="/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server";
      alter table sample engine=InnoDB;
      

      Upon the last line I am greeted with the following error:

      MariaDB [test]> alter table sample engine=InnoDB;
      ERROR 1296 (HY000): Got error 174 'ERROR: class /usr/lib/mysql/plugin/JavaWrappers.jar not found!' from CONNECT
      

      As a sanity check I checked the directory to ensure server 2 has the necessary jar files including JavaWrappers.jar as shown in the attached screenshot. Why is this failing?

      Attachments

        Issue Links

          Activity

            People

              anel Anel Husakovic
              advra Adrian Alonzo
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.