← Back to team overview

maria-discuss team mailing list archive

Compatibility problems switching Glassfish application from MySQL to MariaDB



I'm having some problems switching one of our Java/Glassfish-based web 
applications over from MySQL to to MariaDB.

Since the MariaDB project advertises the software as a fully compatible drop-
in replacement for MySQL, the first thing I did was simply stop the MySQL 
server, uninstall it, and then install and start MariaDB (5.5.28a, from Gentoo 
portage). We have got several C/C++ based application that access our MySQL 
databases. Those took a recompile, but afterwards continued to work as if 
nothing had happened.

I didn't have as much luck with our glassfish-based web frontend though. The 
first problem was that the existing MySQL connector is apparently unable to 
connect to MariaDB, so I deleted the existing JDBC Connection Pools and 
replaced them with new ones using the MariaDB Java Client instead. This worked 
on the surface, however now I'm getting a lot of exceptions whenever I'm 
accessing parts of the application that make use of BINARY type columns. 
According to the developer (of the web application on question), this is 
because either MariaDB itself or the connector are returning binary columns as 
type string, causing the persistance layer to attempt to convert them to a 
string object. Since the binary columns in question contain various 
unprintable characters, including zero-bytes, this fails.

Can someone please help me with these problems?


Follow ups