javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context

后端 未结 5 1835
醉梦人生
醉梦人生 2020-12-21 00:50

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.

5条回答
  •  眼角桃花
    2020-12-21 01:26

    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.

提交回复
热议问题