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</groupId>
3             <artifactId>druid</artifactId>
4         </dependency>

项目中引入com.alibaba.druid 包,启动一直报上述异常(项目可以正常访问)。查看本地仓库发现有多个版本的druid-xxx.jar,都删除。maven update 后只出现了一个druid-1.0.22.jar。重新启动,无此异常。

跟引入包相关的问题,把仓库的包都删除后重新拉应该能解决很多问题。

时间: 2024-10-11 12:10:36

javax.naming.NamingException的相关文章

配置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

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

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

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

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.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: Name ZKING is not bound in this Context 的问题

runqianReportLogger : [ERROR] - Name ZKING is not bound in this Contextjavax.naming.NameNotFoundException: Name ZKING is not bound in this Context 这是一个数据源,在tomcat的目录下conf配置文件中,context.xml添加数据源:ZKING <Resource name="ZKING" type="javax.sql

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>

LDAP Java naming代码

1.核心连接代码 package com.test.ldap; import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.BasicAttribute; import javax.naming.directory.DirContex