IMS and MySQL issues

5 views
Skip to first unread message

petros.pa...@gmail.com

unread,
Nov 15, 2019, 6:23:52 AM11/15/19
to bridgedb-discuss

Hi All,

 

I have started working with Alasdair from Heriot-Watt University a few weeks ago and one of my first jobs is trying to get the IMS and MySQL server working. As I understand Egon has done a lot of work on this and I am following one of his examples (please see link 1). Following the instructions from link 1, you get an error (error 1) when you follow the steps of the link and run command 1. I have found a work around for error 1 using instruction 1. After that I am able to go past that point and get a new error (please see error 2). I have found that this is probably caused by the incompatibility of the connector between mySQL server and the IMS application.

 

Command 1:

docker run --link mysql-for-ims:mysql -v /c/Users/johndoe/data5:/staging openphacts/identitymappingservice loader file:///staging/load.xml

 

Link 1:

https://github.com/BiGCAT-UM/BridgeDbVariantDatabase/blob/master/Local_BridgeDb_IMS_installation.md#step-2-install-docker

 

Error 1:

Using Validator RDF store work/Catalina/localhost/rdf

java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.

Exception in thread "main" java.lang.reflect.InvocationTargetException

 

Error 2:

Using Validator RDF store work/Catalina/localhost/rdf

java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long

Exception in thread "main" java.lang.reflect.InvocationTargetException

 

Instruction 1:

docker exec -it THE_CONTAINER_ID bash

mysql --user=root --password

ALTER USER 'ims'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ims'

 

Root cause for error 1:

In MySQL 5.7, the default authentication plugin is mysql_native_password. As of MySQL 8.0, the default authentication plugin is changed to caching_sha2_password. To enable MySQL 5.7 clients to connect to 8.0 and higher servers using accounts that authenticate with caching_sha2_password, the MySQL 5.7 client library and client programs support the caching_sha2_password client-side authentication plugin. This improves MySQL 5.7 client connect-capability compatibility with respect to MySQL 8.0 and higher servers, despite the differences in default authentication plugin.

For more information:

https://dev.mysql.com/doc/refman/5.7/en/caching-sha2-pluggable-authentication.html

 

 

Root cause for error 2 (maybe):

A java.math.BigInteger class instance is not an instance of java.lang.Long class. when the JDBC driver is required to make a connection, it is doing lot of work behind the scenes before it actually returns  back a proper working object of connection. The problem seems to be with the version of MySQL in combination with the version of mysql-connector.jar.

 

Best wishes

Petros Papadopoulos

Reply all
Reply to author
Forward
0 new messages