databases/mysql-connector-java: Looks broken to me

Matthew Seaman matthew at
Wed Apr 1 16:52:56 UTC 2015

On 04/01/15 15:31, Beeblebrox via freebsd-ports wrote:
> I was getting indications that mysql connections through the com.mysql.jdbc driver was not working. So I searched for a test method (included below) and here are the results.
> * Server: mariadb100--10.0.17, jailed, tcp connection. Able to connect through other drivers & using same params.
> * Client: mysql-connector-java-5.1.35
> * Test code compiled with javac, $ java -cp . jdbc >
> com.mysql.jdbc.Driver
> Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver  # I compile with OPTIONS_UNSET= NLS
> 	at$
> 	at$
> 	at Method)
> 	at
> 	at java.lang.ClassLoader.loadClass(
> 	at sun.misc.Launcher$AppClassLoader.loadClass(
> 	at java.lang.ClassLoader.loadClass(
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(
> 	at jdbc.main(

Thank you for the report.  Unfortunately, I'm at a loss to fix this. The
driver is supplied pre-compiled by Oracle -- we used to compile it, long
ago, but then it grew some compatibility shims that meant bits of it
needed compiling with different JDKs, something that couldn't be
supported in the ports.  I guess it's time to try recompiling it
ourselves since java has moved on quite a lot since those days.  Give me
a while to test that please.

Given that it's basically a .jar file downloaded from the net and copied
into position, the OPTIONS_USET=NLS thing will have absolutely no effect
on mysql-connector-java itself



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-ports mailing list