Skip to content

tomcat version resolution error for pattern "10.1.+": improper constraint: 10.1.+ #1219

@stephanme

Description

@stephanme

Staging a simple servlet app with java-buildpack v5.0.0 fails when specifying:

  JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 17.+ } }'
  JBP_CONFIG_TOMCAT: '{tomcat: { version: 10.1.+, external_configuration_enabled: true }, external_configuration: { version: "1.4.0", repository_root: "https://tomcat-config.cfapps.eu12.hana.ondemand.com" }}' - fails

Staging logs:

   2026-03-23T16:07:25.29+0100 [STG/0] OUT Cell 0b7eac6c-982c-4602-bb14-1c0c9839e44a successfully created container for instance 2cf4a7cb-9f6a-4159-b736-49996404db1a
   2026-03-23T16:07:25.60+0100 [STG/0] OUT Downloading app package...
   2026-03-23T16:07:25.60+0100 [STG/0] OUT Downloading build artifacts cache...
   2026-03-23T16:07:26.44+0100 [STG/0] OUT Downloaded app package (31.9M)
   2026-03-23T16:07:29.65+0100 [STG/0] OUT Downloaded build artifacts cache (206.7M)
   2026-03-23T16:07:31.00+0100 [STG/0] OUT -----> Download go 1.24.6
   2026-03-23T16:07:35.14+0100 [STG/0] OUT -----> Running go build supply
   2026-03-23T16:07:35.14+0100 [STG/0] ERR go: downloading go1.25.4 (linux/amd64)
   2026-03-23T16:07:51.46+0100 [STG/0] OUT -----> Java Buildpack version 5.0.0
   2026-03-23T16:07:51.46+0100 [STG/0] OUT -----> Supplying Java
   2026-03-23T16:07:51.46+0100 [STG/0] OUT Detected container: Tomcat
   2026-03-23T16:07:51.46+0100 [STG/0] OUT Selected JRE: OpenJDK
   2026-03-23T16:07:51.46+0100 [STG/0] OUT -----> Installing OpenJDK JRE
   2026-03-23T16:07:51.46+0100 [STG/0] OUT Installing OpenJDK 17.0.18+10
   2026-03-23T16:07:51.46+0100 [STG/0] OUT -----> Installing openjdk 17.0.18+10
   2026-03-23T16:07:51.46+0100 [STG/0] OUT Download [https://buildpacks.cloudfoundry.org/dependencies/openjdk/openjdk_17.0.18%2B10_linux_x64_any-stack_5c495a4f.tgz]
   2026-03-23T16:07:53.43+0100 [STG/0] OUT Detected Java major version: 17
   2026-03-23T16:07:53.43+0100 [STG/0] OUT Installing JVMKill Agent
   2026-03-23T16:07:53.43+0100 [STG/0] OUT -----> Installing jvmkill 1.17.0
   2026-03-23T16:07:53.43+0100 [STG/0] OUT Copy [/tmp/cache/final/dependencies/07ad75beee5ebc28f478abf4f68f15072e1277f6a29a194ee76368e7d210baee/jvmkill-1.17.0-RELEASE.so]
   2026-03-23T16:07:53.44+0100 [STG/0] OUT JVMKill Agent installed to /tmp/contents961684101/deps/0/jre/bin/jvmkill-1.17.0.so
   2026-03-23T16:07:53.44+0100 [STG/0] OUT Installing Memory Calculator
   2026-03-23T16:07:53.44+0100 [STG/0] OUT -----> Installing memory-calculator 4.2.0
   2026-03-23T16:07:53.44+0100 [STG/0] OUT Copy [/tmp/cache/final/dependencies/2490b3dc0ab98eb25ae01d942c1c91f5a712245e0c7533532b87fcee60a328c9/memory-calculator-4.2.0.tgz]
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Memory Calculator installed: Loaded Classes: 18135, Threads: 250
   2026-03-23T16:07:53.49+0100 [STG/0] OUT OpenJDK JRE installation complete
   2026-03-23T16:07:53.49+0100 [STG/0] OUT JRE installation complete: OpenJDK 17.0.18+10
   2026-03-23T16:07:53.49+0100 [STG/0] OUT -----> Installing frameworks
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Detected frameworks: [Client Certificate Mapper,Container Security Provider,JMX,Java Opts]
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Installing framework: Client Certificate Mapper
   2026-03-23T16:07:53.49+0100 [STG/0] OUT -----> Installing Client Certificate Mapper
   2026-03-23T16:07:53.49+0100 [STG/0] OUT -----> Installing client-certificate-mapper 2.0.1
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Copy [/tmp/cache/final/dependencies/70a0133aec07bbc310eea90dd90c988affe7e55c78e312ddbf7ca54e7e284378/client-certificate-mapper-2.0.1.jar]
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Installed Client Certificate Mapper version 2.0.1
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Installing framework: Container Security Provider
   2026-03-23T16:07:53.49+0100 [STG/0] OUT -----> Installing Container Security Provider
   2026-03-23T16:07:53.49+0100 [STG/0] OUT -----> Installing container-security-provider 1.20.0
   2026-03-23T16:07:53.49+0100 [STG/0] OUT Copy [/tmp/cache/final/dependencies/26507de65a362d3c2c53fe394c672326ba7c571cc8a8c310352aec02673cd329/container-security-provider-1.20.0-RELEASE.jar]
   2026-03-23T16:07:53.50+0100 [STG/0] OUT Installed Container Security Provider version 1.20.0
   2026-03-23T16:07:53.50+0100 [STG/0] OUT Installing framework: JMX
   2026-03-23T16:07:53.50+0100 [STG/0] OUT -----> JMX enabled on port 5000
   2026-03-23T16:07:53.50+0100 [STG/0] OUT Installing framework: Java Opts
   2026-03-23T16:07:53.50+0100 [STG/0] OUT -----> Supplying Tomcat
   2026-03-23T16:07:53.50+0100 [STG/0] OUT Using Tomcat 10.1.+ for Java 17
   2026-03-23T16:07:53.50+0100 [STG/0] OUT **ERROR** Failed to supply container: tomcat version resolution error for pattern "10.1.+": improper constraint: 10.1.+
   2026-03-23T16:07:53.55+0100 [STG/0] ERR Failed to compile droplet: Failed to run all supply scripts: exit status 14

When changing the tomcat verion to 10.+ (instead of 10.1.+), staging succeeds:

  JBP_CONFIG_TOMCAT: '{tomcat: { version: 10.+, external_configuration_enabled: true }, external_configuration: { version: "1.4.0", repository_root: "https://tomcat-config.cfapps.eu12.hana.ondemand.com" }}' - fails

Removing the external configuration for tomcat doesn't make a difference.

The same application could be pushed w/o problems using an older version of the java-buildpack from the golang branch: https://github.com/stephanme/java-buildpack/tree/feature/go-migration (version from ~18th Feb).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions