When deploying applications to Elastic application runtime (EAR) using the Java Buildpack, the staging process may fail with the following error during the finalization phase:
[Buildpack]ERROR Finalize failed with exception #<RuntimeError: No container can run this application.
This error occurs when the Java Buildpack’s detection logic fails to identify a supported execution environment (e.g., Spring Boot, Executable JAR, or Tomcat). In a multi-buildpack scenario—such as pushing a Python application alongside a Spring Boot service—the buildpack often fails because it cannot inspect the contents of a .jar file residing within a pushed directory.
To resolve this, you must provide the Java artifact in an exploded (unzipped) format. This ensures the buildpack can identify the META-INF/MANIFEST.MF and class files required to select a container.