replace deprecated JavaConversions methods

JavaConversions.{asMap, asSet, asBuffer} are deprecated since 2.8.1,
and thus have been removed in 2.10.
fix exception catching warnings