This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.