geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1341986 - /geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java
Date Wed, 23 May 2012 19:07:38 GMT
Author: gawor
Date: Wed May 23 19:07:37 2012
New Revision: 1341986

URL: http://svn.apache.org/viewvc?rev=1341986&view=rev
Log:
Use the original exception if the gbean bundle is no longer valid

Modified:
    geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java

Modified: geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java?rev=1341986&r1=1341985&r2=1341986&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationGBean.java
Wed May 23 19:07:37 2012
@@ -360,11 +360,18 @@ public class ApplicationGBean implements
             String rootMessage = be.getMessage();
             
             // check for resolver errors
-            ResolverErrorAnalyzer errorAnalyzer = new ResolverErrorAnalyzer(bundle.getBundleContext());
-            String resolverErrors = errorAnalyzer.getErrorsAsString(applicationBundles);
-            if (resolverErrors != null) {
-                rootException = null;
-                rootMessage = resolverErrors;
+            BundleContext bundleContext = bundle.getBundleContext();
+            if (bundleContext != null) {
+                try {
+                    ResolverErrorAnalyzer errorAnalyzer = new ResolverErrorAnalyzer(bundleContext);
+                    String resolverErrors = errorAnalyzer.getErrorsAsString(applicationBundles);
+                    if (resolverErrors != null) {
+                        rootException = null;
+                        rootMessage = resolverErrors;
+                    }
+                } catch (IllegalStateException e) {
+                    // bundle is no loger valid, use the original exception
+                }
             }
 
             String message = MessageFormat.format("Error starting {0} application. {1}",
getApplicationName(), rootMessage);



Mime
View raw message