geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r510248 - in /geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba: CORBABean.java CSSBean.java NameService.java TSSBean.java
Date Wed, 21 Feb 2007 21:46:28 GMT
Author: rickmcguire
Date: Wed Feb 21 13:46:27 2007
New Revision: 510248

URL: http://svn.apache.org/viewvc?view=rev&rev=510248
Log:
GERONIMO-2682 Detect Yoko classes are not endorsed


Modified:
    geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CORBABean.java
    geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CSSBean.java
    geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/NameService.java
    geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/TSSBean.java

Modified: geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CORBABean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CORBABean.java?view=diff&rev=510248&r1=510247&r2=510248
==============================================================================
--- geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CORBABean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CORBABean.java
Wed Feb 21 13:46:27 2007
@@ -26,6 +26,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.InvalidConfigurationException; 
 import org.apache.geronimo.corba.security.config.ConfigAdapter;
 import org.apache.geronimo.corba.security.config.ssl.SSLConfig;
 import org.apache.geronimo.corba.security.config.tss.TSSConfig;
@@ -232,6 +233,9 @@
             // TSSBeans are going to need our rootPOA instance, so resolve this now.
             org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA");
             rootPOA = POAHelper.narrow(obj);
+        } catch (NoSuchMethodError e) {
+            log.error("Incorrect level of org.omg.CORBA classes found.\nLikely cause is an
incorrect java.endorsed.dirs configuration"); 
+            throw new InvalidConfigurationException("CORBA usage requires Yoko CORBA spec
classes in java.endorsed.dirs classpath", e); 
         } finally {
             Thread.currentThread().setContextClassLoader(savedLoader);
         }

Modified: geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CSSBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CSSBean.java?view=diff&rev=510248&r1=510247&r2=510248
==============================================================================
--- geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CSSBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/CSSBean.java
Wed Feb 21 13:46:27 2007
@@ -24,6 +24,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.InvalidConfigurationException; 
 import org.apache.geronimo.corba.security.config.ConfigAdapter;
 import org.apache.geronimo.corba.security.config.css.CSSConfig;
 import org.apache.geronimo.corba.security.config.ssl.SSLConfig;
@@ -158,6 +159,9 @@
             bean = cssORB.string_to_object(beanIOR);
 
             return bean;
+        } catch (NoSuchMethodError e) {
+            log.error("Incorrect level of org.omg.CORBA classes found.\nLikely cause is an
incorrect java.endorsed.dirs configuration"); 
+            throw new InvalidConfigurationException("CORBA usage requires Yoko CORBA spec
classes in java.endorsed.dirs classpath", e); 
         } catch (UserException ue) {
             log.error(description + " - Looking up home", ue);
             throw new RuntimeException(ue);

Modified: geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/NameService.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/NameService.java?view=diff&rev=510248&r1=510247&r2=510248
==============================================================================
--- geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/NameService.java
(original)
+++ geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/NameService.java
Wed Feb 21 13:46:27 2007
@@ -19,6 +19,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.InvalidConfigurationException; 
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 import org.apache.geronimo.corba.security.config.ConfigAdapter;
@@ -159,8 +160,13 @@
      */
     public void doStart() throws Exception {
         if (localServer) {
-            service = config.createNameService(host, port);
-            log.debug("Started transient CORBA name service on port " + port);
+            try {
+                service = config.createNameService(host, port);
+                log.debug("Started transient CORBA name service on port " + port);
+            } catch (NoSuchMethodError e) {
+                log.error("Incorrect level of org.omg.CORBA classes found.\nLikely cause
is an incorrect java.endorsed.dirs configuration"); 
+                throw new InvalidConfigurationException("CORBA usage requires Yoko CORBA
spec classes in java.endorsed.dirs classpath", e); 
+            }
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/TSSBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/TSSBean.java?view=diff&rev=510248&r1=510247&r2=510248
==============================================================================
--- geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/TSSBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/TSSBean.java
Wed Feb 21 13:46:27 2007
@@ -19,6 +19,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.InvalidConfigurationException; 
 import org.omg.CORBA.Any;
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.Policy;
@@ -130,6 +131,9 @@
             // NB:  This is initial context is never used by the TSSBean, but we request
it here
             // to verify that the server ORB is correctly configured and our target server
is accessible.
             initialContext = NamingContextExtHelper.narrow(obj);
+        } catch (NoSuchMethodError e) {
+            log.error("Incorrect level of org.omg.CORBA classes found.\nLikely cause is an
incorrect java.endorsed.dirs configuration"); 
+            throw new InvalidConfigurationException("CORBA usage requires Yoko CORBA spec
classes in java.endorsed.dirs classpath", e); 
         } finally {
             Thread.currentThread().setContextClassLoader(savedLoader);
         }



Mime
View raw message