今天在做一个dubbo服务端的时候,启动成功,dubbo也注册成功,但是启动日志中就出现[java:comp/env/spring.liveBeansView.mbeanDomain] not found这个日志,网上搜搜,果然很多人出现过这个问题。

  1. [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletConfigInitParams]
  2. [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletContextInitParams]
  3. [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [jndiProperties]
  4. [org.springframework.jndi.JndiTemplate] - <strong><span style="color:#ff0000;">Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain]</span></strong>
  5. [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].
  6. [org.springframework.jndi.JndiTemplate] - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain]
  7. [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.
  8. [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
  9. [org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
  10. [org.springframework.core.env.PropertySourcesPropertyResolver] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
  11. [org.springframework.web.context.ContextLoader] - Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
  12. [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中添加如下配置:

  1. <context-param>
  2. <param-name>spring.profiles.active</param-name>
  3. <param-value>dev</param-value>
  4. </context-param>
  5. <context-param>
  6. <param-name>spring.profiles.default</param-name>
  7. <param-value>dev</param-value>
  8. </context-param>
  9. <context-param>
  10. <param-name>spring.liveBeansView.mbeanDomain</param-name>
  11. <param-value>dev</param-value>
  12. </context-param>
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/plg17/article/details/76325378

启动日志中就出现[java:comp/env/spring.liveBeansView.mbeanDomain] not found这个日志的更多相关文章

  1. spring启动找不到spring.liveBeansView.mbeanDomain配置

    做项目时,启动tomcat报错 JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with m ...

  2. 理解JNDI中 java:comp/env/jdbc/datasource 与 jdbc/datasource 的不同之处(转)

    在描述JNDI,例如获得数据源时,JNDI地址有两种写法,例如同是  jdbc/testDS 数据源: A:java:comp/env/jdbc/testDS B:jdbc/testDS   这两种写 ...

  3. JNDI中 java:comp/env 的理解

    J2EE 上下文环境变量前缀,一般有如下几种:java:/comp/env/jdbcjava:/comp/env/urljava:/comp/env/mailjava:/comp/env/jms在部署 ...

  4. javaWeb中JNDI的使用,为什么要加java:comp/env前缀

    转载自(http://blog.csdn.net/guodongsoft/article/details/52399527) 我们在使用JNDI调用某个对象时,会有下述两种方式 context.loo ...

  5. java:comp/env/jdbc/ 的两种配置方法

    1. 在 META-INF 下建立文件: context.xml <?xml version="1.0" encoding="UTF-8"?> &l ...

  6. JNDI:对java:comp/env的研究

    这两天研究了一下 context.lookup("java:comp/env/XXX")和直接context.lookup("XXX")的区别 网上关于这两个的 ...

  7. 详解JNDI的lookup资源引用java:/comp/env

    ENC的概念:     The application component environment is referred to as the ENC, the enterprise naming c ...

  8. 详解JNDI的lookup资源引用 java:/comp/env

    ENC的概念:     The application component environment is referred to as the ENC, the enterprise naming c ...

  9. 数据源引用 java:/comp/env

      编辑 删除 数据源引用 java:/comp/env 2012-01-28 15:59   ENC的概念: The application component environment is ref ...

随机推荐

  1. c/c++指针详解(二)

    指针的概念 指针是一个特殊的变量,它里面存储的数值被解释成为内存里的一个地址.要搞清一个指针需要搞清指针的四方面的内容:指针的类型,指针所指向的类型,指针的值或者叫指针所指向的内存区,还有指针本身所占 ...

  2. 中兴G718C开发者模式开启

    系统设置--关于手机--版本号,连按七次,打开开发者选项 请进入设置——连接到PC——默认连接类型——安装驱动,选择即可.然后将手机和电脑连接,打开“我的电脑”或“计算机”会弹出可移动盘符“USB D ...

  3. bzoj 4816 [Sdoi2017]数字表格——反演

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4816 \( ans=\prod\limits_{d=1}^{n}f[d]^{\sum\lim ...

  4. Linux history时间用户ip设置

    Linux history时间用户ip设置        在使用linux服务器的时候发生一些不知道谁操作的问题,google一下说history命令可以查看到历史记录,用过之后发现还是不够详细,再g ...

  5. angular的require模块的使用($requireProvider的作用)

      今天我们学习一下angular的另一个几乎被忽略的模块angular-require 先给出链接地址(git:)   https://github.com/Treri/angular-requir ...

  6. 在ubuntu下,进行php7源码安装

    作为一名php的攻城师,如果没有玩php源码安装是说不过去的.我们知道php之所以这么流行,跟它的开源文化和lamp配套有很大关系.由于PHP7废弃了很多功能,所以一些依赖这些功能的程序可能无法运行, ...

  7. GC之九--gc调优

    目标 满足应用的响应时间和吞吐量需求,尽量减少GC对应用的影响 原则 大部分时候都不需要调优GC,只需配置-Xms,-Xmx即可,JVM会自动进行调整 先满足响应时间需求,再满足吞吐量需求 FullG ...

  8. POJ 3279 Fliptile(反转 +二进制枚举)

    Fliptile Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 13631   Accepted: 5027 Descrip ...

  9. Windows下安装GCC

    1.GCC编译器的选择 Windows下最常见的安装GCC的方式有两种:Cygwin和MinGW.本文主要介绍MinGW的安装配置. 2.下载MinGW 下载地址:http://sourceforge ...

  10. Oracle中的dbms_metadata.get_ddl的用法

    当我们想要查看某个表或者是表空间的DDL的时候,可以利用dbms_metadata.get_ddl这个包来查看. dbms_metadata包中的get_ddl函数详细参数 GET_DDL函数返回创建 ...