Package javax.naming

Examples of javax.naming.NamingException.initCause()


                ServiceReference[] references = null;
                try {
                    references = context.getAllServiceReferences(InitialContextFactory.class.getName(), filter);
                } catch (InvalidSyntaxException e) {
                    NamingException ex = new NamingException("Bad filter: " + filter);
                    ex.initCause(e);
                    throw ex;
                }
                if (references != null) {
                    Context initialContext = null;
                    Arrays.sort(references, Utils.SERVICE_REFERENCE_COMPARATOR);
View Full Code Here


            ServiceReference[] references = null;
            try {
                references = context.getServiceReferences(InitialContextFactory.class.getName(), filter);
            } catch (InvalidSyntaxException e) {
                NamingException ex = new NamingException("Bad filter: " + filter);
                ex.initCause(e);
                throw ex;
            }

            if (references != null && references.length > 0) {
                Context initialContext = null;
View Full Code Here

            Exception cause = e.getException();
            if (cause instanceof NamingException) {
                throw (NamingException) cause;
            } else {
                NamingException ex = new NamingException(cause.getMessage());
                ex.initCause(cause);
                throw ex;
            }
        }
    }
}
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

            return proxyConstructor.newInstance(handler);   
        }catch (Exception x) {
            if (x instanceof NamingException) throw (NamingException)x;
            else {
                NamingException nx = new NamingException(x.getMessage());
                nx.initCause(x);
                throw nx;
            }
        }
    }
   
View Full Code Here

            Exception cause = e.getException();
            if (cause instanceof NamingException) {
                throw (NamingException) cause;
            } else {
                NamingException ex = new NamingException(cause.getMessage());
                ex.initCause(cause);
                throw ex;
            }
        }
    }
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

        try {
            return this.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

        try {
            return (Service)constructor.newInstance(arguments);
        } catch (InvocationTargetException e) {
            NamingException exception = new NamingException("Could not construct service proxy");
            exception.initCause(e.getTargetException());
            throw exception;
        }
    }
}
View Full Code Here

        try {
            entry = treeLookup(name);
        } catch (IOException e) {
            NamingException ex = new NamingException
                (sm.getString("resources.notFound", name));
            ex.initCause(e);
            throw ex;
        }
        if (entry == null)
            throw new NamingException
                (sm.getString("resources.notFound", name));
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.