-1

I want to access MongoDB collections through MariaDB 10.4.17. Both are installed on my local machine running Windows 10.

Software listening port
MongoDB 27017
MariaDB 15501

I installed the MariaDB Connect Engine using

INSTALL SONAME 'ha_connect'; 

on the MariaDB CLI

The collection I want to access is named receptors and has documents like these

{ "_id" : 1, "taste" : "Umami", "receptor_name" : "mGluR4", "uniprot_id" : "Q14833" } 

this is the create table statement I used on mariadb

CREATE TABLE receptors ( _id varchar(24) NOT NULL, taste varchar(64) DEFAULT NULL, receptor_name varchar(64) DEFAULT NULL, uniprot_id varchar(64) DEFAULT NULL ) ENGINE=CONNECT DEFAULT CHARSET=utf8mb4 CONNECTION='mongodb://localhost:27017' table_type=MONGO tabname='receptors' data_charset=utf8 

The table was created, but when I execute

SELECT * FROM receptors 

I get this error:

ERROR 1296 (HY000): Got error 174 'Error 126 loading module jvm.dll: The specified module could not be found. ' from CONNECT 

I fixed it by giving a path to JVM like this

set global connect_jvm_path="C://Program Files//Java//jdk-12.0.1//bin//server" 

Next error I got is this which I am unable to figure out

ERROR 1296 (HY000): Got error 174 'ERROR: class wrappers/Mongo3Interface not found!' from CONNECT 

I have the JavaWrappers file here: C:\Program Files\MariaDB 10.4\lib\plugin

It should contain the Mongo3Interface but does not.

I have no idea what I am doing wrong, and the MariaDB documentation isn't much help.

1 Answer 1

0

Per doc set the CLASSPATH environment variable or connect_class_path system server variable to C:\Program Files\MariaDB 10.4\lib\plugin

Note: 10.3.2 was an Alpha release and is not recommended for use.

Also: Why do you have a JavaWrapper directory that lists MariaDB-10.4 when you say you are running 10.3?

2
  • Sorry I forgot to update that part of the question, changing that rn, I was using 10.3.2 earlier then upgraded to 10.4.17, I will try this solution and get back to you Commented Jan 30, 2021 at 12:50
  • Even after setting class path like this "set global connect_class_path="C://Program Files//MariaDB 10.4//lib//plugin";" the same error persists Commented Jan 30, 2021 at 12:53

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.