Category Archives: Programming

#Docker #Jboss dies with java.lang.OutOfMemoryError: Metaspace after several redeploys

There is an annoying issue with a Jboss EAP 7 Docker container I am using. After 3 deploys of my ear package I hit the “java.lang.OutOfMemoryError: Metaspace” issue. According to RedHat Solution 2038983 this is a known issue caused by: Root Cause The Metaspace is being exhausted. Either it is undersized, or there is a… Read More »


Debug tools for enterprise environments

There are various tools that I use to spot issues and investigate an enterprise environment. One of my favourite tools is IBM Performance Analysis Suite. Capabilities described by IBM: Import all kinds of performance data for analysis. Some examples: DB2 snapshot, Java verbose GC output, Java thread dumps. Import software/middle-ware configuration for compliance checking. Some… Read More »

Hibernate: Optimize updates with @DynamicUpdate

When using Hibernate as a layer between your Java code and the Database layer you release control on how the actual SQL query is generated. Hibernate will generate from the HSQL you write the “best” query. That “best” is in fact sometimes sub-optimal. A very important Hibernate 4 (make sure you have at least 4.2.5)… Read More »

Hibernate: Avoiding a “fake” exception: javax.persistence.TransactionRequiredException: Executing an update/delete query

I encountered some weird issue caused by the way Hibernate works. The exception messages returned by Hibernate are confusing as they are just a side-effect of the real issue. The code in question was something like that: In a manager bean we have the following: @Stateless(name = “ObjectManagerBean”, mappedName = “ObjectManagerBean/remote”) public class ObjectManagerBean …… Read More »

DB2: SQL Error: -803, SQLState: 23505, Unique Constraint Violation

Yet another thread of DB2 errors from an EJB application that connects to a DB2 instance. The reported thread of errors:

We get several DB2 error codes there that may make it more clear. Let me take you through them : 1. SQL Error: -4229, SQLState: null Translated: “Batch failure. The batch was submitted,… Read More »

DB2: SQL Error: -803, SQLState: 23505 due to NON-UTF8 character in parameter

Sometimes Java and databases do not use the same standards to represent data. This can lead to strange exceptions for which sometimes can be hard to pin point the cause. We have the following Exception reported in the enterprise application log. Let’s analyse the errors.

STEP 1 SQL Error: -302, SQLState: 22001 The value… Read More »

CVS: Add a missing tag by date for a CVS project release

Sometimes you discover that you forgot to tag on CVS a test release that made it on the production system. The issue starts when you discovered that in the mean time you or someone else already added new functionality on the development branch. In the following I will create a tag only based on the… Read More »