javax.naming.NameNotFoundException: Name ZKING is not bound in this Context 的问题

runqianReportLogger : [ERROR] - Name ZKING is not bound in this Context
javax.naming.NameNotFoundException: Name ZKING is not bound in this Context

这是一个数据源,在tomcat的目录下conf配置文件中,context.xml添加数据源:ZKING
<Resource
name="ZKING"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@88.11.34.40:1521:telsalesdb"
username="ZKTELSALES2014"
password="ZTS-14619"
maxIdle="5"
maxWait="5000"
maxActive="5"
logAbandoned="true"
removeAbandoned="true"
removeAbandonedTimeout="60"/>

Tomcat在启动的时候会加载这个配置文件

时间: 2024-12-21 17:18:19

javax.naming.NameNotFoundException: Name ZKING is not bound in this Context 的问题的相关文章

javax.naming.NameNotFoundException:Name[ XXX] is not bound in this context.

在用局部数据源去连数据库的时候,在本地的项目中,都是可以的,可是一部署到服务器上,就报错了. 报的错误是:javax.naming.NameNotFoundException:Name[ XXX] is not bound in this context. 查了下解决方案:在项目的web.xml中加入下面的代码 <resource-ref> <description>DB Connection</description> <res-ref-name>zjut

javax.naming.NameNotFoundException

[java] view plain copy 2015-08-27 09:53:16,463 [localhost-startStop-1] DEBUG [org.springframework.jndi.JndiTemplate] - Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain] 2015-08-27 09:53:16,463 [localhost-startStop-1] D

springmv日志debug异常,javax.naming.NameNotFoundException

解决方案: 在web.xml配置如下代码即可: <context-param> <param-name>spring.profiles.active</param-name> <param-value>dev</param-value> </context-param> <context-param> <param-name>spring.profiles.default</param-name>

javax.naming.NoInitialContextException: Need to specify class name in environment or system property

javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial错误解决办法 在用JNDI连接数据库时用main函数测试时总报错, 后来看到论坛里的回复才知道原因 Initial

javax.naming.NamingException

警告: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: com.alibaba.druid.pool.DruidDataSourceFactory] 1 <dependency> 2 <groupId>com.alibaba</gr

配置jndi服务,javax.naming.NamingException的四种情况

1.当jndi服务没有启动,或者jndi服务的属性没有设置正确,抛出如下异常: javax.naming.CommunicationException: Can't find SerialContextProvider... 2.如果InitialContext class既没有为jndi服务提供者指出默认属性也没有明确指明属性,抛出如下异常: javax.naming.NoInitialContextException:Need to specify class name in enenvir

javax.naming.NoInitialContextException错误的解决方案

今天,学习用了一下nutz框架,写了一个HelloWorld的小程序,在用jndi配置数据源时,写了一个测试类,并在main方法中调用了jndi获得数据库连接,但是报错了,错误信息如下: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resour

spring mvc 500错误Allocate exception for servlet AppService javax.naming.NamingException: Cannot create resource instance

头几天已经测试的完毕了,换了个目录出现这个问题 严重: Allocate exception for servlet AppService javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96) at javax.naming.spi.NamingManager.getO

Tomcat上配置连接池{ connect error=Name [jdbc/OracleDB] is not bound in this Context. Unable to find [jdbc]}

. 在学习期间,从未实践过在tomcat上配置连接池,今天终于实现一次,在tomcat玩了一把,不知道你是否现在有和我一样的困境.废话少说直接上代码 java public static Connection getConnection_tomcat() { Connection conn = null; try { Context initCtx = new InitialContext(); Context ctx = (Context) initCtx.lookup("java:comp/