Administrator

Lokesh Gupta

Lokesh Gupta is a Java developer with more than 20 years of experience and the founder of HowToDoInJava, which he started in 2012. He has worked on Java and Spring applications at Hewitt Associates, Hughes Systique, Adobe and Bank of America. The site has over 1,600 tutorials on Java, Spring Boot, Hibernate, testing and TypeScript. Every example is run and verified before it is published, and the source code is on GitHub.

Website: https://howtodoinjava.com

Github: https://github.com/lokeshgupta1981/

Twitter: @HowToDoInJAVA

LinkedIn: https://www.linkedin.com/in/lokeshgupta1981/

My Articles:

How to Fix MySQL Innodb_Force_Recovery Not Working Issue?

The innodb_force_recovery option starts MySQL in a recovery mode that lets the InnoDB storage engine run on a corrupted database, so we can dump the data before we rebuild the damaged tables. When innodb_force_recovery is not working, the cause is either a problem in the option file or corruption that …

JPackage : Create MSI/EXE Installer for Java App

The jpackage is a command-line tool introduced in Java 14 and helps create native installable packages (.exe, .msi, .dmg, .pkg, .deb, .rpm) for Windows, macOS, and Linux. Jpackage bundles Java applications along with a Java runtime (JRE) image, ensuring that end users do not need to install Java separately.

How to Use DBCC CHECKDB to Check the Integrity Check in SQL DB

Database integrity refers to the accuracy, consistency, and reliability of the data stored within a database. It ensures that data remains uncorrupted, and adheres to defined rules. In SQL databases, integrity is supported through constraints like primary keys, foreign keys, unique constraints, and check constraints, alongside physical and logical data …

Logback.xml File Configuration Example

This short Logback tutorial lists examples for configuring logback.xml to log messages to both the console and/or file appenders. 1. Logback Dependencies To include Logback, include the latest version of logback-classic dependency, which transitively includes all the necessary dependencies, including SLF4J. Spring Boot comes with SLF4J and Logback as the …

[Solved] CommandAcceptanceException: Error executing DDL

1. Problem When writing tests that depend on H2 database in a Spring boot application, we may encounter the CommandAcceptanceException: Error executing DDL. The root cause exception will be org.h2.jdbc.JdbcSQLSyntaxErrorException in the logs. The exception stack trace will look something like this: If you are trying to run unit tests …

Log4j2 YAML File Example

Learn to configure log4j2.yaml file to output the log statements to the console, rolling files, etc. Also, learn to configure log4j2 appenders, levels, and patterns.

Spring Boot WebClient GET Example

Learn to make HTTP GET requests (sync and async) using Spring Boot WebClient, pass URI and query params, handle responses, and handle errors.

Spring Boot JpaRepository Example

Learn to Spring Data JPA module and work with JpaRepository interface for performing the CRUD operations in underlying databases in a Spring Boot application.

NoSuchFieldError: JCTree$JCImport qualid (Lombok Fix)

The build error NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field ‘qualid’ means an old Lombok (1.18.28 or older) is compiling on JDK 21 or newer. Upgrade Lombok to 1.18.48 in Maven, Gradle or the IDE and rebuild.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.