Fixed JERSEY-663: ClassCastException propagated.

Change-Id: Icfda56a595518634252431702773a95b5b2de202
Signed-off-by: Marek Potociar <marek.potociar@oracle.com>
Merge "Fixed JERSEY-663: ClassCastException propagated."