cloudfoundry / java-buildpack

Cloud Foundry buildpack for running Java applications
Apache License 2.0
437 stars 2.58k forks source link

Latest java-buildpack version doesn't work with IBM JRE. #955

Closed kevin-ortega closed 2 years ago

kevin-ortega commented 2 years ago

There seems to be a problem introduced in the latest java-buildpack, v4.49, using the IBM JRE:

   -----> Java Buildpack v4.49 | git@github.com:cloudfoundry/java-buildpack.git#5d5900c0
   -----> Downloading Ibm JRE 1.8.0_sr7fp11 from https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/8.0.7.11/linux/x86_64/ibm-java-jre-8.0-7.11-x86_64-archive.bin (8.9s)
   [Buildpack]                      ERROR Finalize failed with exception #<NameError: uninitialized constant JavaBuildpack::Jre::IbmJreInitializer::Tempfile>
   uninitialized constant JavaBuildpack::Jre::IbmJreInitializer::Tempfile
   Failed to compile droplet: Failed to run finalize script: exit status 1
   Installing Ibm JRE to .java-buildpack/ibm_jre Exit status 223

I don't see the problem using the previous version, v4.48.3:

 -----> Java Buildpack v4.48.3 | https://github.com/cloudfoundry/java-buildpack#97237cd
 -----> Downloading Ibm JRE 1.8.0_sr7fp11 from https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/8.0.7.11/linux/x86_64/ibm-java-jre-8.0-7.11-x86_64-archive.bin (1m 6s)
   Installing Ibm JRE to .java-buildpack/ibm_jre (22.9s)
 -----> Downloading Jvmkill Agent 1.0.0 from https://github.com/ibmruntimes/jvmkill/raw/jvmkill-ibmagent/libjvmkill.so (0.6s)
dmikusa commented 2 years ago

Looks like this was missing a 'require'. I'm not totally sure how that happened since the code has largely not changed in years. At any rate, adding the 'require' seems to have fixed the issue in my test. Please let me know if you still see any issues.

kevin-ortega commented 2 years ago

Works for me now. Thanks Daniel!

dmikusa commented 2 years ago

Fantastic, thanks for confirming!