Mark Derricutt's Disturbing Thoughts

My Top Tags

                                       

My Jaiku

Chrome Division – Doomsday Rider

Thursday, 21 August 2008 5:43 A GMT+12

1 Session per VM: Another Scaling Alternative

Wednesday, 20 August 2008 9:47 P GMT+12

The BGGA myth - Functional Java | Google Groups

Wednesday, 20 August 2008 7:33 A GMT+12

Spock's Beard – On A Perfect Day (live)

Wednesday, 20 August 2008 5:57 A GMT+12

Ola Bini: JtestR 0.3.1 Released

Tuesday, 19 August 2008 10:00 P GMT+12

Enslaved – Violet Dawning

Tuesday, 19 August 2008 6:14 A GMT+12

Distributed Messaging with Jetlang and Terracotta

Monday, 18 August 2008 10:17 P GMT+12

The Music of 2008 - week 33

Monday, 18 August 2008 8:57 A GMT+12

There Can Be Only One

Monday, 18 August 2008 8:10 A GMT+12

Search Box

 

Java 6 breaks your Connections

posted Thursday, 29 November 2007

So there I was, setting up a nice new TeamCity based build server running Java 6 and start adding in projects, watching them build, and smiling. Until I came to project X which died with the following errors:

  • DeadLockConnection is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
  • DeadLockPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in java.sql.PreparedStatement

Looking at the current Javadoc for the Connection class I see that createStruct() was added to 1.6 (along with quite a few other classes not reported in the initial build failure). I guess I still don't fully understand Java's class loading foo - I would have thought existing classes that don't implement the new method would cause the class to not load - or maybe it loads the class and just throws an InvalidMethodException or something at runtime. Either way - this is sure to break a lot of applications.

Or maybe I'm just wrong... Either way I guess it's back to Java 5 for me.

tags:    

links: digg this    del.icio.us    technorati    reddit