The reason for illegal argument was because of the http request we are passing in should be same by receiver class. In one of the case I observed today where the receiver method has javax.servlet HttpRequest while we are passing in PreAuthorized for jakarta httpRequest.