Package javax.naming

Examples of javax.naming.NamingException.initCause()


                                serviceQname );
                    }
                } catch (Exception e) {
                    NamingException ex = new NamingException
                    ("Could not create service");
                    ex.initCause(e);
                    throw ex;
                }
            } else {
                // Loading service Interface
                try {
View Full Code Here


                try {
                    serviceInterfaceClass = tcl.loadClass(serviceInterface);
                } catch(ClassNotFoundException e) {
                    NamingException ex = new NamingException
                    ("Could not load service Interface");
                    ex.initCause(e);
                    throw ex;
                }
                if (serviceInterfaceClass == null) {
                    throw new NamingException
                    ("Could not load service Interface");
View Full Code Here

                                new Properties() );
                    }
                } catch (Exception e) {
                    NamingException ex = new NamingException
                    ("Could not create service");
                    ex.initCause(e);
                    throw ex;
                }
            }
            if (service == null) {
                throw new NamingException
View Full Code Here

                        portComponentRef.put(endpoint, new QName(port.getName()));
                    }
                } catch (Exception e) {
                    NamingException ex = new NamingException
                    ("Error while reading Wsdl File");
                    ex.initCause(e);
                    throw ex;
                }
            }

            ServiceProxy proxy = new ServiceProxy(service);
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;

        } catch (Exception e) {
            if (e instanceof NamingException) throw (NamingException)e;
            NamingException ne = new NamingException(e.toString());
            ne.initCause(e);
            throw ne;
        } finally {
            if (ctx != null) ctx.close();
        }
    }
View Full Code Here

        try {
            return bundle.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)this.serviceConstructor.newInstance(arguments);
        } catch (InvocationTargetException e) {
            NamingException exception = new NamingException("Could not construct service proxy");
            exception.initCause(e.getTargetException());
            throw exception;
        }
    }
}
View Full Code Here

        ClassLoader loader = getClassLoader();
        try {
            return loader.loadClass(className);
        } catch (ClassNotFoundException e) {
            NamingException ex = new NamingException("Unable to load class " + className);
            ex.initCause(e);
            throw ex;
        }
    }   
       
}
View Full Code Here

     * @param cause the exception cause, or {@code null} for none
     * @return the exception
     */
    public static NamingException namingException(final String message, final Throwable cause) {
        final NamingException exception = new NamingException(message);
        if (cause != null) exception.initCause(cause);
        return exception;
    }

    /**
     * Return a general naming exception with a root cause and a remaining name field.
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.