Skip to main content

Questions tagged [java-21]

Java 21 is a Java language implementation released on September 19, 2023 and includes virtual threads, sequenced collections, record patterns, pattern matching for switch, string templates, and unnamed classes and variables. Use this tag only for questions specific to Java 21 and its features. For generic Java programming questions, the [java] tag should be used.

0 votes
0 answers
12 views

sample example of java upgrade from 8 to 21 using open rewrite

I have a springboot application with version 2.x and using java 8, I would like to upgrade the java VERSION TO 21 and spring boot version to 3.x, My question is which is the easiest way to upgrade ...
sheetal mahandule's user avatar
0 votes
1 answer
21 views

Genson with jakarta in java21 and tomcat 10.1

I use genson 1.6 and i must migrate in tomcat 10.1. `<dependency> <groupId>com.owlike</groupId> <artifactId>genson</artifactId> <version>1.6</version&...
Marcodi's user avatar
1 vote
0 answers
18 views

Error 400 [no body] when trying to send a GraphQL Request with HttpSyncGraphQlClient in Spring Boot 3.3.1

I have a Java 21 Spring Boot 3.3.1 using MVC application. I used to send GraphQL requests with RestClient and just built the GraphQL body manually. Since I am using MVC, I could not use the ...
Ebad's user avatar
  • 283
-5 votes
0 answers
73 views

Occasional null pointer issues with virtual threads [closed]

Error: I would like to understand in what scenario the following example would cause a null pointer exception. For example: 1) public class DataLoaderAsync { private volatile Future task = null; ...
user26373326's user avatar
0 votes
1 answer
78 views

Best data structure for storing 2048 minecraft ItemTags? [closed]

Context, I'm working on a Minecraft mod (1.21, so Java 21), the purpose of which is to: Use the max_stack_size data component to drive the apparent default max-stack-size of items in an straight-...
AnDrew the Awesome's user avatar
0 votes
0 answers
18 views

Error : Could not get unknown property 'JacocoMerge' for root project of type org.gradle.api.project || in Gradle 8.5 with Java 21

Facing issue for JacocoMerge Task Below are version details: Java - 21 Gradle - 8.5 Jacoco - 0.8.11 Below are gradle code `task jacocoMerge(type:JacocoMerge){ destinationFile = file(filePath) ...
Lina's user avatar
  • 305
0 votes
0 answers
48 views

Error when running my java appengine project locally when using cloudsdk version greater than 449

I am getting this error when running the project locally using java21 and when using any cloud sdk version greater than this: 449.0.0 [INFO] GCLOUD: com.google.apphosting.utils.config....
Ibrahim Ali Mohamed's user avatar
0 votes
1 answer
34 views

HikariCP keep alive query leaking Google Spanner Sessions

I have a spring boot application using HikariCP. The app connects to a google spanner db. I am seeing the following session leak exception caused by HikariCP keep alive queries at com.google.cloud....
taimur's user avatar
  • 113
0 votes
1 answer
99 views

How to install Sencha Cmd 7.8.0.59 (linux-amd64) on eclipse-temurin:21 docker image

I'm trying to install Sencha Cmd 7.8.0.59 on the eclipse-temurin:21 docker image; FROM eclipse-temurin:21 as builder ENV CMD_VERSION="7.8.0.59" RUN apt-get update && apt-get ...
Bent André Solheim's user avatar
0 votes
1 answer
35 views

Spring Security 6 - how to handle InvalidBearerTokenExeption

Spring boot 3 Spring Security 6 what wrong i am doing ? Defined ExceptionHandler @ExceptionHandler({AuthenticationException.class }) public ResponseEntity<Object> handleInvalidBearerToken(...
user1428716's user avatar
  • 2,104
0 votes
0 answers
60 views

GAE on java 21 throws NullPointerException at CookieCache.parseCookies()

I updated my Google App Engine app from java 17 to java 21 following instructions on https://cloud.google.com/appengine/docs/standard/java-gen2/upgrade-java-runtime I am using the legacy bundled ...
Antoine Snyers's user avatar
-1 votes
1 answer
58 views

ObjectSizeCalculator replacement in java 21 [duplicate]

"jdk.nashorn.internal.ir.debug.ObjectSizeCalculator" I have a usecase where my application would check size of the object during runtime. this was possible in java 8 with the above mentioned ...
Sakthivel C's user avatar
0 votes
0 answers
47 views

Trying to build OpenJDK on Windows 11 with Cygwin64 but get error: "Cannot locate a valid Visual Studio installation"

Trying to build OpenJDK on Windows 11 with Cygwin64 but get error: "Cannot locate a valid Visual Studio installation" I installed Oracle JDK 22. I ran the Visual Studio Setup exe and ...
likejudo's user avatar
  • 3,574
0 votes
0 answers
31 views

Eclipse crahing each time when i try to import built in libraries or enter words on Version: 2024-06 (4.32.0) [duplicate]

I tried many ways ,but i can't solve it.I also tried by installing other version and it also not working.Then i tryed other ubuntu version like 22 version it worked but not work with 24.04 LTS. log ...
Lakshmi 's user avatar
3 votes
1 answer
165 views

Why ReentrantLock is better for virtual threads than synchronized?

I've visited some IT conference and on a session about virtual threads feature in Java 21+ was mentioned that synchronized might(!) be a problem for virtual threads because of pinning virtual thread ...
gstackoverflow's user avatar

15 30 50 per page
1
2 3 4 5
14