일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- instancenotfoundexception
- name=springapplication
- 백준
- ubuntu
- 배열최소값최대값
- 백준1946
- Decapsulation
- 페이로드
- SpringApplication
- 도커
- 디비버
- 브로드캐스트
- 모래시계출력
- jmx
- 네트워크모델
- docker
- 배열복사
- 오름차순
- 도커권한설정
- 유니캐스트
- 리눅스계열
- dbeaver
- 리눅스환경
- wan
- javax.management.instancenotfoundexception: org.springframework.boot:type=admin
- 우분투
- 포트포워딩 안될때
- 배열빈도수
- springboot
- 포트포워딩
- Today
- Total
다잘하고싶어
javax.management.InstanceNotFoundException 에러 본문
javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplication
SpringBoot 로 프로젝트 진행하는 과정에서 어플리케이션의 기능은 정상적으로 작동하는데,
디버그 로그에는 계속 다음의 에러가 발생하는 것이 찝찝해서 찾아보았다.
javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplication at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1445) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:639) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)
일단 해결방법을 먼저 제시하면,
IntelliJ의 설정에서 'Enable launch optimization' 과 'Enable JMX agent' 체크박스를 해제해주면 된다.
인텔리제이의 설정이 조금 변경된 것 같아 참고용으로 캡쳐본을 첨부한다.
[단계]
- Edit Configurations
- 프로젝트 선택
- Modify options > launch optimization 과 JMX endpoints 설정을 제외

해당 에러 발생하는 이유가 궁금해서 찾아보니, 아래의 상황인 것으로 보인다.
1. JMX/Lifecycle 은 즉시 시작되지만, 스프링부트는 application.properties, bean, autowire 등등 시작 전 확인해야할 것들이 많아 즉시 시작되지 않음.
2. 즉, JMX는 이미 시작되었지만 아직 스프링부트는 시작되지 않은 상태인 것.
3. 이 상황에서 JMX 가 (아직 구동되지 않은) 스프링어플리케이션을 찾고 있기 때문에 해당 어플리케이션을 찾지 못했다는 에러가 발생하는 것
4. 이후 정상적으로 스프링어플케이션이 시작되면, JMX는 해당 객체를 찾기때문에 에러가 해결
그렇다면 JMX란 뭘까
JMX 란 ?
JMX는 Java Management Extensions 의 약자로 자바 어플리케이션을 관리하고 모니터링하기 위한 표준 방법을 제공하는 기술을 말한다
JMX를 사용하면, 개발자는 자바 어플리케이션의 성능을 실시간으로 모니터링하고, 어플리케이션의 상태를 변경하며, 디버깅 정보를 얻을 수 있다.
즉, 어플리케이션 서버를 모니터링 할 수 있는 툴을 말하는 건데, JDK 5버전 이상의 서버에서는 기본적으로 제공되는 툴이다.
참고
javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplication
I developed a Spring boot application and the functionality of the application is working fine. However, at the time of startup, I see the below exception multiple times. When I ran the same
stackoverflow.com
https://www.jetbrains.com/help/idea/run-debug-configuration-spring-boot.html#spring-boot