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/16 05:00:34 UTC

svn commit: r794500 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Author: xuhaihong
Date: Thu Jul 16 03:00:33 2009
New Revision: 794500

URL: http://svn.apache.org/viewvc?rev=794500&view=rev
Log:
GERONIMO-4230 When installing a plugin that is already existed, we still give people confusing missingDependency message (Patch from Han Hong Fang)

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?rev=794500&r1=794499&r2=794500&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java Thu Jul 16 03:00:33 2009
@@ -18,10 +18,10 @@
 
 import java.io.BufferedOutputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.FileInputStream;
 import java.io.OutputStream;
 import java.net.URI;
 import java.net.URL;
@@ -63,6 +63,7 @@
 import org.apache.geronimo.kernel.InvalidGBeanException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.basic.BasicKernel;
+import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
@@ -71,7 +72,6 @@
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
 import org.apache.geronimo.kernel.config.PersistentConfigurationList;
-import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ArtifactManager;
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
@@ -990,7 +990,7 @@
             // 2. Validate that we can install this
             if (!validatePlugin(data)) {
                 //already installed
-                throw new MissingDependencyException("Already installed", toArtifact(data.getPluginArtifact().get(0).getModuleId()), (Stack<Artifact>)null);
+                throw new ConfigurationAlreadyExistsException("Configuration " + toArtifact(data.getPluginArtifact().get(0).getModuleId()) + " is already installed.");
             }
 
             verifyPrerequisites(data);