use of java.io.InvalidClassException in project adempiere by adempiere.
the class ServerProcessCtl method startDBProcess.
// startProcess
/**************************************************************************
* Start Database Process
* @param ProcedureName PL/SQL procedure name
* @return true if success
*/
protected boolean startDBProcess(String ProcedureName) {
// execute on this thread/connection
log.fine(ProcedureName + "(" + processInfo.getAD_PInstance_ID() + ")");
boolean started = false;
String trxName = trx != null ? trx.getTrxName() : null;
if (isServerProcess) {
Server server = CConnection.get().getServer();
try {
if (server != null) {
// See ServerBean
processInfo = server.dbProcess(processInfo, ProcedureName);
log.finest("server => " + processInfo);
started = true;
}
} catch (UndeclaredThrowableException ex) {
Throwable cause = ex.getCause();
if (cause != null) {
if (cause instanceof InvalidClassException)
log.log(Level.SEVERE, "Version Server <> Client: " + cause.toString() + " - " + processInfo, ex);
else
log.log(Level.SEVERE, "AppsServer error(1b): " + cause.toString() + " - " + processInfo, ex);
} else {
log.log(Level.SEVERE, " AppsServer error(1) - " + processInfo, ex);
cause = ex;
}
processInfo.setSummary(Msg.getMsg(Env.getCtx(), "ProcessRunError") + " " + cause.getLocalizedMessage());
processInfo.setError(true);
return false;
} catch (Exception ex) {
Throwable cause = ex.getCause();
if (cause == null)
cause = ex;
log.log(Level.SEVERE, "AppsServer error - " + processInfo, cause);
processInfo.setSummary(Msg.getMsg(Env.getCtx(), "ProcessRunError") + " " + cause.getLocalizedMessage());
processInfo.setError(true);
return false;
}
}
//try locally
if (!started) {
if (processInfo.isManagedTransaction())
return ProcessUtil.startDatabaseProcedure(processInfo, ProcedureName, trx);
else
return ProcessUtil.startDatabaseProcedure(processInfo, ProcedureName, trx, processInfo.isManagedTransaction());
}
return true;
}
Aggregations