Questions tagged [openjdk-17]

63 questions
18
votes
8 answers

Eclipse not able to open java files -> Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass

Getting the following error, after adding Lombok lib An error has occurred. See error log for more details. Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
16
votes
2 answers

What is 'serviceability memory category' of Native Memory Tracking?

I have an java app (JDK13) running in a docker container. Recently I moved the app to JDK17 (OpenJDK17) and found a gradual increase of memory usage by docker container. During investigation I found that the 'serviceability memory category' NMT…
Egor
  • 2,122
  • 2
  • 21
  • 23
8
votes
4 answers

Unable to make field static final java.lang.invoke.MethodHandles$Lookup java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP

I have a Spring Feign client which is sending POJO object to remote endpoint using POST and my application start-up fails with below exceptions. java.lang.reflect.InaccessibleObjectException: Unable to make field static final…
Ashfaq Khan
  • 101
  • 1
  • 4
6
votes
1 answer

Default algo for RandomGenerator (L32X64MixRandom) generates the same number each time

The default algo for RandomGenerator ie. L32X64MixRandom as of JDK 18 (available since 17), generates the same number each time on individual invocations. jshell> java.util.random.RandomGenerator.getDefault().nextInt(100,999) $10 ==> 526 jshell>…
Dhrubajyoti Gogoi
  • 1,265
  • 10
  • 18
6
votes
1 answer

How to generate self-signed certificate in Java with JDK17

tl,dr; Is there a native Java17 solution to generate self-signed certificate, either via standard library (very unlikely) or some slim, lightweight library? There is a similar question (Access `sun.security.x509` in JDK 11 without modules?, asked by…
Wojtek
  • 1,845
  • 1
  • 14
  • 33
6
votes
1 answer

Why does Java 17 throw a RejectedExecutionException when adding tasks to a ForkJoinPool?

I used Java 16 to make requests to an API over HTTP. To speed this up overall, I've loaded this onto a custom ForkJoinPool. I've compiled a reproducing example below. Since moving to Java 17 (openjdk build 17.0.1+12-39), this throws a…
TTT
  • 6,505
  • 10
  • 56
  • 82
5
votes
0 answers

jdk.compiler does not export com.sun.tools.javac.processing to unnamed module

I get the following error after executing command mvn clean package: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x298bfadd) cannot access class…
djasyfuj
  • 93
  • 1
  • 2
  • 8
5
votes
1 answer

Unable to compile JDK 17 using Maven 3.8: error: module jdk.compiler does not "opens com.sun.tools.javac.processing" to unnamed module

I am trying to compile an existing Spring Boot project using JDK 17 and Maven 3.8.4 and I keep getting this error. Unable to make field…
Jose Martinez
  • 11,452
  • 7
  • 53
  • 68
4
votes
1 answer

Java ForkJoinPool hangs in JDK17

The following code works with JDK16 reproducibly and hangs with JDK17 reproducibly on my laptop (4/8-core) with basic command line options: "-ea". A JDK-ticket exists (https://bugs.openjdk.org/browse/JDK-8281524), but there was disagreement whether…
Uwe
  • 85
  • 1
  • 5
4
votes
1 answer

How to write Github workflow for JDK 17

This is the current Github for JDK 11 and works fine. I have migrated my project to JDK 17. It works fine locally but breaks in Github workflows. I don't know how can I fix it? .github\workflows\docker-publish.yml:- name: Docker on: push: …
Masi Boo
  • 635
  • 1
  • 10
  • 24
4
votes
1 answer

Migration to java17 issue : module java.base does not "opens java.io" to unnamed module

My unit tests fail when I migrate from java8 to java 17. Here is an example of exceptions I get: Unable to make java.io.OptionalDataException(boolean) accessible: module java.base does not "opens java.io" to unnamed module When I googled, I found…
Aguid
  • 943
  • 2
  • 10
  • 24
4
votes
2 answers

OpenJDK 17 Alpine Image

I am looking for an openjdk 17 docker image based on alpine. It looks like we have got one…
enthusiast
  • 355
  • 1
  • 5
  • 16
4
votes
2 answers

Payara Server does not work with Netbeans 12.6 and JDK 17

We are migrating web apps that use java 1.7 here at the company. We then chose to use the latest stable version of JDK 17 and Payara server (we already use Glassfish), however when linking the server on NetBeans the Java 17 LTS platform does not…
Elvis Fabiane
  • 43
  • 1
  • 4
4
votes
1 answer

Why can't IDEA find JavaFX package after upgrade JavaFX Project to JDK 17 using Azul Zulu Builds of OpenJDK with FX?

I have a Java FX project and upgraded the project to JDK 17 using the following Azul Zulu Build of OpenJDK with JavaFX https://www.azul.com/downloads/?os=windows&package=jdk-fx Does anyone have a clue why Intellij can't find JavaFX package using…
midi
  • 3,128
  • 5
  • 30
  • 47
4
votes
2 answers

maven-surefire-plugin failing with OpenJDK 17 on gitlab-ci

Running Gitlab CI suddenly started failing with this exception: /usr/java/openjdk-17/bin/java -Xmx1024m -XX:MaxPermSize=256m -jar /builds/myapp/target/surefire/surefirebooter15709646820034007555.jar /builds/myapp/target/surefire…
jbx
  • 21,365
  • 18
  • 90
  • 144
1
2 3 4 5