From owner-freebsd-ports@FreeBSD.ORG Mon Apr 6 10:31:24 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42B13623 for ; Mon, 6 Apr 2015 10:31:24 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BEF3E36C for ; Mon, 6 Apr 2015 10:31:23 +0000 (UTC) Received: from seedling.local ([192.168.100.2]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.1/8.15.1) with ESMTPSA id t36AVDFD020765 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 6 Apr 2015 11:31:13 +0100 (BST) (envelope-from matthew@FreeBSD.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk t36AVDFD020765 Authentication-Results: smtp.infracaninophile.co.uk/t36AVDFD020765; dkim=none reason="no signature"; dkim-adsp=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host [192.168.100.2] claimed to be seedling.local Message-ID: <55226070.1060909@FreeBSD.org> Date: Mon, 06 Apr 2015 11:31:12 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: databases/mysql-connector-java: Looks broken to me References: <20150401173142.1b36d256@rsbsd.rsb> <551C2260.5050904@freebsd.org> In-Reply-To: <551C2260.5050904@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="In2JXCJEM497TKAVpC4WPIEdDe4q8rkeT" X-Virus-Scanned: clamav-milter 0.98.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 10:31:24 -0000 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--