}
// submit the job
try {
Client client = new Client(nepheleConfig, getClass().getClassLoader());
client.run(job, false);
} catch (Exception ex) {
LOG.error("Error submitting job to the job-manager.", ex);
resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);
// HACK: Is necessary because Message contains whole stack trace
String errorMessage = ex.getMessage().split("\n")[0];