As I wrote before I am currently building EJB3/ JSF1.2 applications which I build and deploy with Maven2. Last time I was building my web project when suddenly I got a Maven error, stating:
[ERROR] BUILD FAILURE
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.5.0_09). 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\ejb\ApplicationException.class not found
When I started to read the error message my first reaction was: WTF! A bug in the compiler?!?!
But then I read the last line in which it says it misses a class from the EJB3 library, so I added to my pom:
<dependency> <groupId>javax.ejb</groupId> <artifactId>ejb-api</artifactId> <version>3.0</version> <scope>provided</scope> </dependency>
Now the Maven build works without any problem. So that’s why you should study the entire error stack trace before you start to panic about bugs in the JDK compiler that you are using 🙂