You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2008/11/17 18:56:50 UTC

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

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;
         }
     }