org.postgresql.util.PSQLException: ERROR: cannot cast type bytea to uuid

I was stuck solving this weird exception while working on a Spring Boot and Hibernate application. I verified all the configuration settings, double-checked the API calls and still, I was clueless as to what was actually causing the problem. The only conclusion that I had – The error occurs when there is a null value being sent a placeholder to the query.

Continue reading