You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2009/07/24 11:15:35 UTC
svn commit: r797379 - in /geronimo/server/branches/2.1:
framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/
plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/
Author: xuhaihong
Date: Fri Jul 24 09:15:32 2009
New Revision: 797379
URL: http://svn.apache.org/viewvc?rev=797379&view=rev
Log:
GERONIMO-3768 deployment failure is not logged in either geronimo.log or deployer.log (Patch from Han Hong Fang)
Modified:
geronimo/server/branches/2.1/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java
geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
Modified: geronimo/server/branches/2.1/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java?rev=797379&r1=797378&r2=797379&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java (original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/DeployTool.java Fri Jul 24 09:15:32 2009
@@ -54,6 +54,8 @@
import org.apache.geronimo.gbean.GBeanInfoBuilder;
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.util.Main;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import jline.ConsoleReader;
@@ -72,6 +74,7 @@
public class DeployTool implements Main {
private static final IdentityHashMap<CommandMetaData, DeployCommand> commands = new IdentityHashMap<CommandMetaData, DeployCommand>();
+ private static final Log log = LogFactory.getLog(DeployTool.class);
static {
commands.put(LoginCommandMetaData.META_DATA, new CommandLogin());
@@ -209,10 +212,7 @@
private void processException(PrintWriter out, Exception e) {
failed = true;
- out.print(DeployUtils.reformat("Error: "+e.getMessage(),4,72));
- if(e.getCause() != null) {
- e.getCause().printStackTrace(out);
- }
+ log.error("Error: ", e);
}
public static final GBeanInfo GBEAN_INFO;
Modified: geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java?rev=797379&r1=797378&r2=797379&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java (original)
+++ geronimo/server/branches/2.1/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java Fri Jul 24 09:15:32 2009
@@ -145,6 +145,7 @@
TargetModuleID[] targets = identifyTargets(moduleFile, planFile, mgr.getAvailableModules(null, all));
if(targets.length == 0) {
addErrorMessage(actionRequest, getLocalizedString(actionRequest, "errorMsg04"), null);
+ log.error(getLocalizedString(actionRequest, "errorMsg04"));
return;
}
progress = mgr.redeploy(targets, moduleFile, planFile);
@@ -174,6 +175,7 @@
abbrStatusMessage = getLocalizedString(actionRequest, "errorMsg02");
fullStatusMessage = progress.getDeploymentStatus().getMessage();
addErrorMessage(actionRequest, abbrStatusMessage, fullStatusMessage);
+ log.error(abbrStatusMessage + "\n" + fullStatusMessage);
}
}
} else {
@@ -182,6 +184,8 @@
// after the first line, which in most cases means the gnarly stacktrace
abbrStatusMessage = getLocalizedString(actionRequest, "errorMsg01");
addErrorMessage(actionRequest, abbrStatusMessage, fullStatusMessage);
+ log.error(abbrStatusMessage + "\n" + fullStatusMessage);
+
// try to provide an upgraded version of the plan
try {
if (planFile != null && planFile.exists()) {