Date: Mon, 06 Apr 2015 11:31:12 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-ports@freebsd.org Subject: Re: databases/mysql-connector-java: Looks broken to me Message-ID: <55226070.1060909@FreeBSD.org> In-Reply-To: <551C2260.5050904@freebsd.org> References: <20150401173142.1b36d256@rsbsd.rsb> <551C2260.5050904@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --In2JXCJEM497TKAVpC4WPIEdDe4q8rkeT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/04/2015 17:52, Matthew Seaman wrote: > On 04/01/15 15:31, Beeblebrox via freebsd-ports wrote: >> I was getting indications that mysql connections through the com.mysql= =2Ejdbc 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= =2Ejdbc.Driver # I compile with OPTIONS_UNSET=3D NLS >> at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:425) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:358) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:191) >> at jdbc.main(jdbc.java:15) >> >=20 > Thank you for the report. Unfortunately, I'm at a loss to fix this. Th= e > driver is supplied pre-compiled by Oracle -- we used to compile it, lon= g > 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 m= e > a while to test that please. >=20 > Given that it's basically a .jar file downloaded from the net and copie= d > into position, the OPTIONS_USET=3DNLS thing will have absolutely no eff= ect > on mysql-connector-java itself Having managed to find time to test this out, the situation is still the same: compiling this .jar requires a java-1.5 JDK to be installed alongside a more current JDK: > lucid-nonsense:/tmp/mysql-connector-java-5.1.35:% ant compile > Buildfile: /tmp/mysql-connector-java-5.1.35/build.xml >=20 > -jdk5-check: > [exec] Execute failed: java.io.IOException: Cannot run program "/u= sr/lib/jvm/jdk1.5/bin/java": error=3D2, No such file or directory >=20 > BUILD FAILED > /tmp/mysql-connector-java-5.1.35/build.xml:240: Java 5 is required. Set= the full path to this JDK home with the property 'com.mysql.jdbc.jdk5'. = Default: '/usr/lib/jvm/jdk1.5'). Java 6 (for JDBC4+ implementation) is al= so required. Set the full path to this JDK home with the property 'com.my= sql.jdbc.jdk6'. Default: '/usr/lib/jvm/jdk1.6'. >=20 > Total time: 1 second Given there is no longer any support in the ports for java-1.5 I'm afraid we're stuck with using the pre-compiled .jar file. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --In2JXCJEM497TKAVpC4WPIEdDe4q8rkeT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) iQJ8BAEBCgBmBQJVImBwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATIUUP/i6nO76XhZqUeq+lcSG2Y05N vtZIQf0fuwpP6Mek7UZ/92gJzqjVVwh0D/gSfor0kbVtRBfzKBPR2zN9RCIx+XLF qDYKzYqOq6TT1rHpnq9uJfEfPqEMSWwf4OQvWenMjW4fx9hWdOk5CXJIrqS7fqfV 1BIlEOD99eexoV2jj6tC5pFRVBo5z/jjaxfEHEQVogFf9LRgpeAb3xYDg1L9LE+f g0aOVQFfHfStRuS2weixN1fJqQ9t+8XA6NS8/G6evdBDJj3HqInz4pc98V9kSPWU ZzUK4A/hj1spsRwFvFNDu2a5bemjYf01tUG8ZUJrizNF6CmMuSaAir85RSorN3K7 MaKbWOgDTQ+bLLi9tU94hyy3m40qvQzIAyYfbA9RSJoS91pWrtVy7V4WXu5N2IVz 9/t731XKX5M3W0OBif+68VyNNxcsZ+DKJchJ35elKIQKDHcbI89MiYHegVQ6x4Rx TjJ4GvVU8M9YXXkIT0w9D52kkBssI0ojrKb1w78Cl0HS9spL0qSqyw6jKDbzfaNh rw30aB1gonLehtW1HU873L6CE+6Pa184Xc13Vrw4etRWWGvsZ3NiLNoAz1upLa1u 64s8ek1+uVKxgi5Kq9bmNltvK8Jz3S4k7NsSm9GZakfqUnVuQc85I90fPPNhWcmy C1X5Lun8jgz6/CkjNCJE =Bmc3 -----END PGP SIGNATURE----- --In2JXCJEM497TKAVpC4WPIEdDe4q8rkeT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55226070.1060909>