Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find
修改專案的配置檔案,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笑)============
相關文章
- Unable to locate factory with name [default]
- cocoapods找不到第三方庫Unable to find a pod with name, author, summary, or descriptionmatching...
- Unable to Find Sources for Current Linux KernelLinux
- Android:Unable to find explicit activity classAndroid
- unable to qualify my own domain name_處理AI
- 解決: selenium webdriver unable to find Mozilla geckodriverWeb
- SQL SERVER – Fix: Error Msg 128 The name is not permitted in this context. Only constants, expressions, or variables allowed herSQLServerErrorMITContextExpress
- MySQL5.7 Unable to find a match: MySQL-community-serverMySqlUnityServer
- SSL - SSLHandshakeException: unable to find valid certification path to requested targetException
- unity GPU bound or CPU boundUnityGPU
- 安裝或執行clone報錯 Unable to find 'kshell' in path
- Could not find first log file name in binary log index fileIndex
- 終端報錯"xcrun: error: unable to find utility “xcodebuild”, not a developer tool orErrorXCodeUIDeveloper
- Python django報錯ImportError: cannot import name find_specPythonDjangoImportError
- C++ lower_bound upper_boundC++
- 解決jpa查詢時,Unable to locate Attribute with the the given name錯誤
- Dynamics CRM 安裝SSRS Extension時報Could not find the name or insufficient right to see name的解決方法
- nancy Unable to find view engine that could render the view 無法找到檢視模板引擎NaNView
- java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxyJavaExceptionAPPAndroidthread
- Branch and Bound AlgorithmGo
- Android Bugs—— Error:In declare-styleable FontFamilyFont, unable to find attribute android:fontAndroidError
- Failed ALPN negotiation: Unable to find compatible protocol&&subscriptionExpressions have not been set yetAIGoProtocolExpress
- Straightforward Lower BoundAIForward
- Fragment FirstFragment{a01a0ff} not attached to a context.FragmentContext
- 配置hive後設資料庫mysql時候出現 Unable to find the JDBC database jar on host : masterHive資料庫MySqlJDBCDatabaseJARAST
- file_get_content s()獲取https出現這個錯誤Unable to find the wrapperHTTPAPP
- springboot專案打包提示Unable to find a single main class from the following candidates錯誤Spring BootAI
- Xcode指令碼自動化打包問題:xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATHXCode指令碼ErrorPackageAPPDeveloper
- DB_NAME&TANCE_NAME&DB_UNIQUE_NAME&ORACLE_SID&GLOBAL_NAME&DB_DOMAIN&SERVICE_NAMEOracleAI
- js: get event handler bound to the elementJS
- No Hibernate Session bound to threadSessionthread
- CPU-bound(計算密集型) 和I/O bound(I/O密集型)
- function和bound method的區別Function
- error: '[class name]' does not name a typeError
- CUUG 筆記ORACLE db_name instance_name gobal_name service_name db_unique_name分析筆記OracleGo
- 更改Global_name, domain_name, db_name 的方法AI
- DB_NAME、DB_UNIQUE_NAME、SERVICE_NAME和INSTANCE_NAME等的區別
- mybatis3:Invalid bound statement (not found)MyBatisS3