“ContainerLaunchException: Container startup failed” when running Testcontainers with Gradle

I had this nasty error when running integration tests with Testcontainers for my Java project with Gradle: SEVERE: Caught exception while closing extension context: org.junit.jupiter.engine.descriptor.ClassExtensionContext@669c884 org.testcontainers.containers.ContainerLaunchException: Container startup failed … Caused by: org.testcontainers.containers.ContainerFetchException: Can’t get Docker image: RemoteDockerImage(imageName=, imagePullPolicy=DefaultPullPolicy()) … Caused by: com.github.dockerjava.api.exception.DockerClientException: Error occurred while preparing Docker context folder. … Caused by: java.io.IOException: Der … Read more

Kubernetes not starting on Docker Desktop for Windows

After enabling Kubernetes in Docker Desktop for Windows, it simply wouldn’t come up. I waited about an hour but nothing happened. All needed Docker images etc. were downloaded but then the process stalled. After searching for errors in all the different log files I found a bunch of lines like the following in C:\Users\%USERNAME%\AppData\Roaming\Docker\log\vm\kubelet.log: [026:09:01:30.415][I] … Read more

WFLYCTL0348: TimeoutException while running Keycloak in a Docker container with an external database (MariaDB)

WFLYCTL0348 TimeoutException while running Keycloak in a Docker container with an external database (MariaDB)

I tried to start Keycloak in a Docker container with an external database (MariaDB) as described in the documentation of jboss/keycloak: docker run –rm –name=keycloak \ -e KEYCLOAK_USER=admin \ -e KEYCLOAK_PASSWORD=admin123 \ -e DB_VENDOR=mariadb \ -e DB_ADDR= \ -e DB_PORT=3306 \ -e DB_DATABASE=keycloak \ -e DB_USER=keycloak \ -e DB_PASSWORD=keycloak \ jboss/keycloak Unfortunately, I got this … Read more

How to deploy to JBoss EAP 7 with Gradle, Cargo, and Jenkins

It took me quite a while to get my Java EE 7 application automatically deployed to a target JBoss EAP 7 server from within Jenkins using Gradle as the build tool and Cargo for managing the deployment. So here’s my final solution for you to use! 😉 build.gradle dependencies { classpath ‘com.bmuschko:gradle-cargo-plugin:2.2.3’ } apply plugin: … Read more

Exception-like error handling in Software AG’s Natural

Error handling in Software AG’s Natural can be done in a way that resembles Exception handling in object-oriented languages like Java. throw Instead of throwing an Exception, you raise an error simply by assigning a value to the system variable *ERROR-NR. As soon as a statement like the following is executed, the current program flow … Read more

Automatically reconnect to a database after a failure in JBoss EAP 7

My JBoss EAP 7 server couldn’t cope with a failing database. After a database restart or failure, e.g. due to maintenance, it simply would not connect to the database again automatically. The application simply stopped working as soon as the database was unavailable for a short period of time. JBoss’s server.log was full of (not … Read more

How to find the physical file path of the current FUSER of a Natural runtime

Here’s a short subroutine for reading the physical file path of the current FUSER of a Natural (from Software AG) runtime. I’m not sure if it works on a mainframe, but it definitely runs on a Linux system. The subroutine returns the following information, if it runs successfully: P-FUSER-PATH /home/macke/fuser P-RC 0 Otherwise the return … Read more