Slow performance with NamedParameterJdbcTemplate

Today I tried inserting 256 rows in a single, empty PostgreSQL table which has only one index on it using Spring's NamedParameterJdbcTemplate . To my surprise the single transaction took over 3 minutes to complete, over 500ms per INSERT statement. To make things worse, the same inserts during integration testing on an H2 database completed … Continue reading Slow performance with NamedParameterJdbcTemplate

Advertisements

Adding Elastichsearch filebeat to Docker images

One of the projects I'm working on uses a micro-service architecture. Every micro-service is shipped as a Docker image and executed on Amazon AWS using ECS. This basically means that on a random number of servers, a (somewhat) random number of instances of a single micro-service can run ... and this about 15 times (the … Continue reading Adding Elastichsearch filebeat to Docker images

Log contextual information to all log messages in Spring Boot using Logback’s MDC

Logging is sometimes one of the things on which too little attention is spent, but when production errors start to arrive you'll sure want to have the maximum amount of information you want. Most logging implementations in Java will give you the time, the name of the class (or to be more precise, the name … Continue reading Log contextual information to all log messages in Spring Boot using Logback’s MDC

Using alternative credentials for Liquibase in Spring Boot

One of the projects I'm working uses Spring Boot to handle all database changes for each micro-service. One of the obvious requirements to make this work is a database user with DBA rights, otherwise it can not create, alter or drop tables. You could configure the default datasource to use such user, but this would … Continue reading Using alternative credentials for Liquibase in Spring Boot

Windows Phone 10: Your account settings are out of date

Today I started my with a cheerful notice from my Windows Phone 10 mentioning that my Outlook account settings are out of date. A bit annoyed I ignored it until the afternoon when a second (hotmail) account started annoying me with the same message. Letting Windows Phone "repair" the issue resulted in nothing but an 0x80070426 … Continue reading Windows Phone 10: Your account settings are out of date

maven-jaxb2-plugin: java.lang.NoSuchFieldError: encoding

This is the TLDR; version of this bug, so if the following solution doesn't work for you, you might want to read it all. When upgrading to a new version of Maven you might be faced with the following exception   The problem is caused by a more recent version of com.sun.xml.bind:jabx-xjc being used when … Continue reading maven-jaxb2-plugin: java.lang.NoSuchFieldError: encoding

No inserts using Hibernate and Spring

I was setting up a simple side-project with Spring, Spring Data and Hibernate. My repositories are generated using Spring Data's jpa:repositories to save on development time and the database schema is generated using Hibernate, based on my JPA and JSR-303 annotated entities. However, one of the issues I encountered was that my repositories did not insert anything in … Continue reading No inserts using Hibernate and Spring