mirror of https://github.com/apache/cloudstack.git
Fixed problem with serializer
This commit is contained in:
parent
59c211fca7
commit
1f3d123866
|
|
@ -55,6 +55,7 @@ public class JobSerializerHelper {
|
|||
gsonBuilder.setVersion(1.5);
|
||||
s_logger.debug("Job GSON Builder initialized.");
|
||||
gsonBuilder.registerTypeAdapter(Class.class, new ClassTypeAdapter());
|
||||
gsonBuilder.registerTypeAdapter(Throwable.class, new ThrowableTypeAdapter());
|
||||
s_gson = gsonBuilder.create();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch
|
|||
_asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_SUCCEEDED, 0, null);
|
||||
} catch(Throwable e) {
|
||||
s_logger.error("Unable to complete " + job, e);
|
||||
_asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_FAILED, 0, e);
|
||||
_asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_FAILED, 0, e.getMessage());
|
||||
} finally {
|
||||
CallContext.unregister();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue