Debugging Spring REST bad request 400 codes

This happens way too often: you POST or PUT something to a Spring @RestController and Spring only tells you that there is a bad request, HTTP 400 code; no further explanations, no logs, no exceptions. Spring logs the error cause under the category "org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod" so you can enable logging for that in your log4j.properties: log4j.logger.org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod=DEBUG,stdout … Continue reading Debugging Spring REST bad request 400 codes

SSLHandshakeException: unsupported certificate

When: loading client certificates from a custom keystore Reason: multiple certificates for the same domain but different purposes, e.g. one certificate handles email authentication, the other authenticates the user against a web server Solution: either fix the buggy code that selects the wrong certificate from the keystore or make sure only one certificate per domain … Continue reading SSLHandshakeException: unsupported certificate

Heisenbugs with angular.js and Internet Explorer 9 or: missing console.log

I'm developing a proof of concept web application based on angular.js for corporate users, which - as so often in my career - means that they are using Internet Explorer. Several users complained about sporadic failures which were really hard to pin down, but during debugging sessions boiled down to a simple observation: the errors … Continue reading Heisenbugs with angular.js and Internet Explorer 9 or: missing console.log