I\'m developing a spring application which uses tomcat server managed connection pool.
I defined datasource in tag in context.xml of tomcat: (i am using spring 2.0.
That will in case of Tomcat happen when you have for some reason dropped arbitrary servletcontainer-specific JARs such as jsp-api.jar, servlet-api.jar, catalina.jar, etc in webapp's /WEB-INF/lib. You should remove all servletcontainer-specific JARs from there, they do not belong there.
I faced similar problem with tomcat and did the following in eclipse to solve it:
Project --> Clean
) , the tomcat server (Server--> Right Click --> Clean
) and Tomcat work directory (Server--> Right Click--> Clean Tomcat Work Directory
).Even after maintaining the details in context.xml, sometimes it might not get reflected. In such cases follow step#3 and hope it helps.
In Eclipse: make sure you have the right context.xml file. This especially valid when you have installed multiple servers.
In your Servers tab -> Right click on your deployed web module -> Browse Deployment Location -> ../conf/context.xml. Make sure this is the file you want to be using.
I hope this saves you some time, as I wasted some time on it.
Please update your web.xml
with the something similar to the following tag
<resource-env-ref>
<description>DataSource
</description>
<resource-env-ref-name>
dbc/irb_prod
</resource-env-ref-name>
<resource-env-ref-type>
javax.sql.DataSource
</resource-env-ref-type>
</resource-env-ref>
You need to refer this link too for more information
In my case it seems that I had to first close my file explorer (FreeCommander XE) and then do the eclipse cleans (project and server), make sure to close any other programs that might have handles to deployed files even if the files are not open in those programs anymore