[Java]View PlainCopy
- 2015-08- :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:< Span class= "number" >53:16,463 [localhost-startstop- 1] debug [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].
- 2015-08-27 09:53:16,463 [ Localhost-startstop-1] debug [org.springframework.jndi.jnditemplate] - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain]
- 2015-08- :464 [localhost-startstop-1] DEBUG [ Org.springframework.jndi.JndiPropertySource]-Jndi lookup for name [Spring.liveBeansView.mbeanDomain] threw Namingexception with Message:name [Spring.liveBeansView.mbeanDomain] was not bound in this Context. Unable to find [Spring.liveBeansView.mbeanDomain]. Returning null.
The above is a burst of abnormal information, from which can be very clear to see the exception from the Jndi data source configuration, but my project is not configured to use Jndi, as to the cause of this exception, consulted a lot of information, some people say it is the problem of jar, some say that the problem of spring configuration, Some overseas analysts said is spring internal problems, specific what factors caused I did not go to study, hope to see friends, can leave a message, thank you, PS (self-understanding, whether right or wrong are brave to say out, do not say never know right and wrong, hinder the angle of thinking), This project is used by: spring3.2+springmvc+druid+mybatis3.2.2/spring-mybatis1.2.0
Two solutions are attached below:
1: From Control to print logo, the log level of the project should have at least the DEBUG level: Log4j.rootlogger = Debug,console,file
Remove the debug level from the config file, or use info. There is no longer this exception message: Log4j.rootlogger = Info,console,file
2: Add the following configuration in Web. XML, this method is to see foreign friends to provide, the test has the effect
[HTML]View PlainCopy
- <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>
Javax.naming.NameNotFoundException