Category Archives: Java

Out of memory when inserting lots of records with Hibernate

Issue Recently my team was developing an application in Java that needed to insert a lots of records (around one million) into a relational database (AWS Aurora in MySQL mode). We used Spring Boot 2 together with a recent version … Continue reading

Posted in database, Java | Tagged | Leave a comment

Kafka offset commit failed (CommitFailedException)

During one of my professional adventures I’ve observed a lot of errors like the infamous CommitFailedException presented below. There were many of them or similar in log messages generated by one of micro-services. org.apache.kafka.clients.consumer.CommitFailedException: Commit cannot be completed since the … Continue reading

Posted in Java, messaging, Spring | Tagged | Leave a comment

Lombok wastes more time than it saves

Lombok looks good to some programmers however introducing it into a project creates many serious risks (refer to my previous post about Lombok: Don’t use Lombok). One of these risks are breaking changes in Lombok. As of June 2019 the … Continue reading

Posted in Java | Tagged | 1 Comment

Generating classes from XSD under Java 11 – the right way

Recently I was struggling with a task of generating model classes from XML schema (XSD) using Java 11 and Maven. I was really annoyed that jaxb2-maven-plugin was not updated for so long to cooperate properly with Java versions like 9, … Continue reading

Posted in Java, XML | Tagged , , , | 4 Comments

jaxb2-maven-plugin 2.4 and Java 11

I decided to investigate how to use jaxb2-maven-plugin 2.4 with Java 11. It’s still not easy to make these things working together but this time I was more lucky (see my previous attempt with Java 10) and here is a … Continue reading

Posted in Java, XML | Tagged , , , | 8 Comments

Don’t use Lombok

Some time ago I’ve responded to a question “What are the risks with Project Lombok?” on StackOverflow. My answer got some positive attention so I’ve decided to share it here: In my opinion source code in “Java+Lombok” is not Java … Continue reading

Posted in Java | Tagged | 1 Comment

Apache Camel sucks!

I was thinking on this post for some longer time, wondering if it’s Camel’s fault or if it’s my fault. After 8 months of working with Apache Camel my judgement is clear: Apache Camel sucks! DISCLAIMER: my opinions here are … Continue reading

Posted in Java, Spring | Tagged , , | 9 Comments