Does this error only occur if your custom exception handler is active? You could try to disable your custom exception handling and test if it work in this case.
HttpServletResponse.sendError() will throw an IllegalStateException if the response is already committed. So it seems like some component has written something to the response stream or has already set a response code for the request. If this is the case, PrettyFaces won’t be able to send a 404 response.
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.