Mark Derricutt's Disturbing Thoughts

My Top Tags

                                       

My Jaiku

The Taste of the Day

Thursday, 24 July 2008 10:28 A GMT+12

War of Ages – The Deception of Strongholds

Wednesday, 23 July 2008 5:41 P GMT+12

"L" is not a code smell

Wednesday, 23 July 2008 8:54 A GMT+12

Meshuggah – Sum

Tuesday, 22 July 2008 4:37 P GMT+12

Dates: Relative or Absolute?

Tuesday, 22 July 2008 8:19 A GMT+12

HTTP errors - a set on Flickr

Monday, 21 July 2008 5:37 P GMT+12

Daylight Dies – Last Alone

Monday, 21 July 2008 3:59 P GMT+12

How I Got Started in Software Development

Sunday, 20 July 2008 6:06 P GMT+12

Soilent Green – In The Same Breath

Sunday, 20 July 2008 3:40 P 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