I think there is a bug in ColumnMapping build() on creating the Layout from pattern.
It should also include: .withAlwaysWriteExceptions(false) in there.
Currently if you add logger.error(e.getMessage(), e) somewhere it will try to insert the stack into every database field if patterns is used to create the ColumnMapping's.
This comes from the default behaviour of PatternLayout that in case of an excepiton it tryes to add it in the end of every pattern.
But if you have Multiple columins in your table with JDBCAppender then you probably have other metadata on those fields then the actual exception and you will get an insertion error on most fields because the data is to big.