geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r718300 - /geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
Date Mon, 17 Nov 2008 17:56:50 GMT
Author: dwoods
Date: Mon Nov 17 09:56:50 2008
New Revision: 718300

URL: http://svn.apache.org/viewvc?rev=718300&view=rev
Log:
GERONIMO-4413 Improve usability of client.bat/sh.  Thanks to Rex Wang for the patch.

Modified:
    geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java?rev=718300&r1=718299&r2=718300&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
Mon Nov 17 09:56:50 2008
@@ -23,6 +23,8 @@
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.config.LifecycleException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
@@ -63,7 +65,11 @@
             return startClient(configuration, parser.getApplicationClientArgs());
         } catch (Exception e) {
             ExceptionUtil.trimStackTrace(e);
-            log.error("Client failed with exception: ", e);
+            if (e instanceof LifecycleException && ((LifecycleException)e).getCause()
instanceof NoSuchConfigException) {
+                log.error("The client is not found in server: " + ((NoSuchConfigException)((LifecycleException)e).getCause()).getConfigId());
+            } else {
+                log.error("Client failed with exception: ", e);
+            }
             return 2;
         }
     }



Mime
View raw message