Fix scalatra and spark tests (see #941)