javax.naming.NameNotFoundException:Name[ XXX] is not bound in this context.
2014-11-08 21:33
1041 查看
在用局部数据源去连数据库的时候,在本地的项目中,都是可以的,可是一部署到服务器上,就报错了。
报的错误是:javax.naming.NameNotFoundException:Name[ XXX] is not bound in this context.
查了下解决方案:在项目的web.xml中加入下面的代码
加入以后呢,这个错误是消失了,但是又来了一个新的错误。
怎么办,好呢?目前的解决方案是:C:\apache-tomcat-7.0.37\conf目录下面的context.xml删掉,把我们项目中的META-INF目录下的context.xml文件复制到C:\apache-tomcat-7.0.37\conf目录下
报的错误是:javax.naming.NameNotFoundException:Name[ XXX] is not bound in this context.
查了下解决方案:在项目的web.xml中加入下面的代码
<resource-ref> <description>DB Connection</description> <res-ref-name>zjut_echarts</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
加入以后呢,这个错误是消失了,但是又来了一个新的错误。
怎么办,好呢?目前的解决方案是:C:\apache-tomcat-7.0.37\conf目录下面的context.xml删掉,把我们项目中的META-INF目录下的context.xml文件复制到C:\apache-tomcat-7.0.37\conf目录下
相关文章推荐
- 启动Tomcat时出现javax.naming.NameNotFoundException: Name xxx is not bound in this Context情况解决方式
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException Name java:comp is not bound in this Context之解决
- javax.naming.NameNotFoundException: Name ZKING is not bound in this Context 的问题
- Tomcat配置连接池 异常:javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException: Name [jdbc/lappJDBC] is not bound in this Context. Unable to fi
- GWT + Spring : javax.naming.NameNotFoundException: Name userDao is not bound in this Context
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException: Name jms is not bound in this Context
- 解决javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- javax.naming.NameNotFoundException: Name jdbcis not bound in this Context
- javax.naming.NameNotFoundException: Name spring.liveBeansView.mbeanDomain is not bound in this Conte
- JBOSS javax.naming.NameNotFoundException: xxx not bound
- javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
- Name xxx is not bound in this Context 总结
- EJB JMS javax.naming.NameNotFoundException: XXX not bound