New answers tagged java-21
0
votes
sample example of java upgrade from 8 to 21 using open rewrite
This page shows you how to upgrade to spring boot 3.3 and Java 21:
https://docs.openrewrite.org/recipes/java/spring/boot3/springboot3bestpractices
Under usage there is a command you can copy for Maven ...
0
votes
Genson with jakarta in java21 and tomcat 10.1
Need to tallk to Community Support Tea.
0
votes
Compilation error after upgrading to JDK 21 - "NoSuchFieldError: JCImport does not have member field JCTree qualid"
i juste increase springframword version to 3.2.3 and it work:
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<...
1
vote
Accepted
Best data structure for storing 2048 minecraft ItemTags?
I think the first thing you should consider is: "Do I really need people to be able to choose a stack size of 1837?". What would be the player's benefit of choosing such an arbitrary number? ...
3
votes
Are virtual threads supported in Open Liberty v23+
The article that Jared refers to is now published on InfoQ.com: https://www.infoq.com/articles/java-virtual-threads-a-case-study/
The article mainly discusses what our performance team found when they ...
0
votes
How to install Sencha Cmd 7.8.0.59 (linux-amd64) on eclipse-temurin:21 docker image
The error message really says it all - you need to install Java 8 (provided on Ubuntu by the openjdk-8-jdk package) and set INSTALL4J_JAVA_HOME to its location:
FROM eclipse-temurin:21 as builder
ENV ...
0
votes
SpringBootTest hangs following Java 21 migration
I had a similar issue with SpringBootTest 3.3.1 hanging when switching to JDK 21.
For me it turned out to be some @Scheduled tasks for Springs @EnableScheduling scheduled task execution capability.
It ...
0
votes
HikariCP keep alive query leaking Google Spanner Sessions
TLDR: Update to at least version 2.16.2 of the Spanner JDBC driver. It is however recommended to always use the latest version of the Spanner JDBC driver. At the time of writing, that is version 2.20....
1
vote
Accepted
Spring Security 6 - how to handle InvalidBearerTokenExeption
you can add an authenticationEntryPoint as below
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.csrf(AbstractHttpConfigurer::disable)
...
1
vote
What can explain a deadlock only occuring with virtual threads?
Pinning is a lingering effect of using virtual threads and can unfortunately lead to serious deadlock scenarios. I've encountered these deadlocks while using various external libraries like Apache ...
0
votes
ObjectSizeCalculator replacement in java 21
I'd suggest you use the Java Object Layout library.
0
votes
Accepted
Intermittent Connection Timeout Issues in Java 21/Spring Boot 3.1.6 Application with Multiple API Consumption
To address this, I implemented a retry mechanism using RestTemplate to handle these intermittent issues gracefully.
import org.springframework.web.client.RestTemplate;
import org.springframework.web....
0
votes
JavaFX 21 modular application, how to add automatics modules (H2 and Hibernate) to classpath after jlink has linked modules required for the runtime
There seems to be a misconception one needs to have all jars on which an application depends to be modular to build a jlink image. It is correct that jlink will only build an image from modularized ...
6
votes
Accepted
Why ReentrantLock is better for virtual threads than synchronized?
Virtual threads (fibers) are indicated for tasks that involve blocking, tasks that are not CPU-bound. Blocking tasks include those that perform file I/O, logging, network calls, database access, etc.
...
0
votes
How do I update Eclipse?
Use Help > Check for Updates to update to 2024-06 to get support for Java 22 (Java 22 was released after Eclipse 2024-03 so a newer version of Eclipse is required to use Java 22 in your projects).
–...
0
votes
Error creating bean with name 'postgresMlEmbeddingModel' defined in class path resource
From the github page of postgresml, it seems you can just start it with docker.
Just use the newest version that you can fine here since I assume it changes often. (There is no latest tag that I can ...
1
vote
Accepted
Error creating bean with name 'refreshEventListener' after upgraded to Java 21 and SpringBoot 3.2.4
It seems you have been using incorrect hibernate-related dependencies.
I added the following in your pom.xml
<dependency>
<groupId>io.hypersistence</groupId>
<...
Top 50 recent answers are included
Related Tags
java-21 × 211java × 126
spring-boot × 51
virtual-threads × 32
spring × 14
maven × 14
project-loom × 10
spring-boot-3 × 10
intellij-idea × 9
multithreading × 7
gradle × 7
eclipse × 6
javafx × 6
java-17 × 6
tomcat × 5
concurrency × 5
structured-concurrency × 5
spring-webflux × 4
project-panama × 4
android × 3
xml × 3
google-app-engine × 3
graphql × 3
jvm × 3
pattern-matching × 3