Welcome to the Linux Foundation Forum!

Not able to change Java Version or Create a new buildpack

Hello -

  1. While I am trying to change the version of Java from 8 to 7 using the following command:

cf set-env roster JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 1.7.0_+ } }'

I get the following error, and I assume because the default version of Java buildpack installed is v4.5 which has open JDK from 1.8 and above or is the error due to something different? (Now that Leads to another question posted below the error)

Java Buildpack v4.5 (offline) | https://github.com/cloudfoundry/java-buildpack.git#ffeefb9

   2018-01-17T04:52:46.95-0500 [STG/0] OUT -----> Downloading Jvmkill Agent 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/trusty/x86_64/jvmkill-1.10.0_RELEASE.so (found in cache)

   2018-01-17T04:52:46.95-0500 [STG/0] ERR [Buildpack]                      ERROR Finalize failed with exception #<RuntimeError: Unable to find cached file for https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.7.0_79.tar.gz&gt;

   2018-01-17T04:52:46.95-0500 [STG/0] ERR Unable to find cached file for https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.7.0_79.tar.gz


   2018-01-17T04:52:46.95-0500 [STG/0] ERR Failed to compile droplet: Failed to run finalize script: exit status 1

   2.  I have tried to create a buildpack which has open JDK 7 using the command (cf create-buildpack java7_buildpack java-buildpack-v2.4.zip 11 --disable( Here I have downloaded the zip file from online onto my computer and is this the right command?)) and it say's I do not have permissions to do so, should I be contacting the CF vendor to get the required permissions and also, as a part of certification test to create a build pack or change the version of the Java can I access online to get the new buildpack or what are the options?

 

 3. Or apart from above 2 points is there a better way to change the version or create a buildpack?

Thank you!

Comments

  • TimHarris123
    TimHarris123 Posts: 8
    edited January 2018

    Yes, looks like you've spotted a real issue with the latest buildpack versioning.  It will take us until next week to get this fixed in the course - thanks for the comment, and apologies you ran into this...

    Tim

  • arunprasad6
    arunprasad6 Posts: 5
    edited January 2018

    Thanks Tim, please update once this issue has been fixed.

  • spgreenberg
    spgreenberg Posts: 86
    edited March 2018

    You are not able to install a buildpack because you are not an admin.  However, on many CF instances you can specify a buildpack by passing a github url to the push command using -b (some have this feature disabled).

    Different buildpack releases also support different runtime versions (like the JRE).  Therefore if the buildpack in your CF instance does not support a specific version, you can find the correct version on the github releases page and use that (example: https://github.com/cloudfoundry/java-buildpack/releases).  Using the -b flag as specified above, you can specify the appropriate release version.  The exact syntax is in the docs.

Categories

Upcoming Training