启动日志中就出现[java:comp/env/spring.liveBeansView.mbeanDomain] not found这个日志
今天在做一个dubbo服务端的时候,启动成功,dubbo也注册成功,但是启动日志中就出现[java:comp/env/spring.liveBeansView.mbeanDomain] not found这个日志,网上搜搜,果然很多人出现过这个问题。
- [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletConfigInitParams]
- [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletContextInitParams]
- [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [jndiProperties]
- [org.springframework.jndi.JndiTemplate] - <strong><span style="color:#ff0000;">Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain]</span></strong>
- [org.springframework.jndi.JndiLocatorDelegate] -<span style="color:#ff0000;"> <strong>Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found</strong> </span>- 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.context.ContextLoader] - Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
- [org.springframework.web.context.ContextLoader] - Root WebApplicationContext: initialization completed in 13003 ms
错误原因:就是spring-context.jar包中提供通过JMX来实时查看spring放在applicationContext里的bean列表功能,会在项目配置文件里找一个叫"spring.liveBeansView.mbeanDomain"的环境变量,没找到,就报错了。
j解决办法就是在项目中的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>
启动日志中就出现[java:comp/env/spring.liveBeansView.mbeanDomain] not found这个日志的更多相关文章
- spring启动找不到spring.liveBeansView.mbeanDomain配置
做项目时,启动tomcat报错 JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with m ...
- 理解JNDI中 java:comp/env/jdbc/datasource 与 jdbc/datasource 的不同之处(转)
在描述JNDI,例如获得数据源时,JNDI地址有两种写法,例如同是 jdbc/testDS 数据源: A:java:comp/env/jdbc/testDS B:jdbc/testDS 这两种写 ...
- JNDI中 java:comp/env 的理解
J2EE 上下文环境变量前缀,一般有如下几种:java:/comp/env/jdbcjava:/comp/env/urljava:/comp/env/mailjava:/comp/env/jms在部署 ...
- javaWeb中JNDI的使用,为什么要加java:comp/env前缀
转载自(http://blog.csdn.net/guodongsoft/article/details/52399527) 我们在使用JNDI调用某个对象时,会有下述两种方式 context.loo ...
- java:comp/env/jdbc/ 的两种配置方法
1. 在 META-INF 下建立文件: context.xml <?xml version="1.0" encoding="UTF-8"?> &l ...
- JNDI:对java:comp/env的研究
这两天研究了一下 context.lookup("java:comp/env/XXX")和直接context.lookup("XXX")的区别 网上关于这两个的 ...
- 详解JNDI的lookup资源引用java:/comp/env
ENC的概念: The application component environment is referred to as the ENC, the enterprise naming c ...
- 详解JNDI的lookup资源引用 java:/comp/env
ENC的概念: The application component environment is referred to as the ENC, the enterprise naming c ...
- 数据源引用 java:/comp/env
编辑 删除 数据源引用 java:/comp/env 2012-01-28 15:59 ENC的概念: The application component environment is ref ...
随机推荐
- jsTree 是一个基于Javascript,支持多浏览器的Tree view jQuery插件。
https://www.jstree.com/ 之前给大家介绍两种浮动闭合的办法CSS清除浮动 万能float闭合,得 http://www.daqianduan.com/3606.html
- Requirejs简单介绍
具体详情请进入官网查阅:http://requirejs.org 一.什么是Requirejs RequireJS是一个非常小巧的JavaScript模块载入框架,是AMD规范最好的实现者之一. 二. ...
- Linux make menuconfig报错 Your display is too small to run Menuconfig!
在没有全屏的状态下执行 make menuconfig,如果报下面的错误,表示终端的窗口太小,需要放大窗口或者全屏操作. ## using defaults found in /dev/null#Yo ...
- pat1022__字符串查找
主要是对字符串的查找,为了方便并且快速的实现查找,用map会比较方便 同时如何把一个带有空格的字符串变成多个单词也有一个小技巧 char *point=book[i].keyWord;//关键词分离 ...
- 数组游标实现对数组的各种操作(PHP学习)
如何不用foreach实现对数组实现循环? 答:我们只需要模拟foreach就行了,数组在执行foreach循环的时候,是有一个游标指向当前数组循环到的值, 那如果我们能拿到这个游标,并且操作游标,使 ...
- Unit02: Servlet工作原理
Unit02: Servlet工作原理 点击注册按钮,返回注册信息 package web; import java.io.IOException; import java.io.PrintWrite ...
- 带ssl的websocket例子
还是在那个websocket_demo的例子 rebar-creator create-app websocket_demo tree一下看看大概目录 ├── cert │ ├── cowboy- ...
- Centos如何设置IP地址,LINUX怎么修改IP地址
对于很多刚刚接触linux的朋友来说,如何设置linux系统的IP地址,作为第一步,下面小编以centos系统为例,给大家演示如何给centos设置IP地址,如何修改linux 系统IP地址? 步骤阅 ...
- Linux下sz下载文件超过4G办法
当下载文件超过4G时,sz提示能下载. 解决办法有以下几种: 1.scp 2.ftp 3.nc 4.icmp 5.文件切割 ---------------------------------- 以上4 ...
- Julia - If 条件语句
Julia 中使用 if,elseif,else 进行条件判断 格式: if expression1 statement1 elseif expression2 statement2 else sta ...