Closed marcospereira closed 7 months ago
Duh! I now see #1018 exists. This is slightly more comprehensive than that. A reasonable path would be to merge that PR (after adjusting the tests), and then I can add other changes on top of it.
@aleksrutins, makes sense to you?
Yeah, that makes sense.
@coffee-cup, sorry for directly pinging you here, but I'm unsure who can approve the workflows to run and add the labels. Can you also take a look at #1021?
Actually, I don't really think my PR has anything that yours don't, so I think that mine could be closed and yours could be merged.
Actually, I don't really think my PR has anything that yours don't, so I think that mine could be closed and yours could be merged.
Makes sense to me too. Do you have permission to approve the workflows here, though?
The tests are failing because we need to update the Nix archive version being used for Java. As an example you can look at
It is failing when building
cargo run -- build examples/java-gradle-8 --name gradle
You can set the archive version to something like
59dc10b5a6f2a592af36375c68fda41246794b86
I was experimenting with this before I noticed that this PR existed
Thanks, @coffee-cup. I made that change, rebased it against the main branch, and running cargo run -- build examples/java-gradle-8 --name gradle
works locally for me.
Thank you 🎉
I am trying to deploy my Spring Boot Java 21 project but i am getting error that Java 21 is not supported
This is from my Railway log
@VjekoslavKrainovic I assume you mean "Java 21 is not supported" not "31" which of course doesn't exist.
@VjekoslavKrainovic I assume you mean "Java 21 is not supported" not "31" which of course doesn't exist.
Thank you! Fixed
I have a similar problem.
I'm setting the NIXPACKS_JDK_VERSION
enviormental varible to 21
and I'm getting this error
[Region: us-west1]
==============
Using Nixpacks
==============
context: 2556a1571a7cabe6a98664674a419fd0
Nixpacks build failed
Error: Unsupported JDK version: 21
I have a similar problem. I'm setting the
NIXPACKS_JDK_VERSION
enviormental varible to 21 and I'm getting this error[Region: us-west1] ============== Using Nixpacks ============== context: 2556a1571a7cabe6a98664674a419fd0 Nixpacks build failed Error: Unsupported JDK version: 21
I have this same problem while setting the value of NIXPACKS_JDK_VERSION
to 21.
A little fyi, a nixpacks release has not been done that includes this merged PR. if you need support for Java versions 20 and 21 now, you would need to provide a Dockerfile to build your app.
@aleksrutins am I correct in saying the above?
Hey, @coffee-cup,
When can we have a release with the changes here? Is there anything else blocking it?
Thanks in advance.
Hi everyone,
Thank you for the details. Just to know whether there is a release date to support Java 20/21 in Railway?
Once trying to deploy a Spring Boot App into Railway, I am also getting the same error:
12.08 [INFO] Total time: 9.659 s 12.08 [INFO] Finished at: 2024-01-22T22:39:43Z 12.08 [INFO] ------------------------------------------------------------------------ 12.08 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project game: Fatal error compiling: error: release version 21 not supported -> [Help 1] 12.08 [ERROR] 12.08 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 12.08 [ERROR] Re-run Maven using the -X switch to enable full debug logging. 12.08 [ERROR] 12.08 [ERROR] For more information about the errors and possible solutions, please read the following articles: 12.08 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Thank you for checking this.
Regards, João
I recommend using a Dockerfile instead of relying on Railway updating their nixpacks. It's as straightforward as a file like this:
FROM eclipse-temurin:21-jdk as build
COPY . /app
WORKDIR /app
RUN ./mvnw --no-transfer-progress clean package -DskipTests
RUN mv -f target/*.jar app.jar
FROM eclipse-temurin:21-jre
ARG PORT
ENV PORT=${PORT}
COPY --from=build /app/app.jar .
RUN useradd runtime
USER runtime
ENTRYPOINT [ "java", "-Dserver.port=${PORT}", "-jar", "app.jar" ]
I use this in my repo that deploys successfully to Railway: https://github.com/jitterted/ensembler/blob/master/Dockerfile
What?
This PR adds Java 20 and 21 support in Java and Scala providers.
Specifically for Scala, it also updates the Eclipse Temurin images to the latest versions.