I had hosted an application in the mochahost . I am getting their the "javax.naming.NameNotFoundException: Name java: is not bound in this Context" error .
I am using Tomcat 5.5 , java 1.7 , mysql 5.5 .
In my local server pooing is working fine but in the server it gives the error .
I am posting the codes of web.xml , context.xml , connection class .
1. The Context file isn't being seen by the Tomcat server. That would happen if the file wasn't located in one of Tomcat's designated locations for Context definitions, or if the OS userid that Tomcat is running under didn't have file access rights to read that file.
2. The database configuration information isn't working. The URL could be wrong, the userid/password could be invalid, or there could be a firewall blocking access to the database server. Plus there are other possibilities as well. If the connections cannot be created, chances are that the pool will not be constructed and thus not registered under JNDI.
Check Tomcat's logfiles and you'll probably find more information. The catalina.out file is the primary file, but also look in the localhost logfile.
Whatever your problem is, it's almost certainly Tomcat specific, so if you need help, check out the Tomcat forum.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.