Your all Args Lombok Annotation likely creates a constructor that accepts a Collection as last argument, while CriteriaApi expects 2 Strings. If you remove the annotation and use a manual Constructor that accepts variable args String... categories then it should work