Package javax.naming

Examples of javax.naming.NoPermissionException


                Attributes attrs = createAttributesFromRecords(records);

                result = DirectoryManager.getObjectInstance(resolvedCtx, name,
                        this, environment, attrs);
            } catch (SecurityException e) {
                NoPermissionException e2 = new NoPermissionException(e
                        .getMessage());

                e2.setRootCause(e);
                throw e2;
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException(e.getMessage());
View Full Code Here


                throw (ConfigurationException) new ConfigurationException(
                        Messages.getString("jndi.79")) //$NON-NLS-1$
                        .initCause(e);
            } catch (IllegalAccessException e) {
                // jndi.79=RMI Client Socket Factory cannot be instantiated
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.79")) //$NON-NLS-1$
                        .initCause(e);
            }
        }
        registry = getRegistry(host, port, csf);
View Full Code Here

     *
     * @return Generated {@link NamingException} exception.
     */
    @SuppressWarnings("deprecation")
    protected NamingException newNamingException(Throwable e) {
        NamingException ret = (e instanceof AccessException) ? new NoPermissionException()
                : (e instanceof ConnectException) ? new ServiceUnavailableException()
                        : (e instanceof ConnectIOException)
                                || (e instanceof ExportException)
                                || (e instanceof MarshalException)
                                || (e instanceof UnmarshalException) ? new CommunicationException()
View Full Code Here

        if (!(System.getSecurityManager() instanceof RMISecurityManager)) {
            try {
                System.setSecurityManager(new RMISecurityManager());
            } catch (SecurityException e) {
                // jndi.84=Cannot install RMISecurityManager
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.84")).initCause(e); //$NON-NLS-1$
            }
        }
    }
View Full Code Here

                throw (ConfigurationException) new ConfigurationException(
                        Messages.getString("jndi.79")) //$NON-NLS-1$
                        .initCause(e);
            } catch (IllegalAccessException e) {
                // jndi.79=RMI Client Socket Factory cannot be instantiated
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.79")) //$NON-NLS-1$
                        .initCause(e);
            }
        }
        registry = getRegistry(host, port, csf);
View Full Code Here

     *
     * @return Generated {@link NamingException} exception.
     */
    @SuppressWarnings("deprecation")
    protected NamingException newNamingException(Throwable e) {
        NamingException ret = (e instanceof AccessException) ? new NoPermissionException()
                : (e instanceof ConnectException) ? new ServiceUnavailableException()
                        : (e instanceof ConnectIOException)
                                || (e instanceof ExportException)
                                || (e instanceof MarshalException)
                                || (e instanceof UnmarshalException) ? new CommunicationException()
View Full Code Here

        if (!(System.getSecurityManager() instanceof RMISecurityManager)) {
            try {
                System.setSecurityManager(new RMISecurityManager());
            } catch (SecurityException e) {
                // jndi.84=Cannot install RMISecurityManager
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.84")).initCause(e); //$NON-NLS-1$
            }
        }
    }
View Full Code Here

                Enumeration<ResourceRecord> records = resolver.lookup(
                        nameToLookFor.toString(), types, classes);

                attrs = createAttributesFromRecords(records);
            } catch (SecurityException e) {
                NoPermissionException e2 = new NoPermissionException();

                e2.setRootCause(e);
                throw e2;
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException();
View Full Code Here

                Attributes attrs = createAttributesFromRecords(records);

                result = DirectoryManager.getObjectInstance(resolvedCtx, name,
                        this, environment, attrs);
            } catch (SecurityException e) {
                NoPermissionException e2 = new NoPermissionException(e
                        .getMessage());

                e2.setRootCause(e);
                throw e2;
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException(e.getMessage());
View Full Code Here

        {
            ne = new NamingException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapNoPermissionException )
        {
            ne = new NoPermissionException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapNoSuchAttributeException )
        {
            ne = new NoSuchAttributeException( t.getLocalizedMessage() );
        }
View Full Code Here

TOP

Related Classes of javax.naming.NoPermissionException

Copyright © 2018 www.massapicom. 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.