Wednesday, June 18, 2008

Failure executing javac

There's nothing quite so deflating as seeing a message like the following

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.5.0_06). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: file javax\xml\ws\WebServiceClient.class not found


You really begin to wonder if you're doing something very wrong.
Fortunately you're not, and there is a quick and easy workaround.
This it turns out is a bug with javac on windows

My quick solution. Compile using cygwin. (If you haven't got cygwin, simply download setup.exe, and install)

This worked fine. My details was using jdk 1.5.0_06 (the bug has been reported on 1.5.0_04, and seen on 1.6 as well), on windows xp building using maven 2.0.8. Running my maven script in a cygwin bash window worked fine.

No comments: