{"id":"14ba7ff93aff8233","repo":"spring-projects/spring-boot","slug":"interrupted-while-waiting-for-spring-boot-app-to-s","errorCode":null,"errorMessage":"Interrupted while waiting for Spring Boot app to start.","messagePattern":"Interrupted while waiting for Spring Boot app to start\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java","lineNumber":199,"sourceCode":"\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...\");\n\t\tfor (int i = 0; i < maxAttempts; i++) {\n\t\t\tT result = callback.call();\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tString message = \"Spring application is not ready yet, waiting \" + wait + \"ms (attempt \" + (i + 1) + \")\";\n\t\t\tgetLog().debug(message);\n\t\t\tsynchronized (this.lock) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.lock.wait(wait);\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedException ex) {\n\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\t\tthrow new IllegalStateException(\"Interrupted while waiting for Spring Boot app to start.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthrow new MojoExecutionException(\n\t\t\t\t\"Spring application did not start before the configured timeout (\" + (wait * maxAttempts) + \"ms\");\n\t}\n\n\t@Override\n\tprotected boolean isUseTestClasspath() {\n\t\treturn this.useTestClasspath;\n\t}\n\n\tprivate class CreateJmxConnector implements Callable<@Nullable JMXConnector> {\n\n\t\tprivate final int port;\n\n\t\tCreateJmxConnector(int port) {\n\t\t\tthis.port = port;","sourceCodeStart":181,"sourceCodeEnd":217,"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#L181-L217","documentation":"Error \"Interrupted while waiting for Spring Boot app to start.\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java:199 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}