Idea does not check dependencies between J2EE modules correctly.
When building an ear you often get old byte code included instead of current one.
I have not tried to isolate this problem in a simple example. because frankly I
have real work to do, but I think it already happens if you have a plain Java SE
module with interfaces and an EJB module with classes that implement these
interfaces. Now change an interface a little and make: You'll get strange runtime
exceptions. Even rebuild does not help.
When this bug occurs all that helps is to close the project, open it again and
rebuild.
See also
http://www.intellij.net/forums/thread.jspa?threadID=215075&tstart=0Happens in 5.1 and also in Demetra.
Also what would really help with this bug would be a "Clean" feature on the build menu.
Issue was resolved