Package javax.naming

Examples of javax.naming.NamingException.initCause()


                } catch(Throwable t) {
                    if (t instanceof NamingException)
                        throw (NamingException) t;
                    NamingException ex = new NamingException
                        ("Could not create resource factory instance");
                    ex.initCause(t);
                    throw ex;
                }
            }

            if (factory != null) {
View Full Code Here


      return _proxyFactory.create(url);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      NamingException exn = new NamingException(e.toString());
      exn.initCause(e);
      throw exn;
    }
  }
}
View Full Code Here

      return _proxyFactory.create(name);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      NamingException exn = new NamingException(e.toString());
      exn.initCause(e);
      throw exn;
    }
  }

  /**
 
View Full Code Here

            }
        }
        catch (GeneralSecurityException e)
        {
            NamingException ne = new NamingException("security error: unable to initialise JndiSocketFactory");
            ne.initCause(e);
            throw ne;
        }
        catch (IOException e)
        {
            NamingException ne = new NamingException("file access error: unable to initialise JndiSocketFactory");
View Full Code Here

            throw ne;
        }
        catch (IOException e)
        {
            NamingException ne = new NamingException("file access error: unable to initialise JndiSocketFactory");
            ne.initCause(e);
            throw ne;
        }
    }

    /**
 
View Full Code Here

            Class<?> cls = Class.forName("org.jboss.as.naming.InitialContextFactory");
            return (InitialContextFactory) cls.newInstance();
        } catch (Exception e) {
            NamingException ne = new NamingException(
                "Failed to obtain the default initial context factory from JBoss AS.");
            ne.initCause(e);

            throw ne;
        }
    }
View Full Code Here

        } catch (Exception e) {
            NamingException ne = new NamingException("Failed instantiate InitialContextFactory "
                + factoryClassName
                + " from classloader "
                + classLoader);
            ne.initCause(e);

            throw ne;
        }
    }
View Full Code Here

    private Class<?> loadClass(String name) throws NamingException {
        try {
            return classLoader.loadClass(name);
        } catch (ClassNotFoundException e) {
            NamingException exception = new NamingException("Count not load class " + name);
            exception.initCause(e);
            throw exception;
        }
    }

    private URL getWsdlURL() {
View Full Code Here

                : (e instanceof ServerException)
                        ? newNamingException(e.getCause())
                        : new NamingException();

        if (ret.getCause() == null) {
            ret.initCause(e);
        }
        return ret;
    }

    /**
 
View Full Code Here

                is.close();
            }
        } catch (IOException e) {
            NamingException ne = new NamingException
                    (sm.getString("resources.bindFailed", e));
            ne.initCause(e);
            throw ne;
        }

    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.