I have *almost* the same issue. In my case, it always fail, not just first time.
It happen when i required other EJB project, but does not set "Package" to checked (the required project's jar will be packaged into current project's jar).
[Message sent by forum member 'bungrudi' (bungrudi)]
http://forums.java.net/jive/thread.jspa?messageID=269875