CANARY can't talk to MySQL via JDBC

Has anyone been successful with setting up a CANARY 4.3.2 instance on Linux that reads from a YAML config file then reads/writes from/to a MySQL database via JDBC? I’m not able to get it working (see this github issue), which I think is due to MATLAB not loading the requested JDBC driver (regardless of whether static or dynamic jar loading is used).

Interestingly, CANARY 4.3.2 can talk to a MySQL db if I use a (now-deprecated) XML config file instead. Reading YAML requires the loading of snakeyaml.jar, so I wonder if the issue is related to the number of jar files that MATLAB tries to load?

Alternatively, the issue could be due to MATLAB lacking namespaces and CANARY, snakeyaml and the MySQL JDBC driver sharing some class names that can’t be distinguished unless they are fully qualified?

Anyone got any thoughts/suggestions?

Regards,

Will

@dbhart, author of much of the CANARY code, has pointed out that using an environment variable one can load all .jar files (e.g. JDBC drivers) within a specified directory. This fixes my problem. See the GitHub issue for more info.

1 Like