{"id":"e5443ccf25ed89fd","repo":"spring-projects/spring-boot","slug":"could-not-invoke-shutdown-operation","errorCode":null,"errorMessage":"Could not invoke shutdown operation","messagePattern":"Could not invoke shutdown operation","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/SpringApplicationAdminClient.java","lineNumber":93,"sourceCode":"\t\t\tthrow new MojoExecutionException(ex.getMessage(), ex);\n\t\t}\n\t}\n\n\t/**\n\t * Stop the application managed by this instance.\n\t * @throws MojoExecutionException if the JMX service could not be contacted\n\t * @throws IOException if an I/O error occurs\n\t * @throws InstanceNotFoundException if the lifecycle mbean cannot be found\n\t */\n\tvoid stop() throws MojoExecutionException, IOException, InstanceNotFoundException {\n\t\ttry {\n\t\t\tthis.connection.invoke(this.objectName, \"shutdown\", null, null);\n\t\t}\n\t\tcatch (ReflectionException ex) {\n\t\t\tthrow new MojoExecutionException(\"Shutdown failed\", ex.getCause());\n\t\t}\n\t\tcatch (MBeanException ex) {\n\t\t\tthrow new MojoExecutionException(\"Could not invoke shutdown operation\", ex);\n\t\t}\n\t}\n\n\tprivate ObjectName toObjectName(String name) {\n\t\ttry {\n\t\t\treturn new ObjectName(name);\n\t\t}\n\t\tcatch (MalformedObjectNameException ex) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid jmx name '\" + name + \"'\");\n\t\t}\n\t}\n\n\t/**\n\t * Create a connector for an {@link javax.management.MBeanServer} exposed on the\n\t * current machine and the current port. Security should be disabled.\n\t * @param port the port on which the mbean server is exposed\n\t * @return a connection\n\t * @throws IOException if the connection to that server failed","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/5b2dbdbb8be64415eb6552f81ff7c449c8d251e6/build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/SpringApplicationAdminClient.java#L75-L111","documentation":"Error \"Could not invoke shutdown operation\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/SpringApplicationAdminClient.java:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5b2dbdbb8be64415eb6552f81ff7c449c8d251e6","analyzedAt":"2026-08-04T18:53:14.967Z","schemaVersion":2}