Spring Boot does not start in Debug (Java) mode

Asked

Viewed 812 times

0

I have an application developed with Springboot and can’t start my application in mode only debug. (If not debug it starts normally) It seems to loop and this error message keeps showing up in the log

javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplication
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) ~[na:1.8.0_91]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(DefaultMBeanServerInterceptor.java:1444) ~[na:1.8.0_91]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.getClassLoaderFor(JmxMBeanServer.java:1324) ~[na:1.8.0_91]
    at javax.management.remote.rmi.RMIConnectionImpl$6.run(RMIConnectionImpl.java:1365) ~[na:1.8.0_91]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_91]
    at javax.management.remote.rmi.RMIConnectionImpl.getClassLoaderFor(RMIConnectionImpl.java:1362) ~[na:1.8.0_91]
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:813) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) ~[na:1.8.0_91]
    at sun.rmi.transport.Transport$1.run(Transport.java:200) [na:1.8.0_91]
    at sun.rmi.transport.Transport$1.run(Transport.java:197) [na:1.8.0_91]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_91]
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196) [na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) [na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) [na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) [na:1.8.0_91]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [na:1.8.0_91]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_91]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_91]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91]

Can someone help me ? Thank you!!

EDIT

@EnableAsync
@EnableHystrix
@EnableHystrixDashboard
@EnableCircuitBreaker
@SpringBootApplication
@EnableMongoRepositories(basePackages = { "..."}) 
@ComponentScan({"..."})
public class UploadApplication{

    public static void main(String[] args) {
        SpringApplication.run(UploadApplication.class, args);
    }
  • Put the class in there SpringBoot.

  • I have several configuration classes (mongodb, Oauth2, restcontext, etc) I can’t put them all here, I can put the main class, I don’t know if it helps

  • 1

    A common error is that application has many breakpoints.. try to remove all of them and start again in debug mode. To remove all, if you have been in the eclipse, go to Window > Show View > Other > Search for breakpoints. There you will find an X to remove all.

  • @Lucascosta Thank you very much, it was just that, it had 15 breakpoints, I took as you suggested and it worked!! , put in the answer to earn the points =)

1 answer

1


A common error is that the application has many breakpoints.. try to remove all of them and start again in debug mode. To remove all of them, if I was on eclipse, do the following:

Window > Show View > Other

Search for breakpoints. There you will find an X to remove all.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.