Why I Drink Coffee

3 PM September 22, 2003

Our integration build broke at 9:30 this morning. Here is the error message:


build-internal-web-war:
[javac] Compiling 134 source files to
/home/WebSphere/build_jp/cvs_temp/build_internal_web
[javac] error: The encoding null is not supported
[javac] 1 error

That was it. No line numbers. No file name. Just a hint that something had gone wrong in a compiler input routine, somewhere.

A quick google gave two results. It looks like the problem is specific to the IBM Java compiler on Linux. One of the hits recommended upgrading to 1.4—which we can’t do—while the other was at a bit of a loss, save for rearranging the source until the compiler bug disappeared.

Fortunately, I did know that the system compiled at 8:30, so I went and found the files that had changed. There were ‘only’ 14. I wrote the list in my notepad.

After winding the source tree back to it’s 8:30 state (cvs update -D “8:30”), I went though each file on my list: check out the file as at 9:30, recompile, tick it off the list. The very last file on the list was the problem.

To cut a long story short, the culprits were two non-ASCII characters buried in a comment—0×93 and 0×94. A co-worker had cut and paste the comment and a few other lines from an example on the Sun website. The comment had not caused a problem with the Windows-based IDE compiler, but had b0rked the Linux compiler.

The IBM Linux compiler (version 1.3.1) cannont translate non-ASCII characters to Unicode. This is annoying, but understandable. More annoying, and less understandable is the complete lack of any context to the error message. I hold no hope for getting this fixed.

If there had been better error messages, I could have had the problem fixed in five minutes, instead of two and a half hours.

By alang | # | Comments (4)
(Posted to javablogs and Java)

Comments

At 09:02, 23 Sep 2003 Matt Quail wrote:

coffeecoffeecoffeeCOFFEEcoffee

(#)
At 08:58, 28 Feb 2004 Anders wrote:

Thanks! This saved us a lot of time.

(#)
At 19:05, 07 Oct 2004 Jeff Grills wrote:

You just saved me a lot of pain finding the same issue in some code here. Thanks!

(#)
At 10:55, 24 Nov 2004 jeff mutonho wrote:

Thanx mate.You're a star!And to IBM...well got loads to say but can't print it here.

jeff mutonho

(#)

Add Comment




(Not displayed)






(Leave blank line between paragraphs. URLs converted to links. HTML stripped. Indented source code will be formatted with <pre> tags.)




© 2003-2006 Alan Green