Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.11.2
-
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
- relates to
-
MDEV-26218 connect engine JDBC on Debian 10 missing JavaWrappers.jar
-
- Stalled
-
-
MDBF-559 Create blog: Connect SE JDBC table type: Accessing Tables From Another DBMS
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | Storage Engine - Connect [ 10128 ] |
Link | This issue relates to MDEV-26218 [ MDEV-26218 ] |
Assignee | Anel Husakovic [ anel ] |
Attachment | screenshot-1.png [ 69459 ] |
Attachment | screenshot-2.png [ 69521 ] |
Fix Version/s | N/A [ 14700 ] |
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: {code:dockerfile} 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 {code} It includes the Java Connector (Java 8 Connector v3.1.3) and Java Wrapper from[ 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 {code:sql} create table sample (bloodType varchar(100) not null); INSERT INTO sample (bloodType) VALUES ("O"), ("A"), ("AB"); {code} *On MariaDB Image Two:* Use Connect Engine To Migrate Data From Server One to Two {code:sql} 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; {code} Upon the last line I am greeted with the following error: {code:sql} 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 {code} 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? |
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: {code:dockerfile} 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 {code} It includes the Java Connector (Java 8 Connector v3.1.3) and Java Wrapper from [MDEV-1093|https://jira.mariadb.org/browse/MDEV-10936]. 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 {code:sql} create table sample (bloodType varchar(100) not null); INSERT INTO sample (bloodType) VALUES ("O"), ("A"), ("AB"); {code} *On MariaDB Image Two:* Use Connect Engine To Migrate Data From Server One to Two {code:sql} 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; {code} Upon the last line I am greeted with the following error: {code:sql} 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 {code} 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? |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Not a Bug [ 6 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
I should also note my docker deployment has a connect.cnf defined as the following:
[mariadb]
plugin-load-add=ha_connect.so
connect_jvm_path=”/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/amd64/server”
connect_class_path=”/usr/lib/mysql/plugin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/ext/”