Bug #71557 Improve documentation for installing from source
Submitted: 2 Feb 2014 5:40 Modified: 25 Apr 2014 21:51
Reporter: Andrew Gaul (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Daniel So CPU Architecture:Any

[2 Feb 2014 5:40] Andrew Gaul
Description:
I recently compiled Connector/J from source and the documentation at http://dev.mysql.com/doc/connector-j/en/connector-j-installing-source.html confused me.  Can you include these modifications: 

1. Remove trailing "i" from shell> bzr branch lp:connectorji

3. Connector/J requires two external libraries, ant-contrib.jar and junit-3.8.2.jar, placed in connectorj/src/lib-nodist.  Download the former from http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.... and extract ant-contrib.jar.  Download the latter from http://search.maven.org/remotecontent?filepath=org/mod4j/org/junit/3.8.2/junit-3.8.2.jar .

5. Suggest editing build.properties instead with the following properties:

com.mysql.jdbc.java6.java=/path/to/jdk1.6.0_45/bin/java
com.mysql.jdbc.java6.javac=/path/to/jdk1.6.0_45/bin/javac
com.mysql.jdbc.java6.rtjar=/path/to/jdk1.6.0_45/jre/lib/rt.jar

"ant dist" succeeds although "ant test" fails with "java.sql.SQLException: No suitable driver".  Any suggestions on how to resolve this?

How to repeat:
as above
[4 Feb 2014 8:50] MySQL Verification Team
Hello Andrew,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[4 Feb 2014 14:12] Filipe Silva
Posted by developer:
 
Hi Andrew,

Thank you for your suggestions.

In order to run the tests you must also include the property:
  com.mysql.jdbc.testsuite.url=jdbc:mysql://<server>:<port>/<db>?user=<user>&password=<pwd>
Replace placeholders accordingly. You will also need two more jars: fscontext.jar and providerutil.jar; which you can get from the File System Service Provider library, found in Oracle downloads. Place these inside your external libraries directory.

Currently your external libraries directory can be placed anywhere, just provide the correct path in the property:
com.mysql.jdbc.extra.libs=<path_to_ext_libs>
The documentation page you referred already contains information regarding this.

You can also look into http://dev.mysql.com/doc/connector-j/en/connector-j-usagenotes-troubleshooting.html for some information about the "No suitable driver" error message.
[25 Apr 2014 21:51] Daniel So
The Connector/J manual has been updated with the suggestions provided in the ticket. Instructions for "ant test" is still missing--that is now being covered by a separate bug ticket(Bug#72461).