{"id":"f3b7c6b74ed39dd5","repo":"spring-projects/spring-boot","slug":"unable-to-retrieve-ready-attribute","errorCode":null,"errorMessage":"Unable to retrieve 'ready' attribute","messagePattern":"Unable to retrieve 'ready' attribute","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java","lineNumber":167,"sourceCode":"\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tthrow new MojoFailureException(\"Could not contact Spring Boot application via JMX on port \" + this.jmxPort\n\t\t\t\t\t+ \". Please make sure that no other process is using that port\", ex);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tthrow new MojoExecutionException(\"Failed to connect to MBean server at port \" + this.jmxPort, ex);\n\t\t}\n\t}\n\n\tprivate void doWaitForSpringApplication(MBeanServerConnection connection)\n\t\t\tthrows MojoExecutionException, MojoFailureException {\n\t\tfinal SpringApplicationAdminClient client = new SpringApplicationAdminClient(connection, this.jmxName);\n\t\ttry {\n\t\t\tCallable<@Nullable Boolean> isReady = () -> (client.isReady() ? true : null);\n\t\t\texecute(this.wait, this.maxAttempts, isReady);\n\t\t}\n\t\tcatch (ReflectionException ex) {\n\t\t\tthrow new MojoExecutionException(\"Unable to retrieve 'ready' attribute\", ex.getCause());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tthrow new MojoFailureException(\"Could not invoke shutdown operation\", ex);\n\t\t}\n\t}\n\n\t/**\n\t * Execute a task, retrying it on failure.\n\t * @param <T> the result type\n\t * @param wait the wait time\n\t * @param maxAttempts the maximum number of attempts\n\t * @param callback the task to execute (possibly multiple times). The callback should\n\t * return {@code null} to indicate that another attempt should be made\n\t * @return the result\n\t * @throws Exception in case of execution errors\n\t */\n\tpublic <T> T execute(long wait, int maxAttempts, Callable<@Nullable T> callback) throws Exception {\n\t\tgetLog().debug(\"Waiting for spring application to start...\");","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/5b2dbdbb8be64415eb6552f81ff7c449c8d251e6/build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java#L149-L185","documentation":"Error \"Unable to retrieve 'ready' attribute\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java:167 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}