This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
EJB's can require a number of files, and while all may compile properly (or in the case of xml be well formed), its not till they are deployed on an EJB server that you may realize there connections between files are correct.
I'd recommend searching the net for "Ejb tutorial" and/or consulting well-known books like Head First Ejb.