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

Matthew Seaman matthew at freebsd.org
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 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)
> 

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

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20150401/9f226ecb/attachment.sig>


More information about the freebsd-ports mailing list