First, never place source code into a Word document and attach the document - it is too easy to spread viruses that way and many people will refuse to open such files. Instead, you should have packaged the source files into a ZIP file and attached that.
Second, you posted a lot of source code without any indication of where the error happened (at least, none that I could see with a quick glance). What are we supposed to do, guess where the error happened? Or do you expect us to deploy your app and find out for ourselves?
It appears that what you have done is made it as difficult as possible for anyone to help you. What you should have done instead is posted the full excpetion stack trace for the "name not found" error, posted the lines of code that looked up the name, posted any configuration information about the name, and preferably also posted an excerpt from the JNDIView output that contained the name.