[MDEV-10936] CONNECT engine JDBC type can't find JdbcInterface Created: 2016-10-02  Updated: 2023-05-18  Resolved: 2017-05-16

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform RedHat, Storage Engine - Connect
Affects Version/s: 10.1.18
Fix Version/s: 10.1.24, 10.0.31, 10.2.7

Type: Bug Priority: Major
Reporter: Robert Dyas Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

centOS 7


Attachments: File JavaWrappers.jar    
Issue Links:
Relates
relates to MDEV-31231 Remove JavaWrappers.jar from mariadb-... Closed

 Description   

I have the Oracle JVM installed.

I issue the following command:

set global connect_jvm_path="/usr/java/default/jre/lib/amd64/server";

When I try to do this:

create table rmt_customers engine=connect table_type=JDBC tabname=customers
connection='jdbc:mysql://173.194.84.177:3306/db11006' 
option_list='User=root,Password=mypass';

I get this:

Error Code: 1105. ERROR: class wrappers/JdbcInterface not found!

If I look in the plugins directory (/usr/lib64/mysql/plugin) there are no jar files... so I am guessing this is the problem. The documentation says JdbcInterface.jar is included with the binary distribution and will be located in the plugin folder.

Could you attach the jar file to this so I can place it in plugins to try?



 Comments   
Comment by Robert Dyas [ 2016-10-02 ]

using find -name "JdbcInterface.jar" produced no results on my system.

Is JdbcInterface.jar actually included with centos RPM binary distribution in 10.1.18?

Comment by Elena Stepanova [ 2016-10-03 ]

It gets built on RPM-based systems, but not included into RPMs, although it should. Thanks for pointing it out.

Meanwhile, I've built it as a part of 10.1.18 release build on CentOS 7 x86_64 and uploaded here:
ftp://ftp.askmonty.org/public/JdbcInterface.jar

Maybe it will help as a workaround.

Comment by Robert Dyas [ 2016-10-03 ]

Fantastic! I was able to get a JDBC connection no problem with this jar file!
There are some bugs, but I'll post those separately.
Thank you!

Comment by Robert Dyas [ 2016-10-06 ]

Would it be possible for you to post a link to the ApacheInterface.jar file?

Also, I think that since this is a general purpose pooling solution and the file is small and would probably be used in most cases, it would be great if this could be included in the binary distribution just like JdbcInterface.jar

Thank you.

Also PS - zero server crashes with CONNECT JDBC so far !!!

Comment by Sergei Golubchik [ 2017-05-13 ]

Connect engine uses install_jar() function from the UseJava.cmake package to install JdbcInrerface.jar.
But CentOS 7 has cmake version 2.8.12.2, and in that version install_jar() does not support the COMPONENT option, so the installed file cannot be attributed to the correct RPM package.

I'll replace install_jar() function with the native cmake install(FILES) command, which works fine.

Comment by Mohit Chandel [ 2017-09-07 ]

Hi,

I installed mariadb 10.2.8 on Debian 9 with connect plugin.

JdbcInterface.jar file was not installed on my system.

sysadmin@netmon:~$ uname -a
Linux netmon 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux
sysadmin@netmon:~$ cat /etc/debian_version
9.1

sysadmin@netmon:~$ dpkg -l | grep -i mariadb
ii  libdbd-mysql-perl                4.041-2                        amd64        Perl5 database interface to the MariaDB/MySQL database
ii  libmariadb3                      10.2.8+maria~stretch           amd64        MariaDB database client library
ii  libmariadbclient18:amd64         10.1.26-0+deb9u1               amd64        MariaDB database client library
ii  mariadb-client-10.2              10.2.8+maria~stretch           amd64        MariaDB database client binaries
ii  mariadb-client-core-10.2         10.2.8+maria~stretch           amd64        MariaDB database core client binaries
ii  mariadb-common                   10.2.8+maria~stretch           all          MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
ii  mariadb-plugin-connect           10.2.8+maria~stretch           amd64        Connect storage engine for MariaDB
ii  mariadb-server-10.2              10.2.8+maria~stretch           amd64        MariaDB database server binaries
ii  mariadb-server-core-10.2         10.2.8+maria~stretch           amd64        MariaDB database core server files
ii  mysql-common                     10.2.8+maria~stretch           all          MariaDB database common files (e.g. /etc/mysql/my.cnf)

sysadmin@netmon:~$ dpkg -c /var/cache/apt/archives/mariadb-plugin-connect_10.2.8+maria~stretch_amd64.deb
drwxr-xr-x root/root         0 2017-08-17 15:37 ./
drwxr-xr-x root/root         0 2017-08-17 15:37 ./etc/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./etc/mysql/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./etc/mysql/conf.d/
-rw-r--r-- root/root        40 2017-08-17 15:37 ./etc/mysql/conf.d/connect.cnf
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/lib/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/lib/mysql/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/lib/mysql/plugin/
-rw-r--r-- root/root   1650256 2017-08-17 15:37 ./usr/lib/mysql/plugin/ha_connect.so
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/share/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/share/doc/
drwxr-xr-x root/root         0 2017-08-17 15:37 ./usr/share/doc/mariadb-plugin-connect/
-rw-r--r-- root/root       470 2017-08-17 15:37 ./usr/share/doc/mariadb-plugin-connect/changelog.gz
-rw-r--r-- root/root      2501 2017-08-17 15:35 ./usr/share/doc/mariadb-plugin-connect/copyright

If any other information is required, pls let me know.

Comment by Olivier Bertrand [ 2017-09-07 ]

FYI: The JdbcInterface.jar file is obsolete, containing only the JdbcInterface wrapper.
The file to have is the JavaWrappers.jar that contains all the wrappers used by CONNECT, including the ones required by the new MONGO table type.
As a workaround, I'll attach this file here.

Comment by Mohit Chandel [ 2017-09-08 ]

Thanks Oliver.

The documentation needs to be updated.

CONNECT JDBC Table Type

Generated at Thu Feb 08 07:46:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.