graalvm / setup-graalvm

GitHub Action for setting up GraalVM distributions.
https://www.graalvm.org
Universal Permissive License v1.0
192 stars 27 forks source link

Error: Unable to find the latest Java version for '11' #105

Open sanel opened 5 days ago

sanel commented 5 days ago

Hi guys,

I'm trying to use this action with the follwing options:

      - uses: graalvm/setup-graalvm@v1
        with:
          java-version: '11'
          distribution: 'graalvm-community'
          components: 'native-image'
          version: '22.3.3'

and it fails with:

Error: Unable to find the latest Java version for '11'. Please make sure the java-version is set correctly.
If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.

Any ideas?

fniephaus commented 5 days ago

Hi @sanel, could you provide us with a link to the failing build? Also, it may help if you restart the build and enable debugging.

Just for the record, GraalVM CE 22.3.3 is here.

sanel commented 5 days ago

Sure @fniephaus:

I'm a bit new to GH actions, how to enable debugging? I've reverted workflows to use ayltai/setup-graalvm@v1 which worked before.

Let me know if you need anything else :)

fniephaus commented 5 days ago

Thanks for sharing those links, @sanel. You can turn on debugging when you restart a build job (there's a checkbox for that).

Anyway, it seems the problem is that you're trying to use GraalVM CE JDK 11, which is quite old and unsupported. The build may actually work if you're using:

      - uses: graalvm/setup-graalvm@v1
        with:
          java-version: '11'
          components: 'native-image'
          version: '22.3.3'

Note the missing distribution property.

Do you really need to use JDK 11 or could you just upgrade to JDK 17, if not JDK 21?