java.lang.ClassNotFoundException: javax.annotation.PostConstruct

When upgrading to the latest tools and libraries in a Spring Boot application with OpenAPI code generator in place the OpenAPI Kotlin generator introduced jakarta.annotation:jakarta.annotation-api. But with this in place the application refused to start with something like org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat…Caused by: java.lang.IllegalStateException: …

java.lang.ClassNotFoundException: javax.annotation.PostConstruct Read More »

REST & JSON basics

For REST is a very good source to start reading and a guideline for JSON can be found under

ArrayIndexOutOfBounds with Kotlin coroutines and Hibernate-Validator

I was trying to build a spring boot application based on spring spring-boot-starter-webflux which is based on kotlinx-coroutines-reactor. The API definition was done with OpenAPI-Generator with “kotlin-spring” generator and “spring-boot” library. Setting the configOptions useBeanValidation and reactive to true generates suspendable methods and uses webflux. And adding hibernate-validator allows to use bean validation for every …

ArrayIndexOutOfBounds with Kotlin coroutines and Hibernate-Validator Read More »

Lombok and log4shell

Project lombok has become a defacto standard in close to every Java project I see. Because of this I want to also write about the ongoing log4j problems as described under The annotation @Log4j allows to create a log4j logger field in the annotated class. This of course implicates that your project is using …

Lombok and log4shell Read More »

gradle status plugin

I’ve started to write a simple plugin to analyse gradle projects and send dependency information to a central server. This way I want to get insight into all projects in the company and check if there is some log4j2 dependency below 2.16.0. You can find the code under The plugin was accepted and is …

gradle status plugin Read More »

MongoDB sharded cluster

MongoDB supports horizontal scaling by the use of sharding. A sharded cluster consists of 3 parts: Configuration replica set to store metadata Shard replica set(s) Mongos server as a query router that uses metadata from config replica set to query data from the shard(s) Every replica set can consist of primary and secondary instances. Single …

MongoDB sharded cluster Read More »