Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find
来源:互联网 发布:全国出生缺陷监测数据 编辑:程序博客网 时间:2024/06/01 11:15
修改项目的配置文件,log4j的日志输出级别修改为DEBUG,打印详细的错误信息后,
启动项目控制台输出有以下异常信息:
[org.springframework.jndi.JndiTemplate]-Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain][org.springframework.jndi.JndiLocatorDelegate]-Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].[org.springframework.jndi.JndiTemplate]-Looking up JNDI object with name [spring.liveBeansView.mbeanDomain][org.springframework.jndi.JndiPropertySource]-JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].. Returning null.[org.springframework.core.env.PropertySourcesPropertyResolver]-Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties][org.springframework.core.env.PropertySourcesPropertyResolver]-Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment][org.springframework.core.env.PropertySourcesPropertyResolver]-Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null][org.springframework.web.servlet.DispatcherServlet]-Published WebApplicationContext of servlet 'SpringMVC' as ServletContext attribute with name [org.springframework.web.servlet.FrameworkServlet.CONTEXT.SpringMVC][org.springframework.web.servlet.DispatcherServlet]-FrameworkServlet 'SpringMVC': initialization completed in 1138 ms[org.springframework.web.servlet.DispatcherServlet]-Servlet 'SpringMVC' configured successfully三月 22, 2017 11:45:12 上午 org.apache.catalina.core.StandardContext reload信息: Reloading Context with name [/yuyi] is completed这个异常倒是不影响项目运行。
错误原因:
就是提供通过JMX来实时查看Spring放在application context里的bean列表功能的一个包,他会在你的配置文件里找一个叫"spring.liveBeansView.mbeanDomain"的环境变量,没找到,就报错了。
解决方法
如果你不使用任何 profiles 或 mbeans,可以在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> <param-value>dev</param-value> </context-param><context-param> <param-name>spring.liveBeansView.mbeanDomain</param-name> <param-value>dev</param-value> </context-param>
希望有人能提供比这更好的解决方案。
参考:
https://www.zhihu.com/question/21477643
http://stackoverflow.com/questions/23750619/spring-jndi-namingexception-name-spring-livebeansview-mbeandomain-is-not-boun
======================文档信息========================
版权声明:非商用自由转载-保持署名-注明出处
署名(BY) :testcs_dn(微wx笑)
文章出处:[无知人生,记录点滴](http://blog.csdn.NET/testcs_dn)
==============欢迎关注我的个人微信订阅号(微wx笑)============
4 0
- Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find
- Name [spring.liveBeansView.mbeanDomain] is not bound in this Context错误
- javax.naming.NameNotFoundException: Name spring.liveBeansView.mbeanDomain is not bound in this Conte
- javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [co
- 数据源没发现! Name [jdbc/mysql5] is not bound in this Context. Unable to find [jdbc].
- javax.naming.NameNotFoundException: Name [jdbc/lappJDBC] is not bound in this Context. Unable to fi
- Name java:comp is not bound in this Context解决办法
- Name java:comp is not bound in this Context
- Name jdbc is not bound in this Context
- Name jdbc is not bound in this context
- name jndi is not bound in this context
- 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 jdbc is not bound in this Context
- 应对Name jdbc is not bound in this Context-----------我的一个总结
- javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- 解决javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- Tomcat配置连接池 异常:javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
- java三大特性
- 子类重写父类方法条件
- 主动信息收集之端口扫描
- 使用PowerDesigner连接数据库并生成ER图
- 生成RSA秘钥及加密
- Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find
- leetcode第四周解题报告
- NuGet学习笔记(1)——初识NuGet及快速安装使用
- linux 安装软件常用中终端命令
- L1-020. 帅到没朋友
- leetcode_83. Remove Duplicates from Sorted List
- android LayoutInflaterCompat解析
- 二分——GDUT #C 进击的调查兵团
- www上传相关