Bug #32466 Connectot-J does not compile
Submitted: 17 Nov 2007 3:16 Modified: 19 Nov 2007 9:58
Reporter: Hasan Ceylan Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S1 (Critical)
Version:5.1.5 OS:Any
Assigned to: CPU Architecture:Any

[17 Nov 2007 3:16] Hasan Ceylan
Connector-J source does not compile. 

It currently has a bug ( http://bugs.mysql.com/32101 ) and the solution obvious. But I could build it neither using ant nor in eclipse.

Platform Java 1.6.03 Arch i586
OS Linux #1 SMP Thu Nov 8 21:41:26 EST 2007 i686 i686 i386 GNU/Linux 

How to repeat:
- Download the source code for 5.1.5
- navigate to the source
do ant the build

Buildfile: build.xml

   [delete] Deleting directory /tmp/mysql-connector-java-5.1.5/build
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 14 errors  <<<------
    [javac] 5 warnings  <<<<<-----

Suggested fix:
Implement the required methods
[17 Nov 2007 4:29] Mark Matthews
Because Connector/J 5.1 implements both JDBC-3 and JDBC-4 in the same driver, it can not be compiled with JDK6 alone. You need to use JDK-1.4.2 or JDK-1.5 in your JAVA_HOME, and point to your JDK6 javac binary, and JDK6 rt.jar using the "com.mysql.jdbc.java6.javac" and "com.mysql.jdbc.java6.rtjar" properties, respectively.

This information is near the top of build.xml and is also in the CHANGES file and the CHANGELOG in the online manual.
[17 Nov 2007 4:41] Hasan Ceylan
My apologies, thanks for super fast clarification
[17 Nov 2007 5:23] Hasan Ceylan
Then I think ;

- Build files should make necessary check for the building environment,

- And the information should be in README, BUILDING, etc files rather then being only  in changelog of which the audience is administrators and upgraders.

Hasan Ceylan
[19 Nov 2007 9:58] Tonci Grgin
Hi Hasan and thanks for your interest in MySQL. We will take your requests into account.
[19 Nov 2007 16:45] Mark Matthews
All versions of Connector/J now check for proper compiler(s) and properties as a pre-compilation step, see:


(the change was first made in 5.0 to check for JDK-1.4.2 or JDK-1.5 only, then changed in trunk to add the configurations for Java6, then merged into 5.1).