Package java.rmi

Examples of java.rmi.StubNotFoundException


       * off the stream. */
      Object name = objIn.readObject ();
      Object stub = objIn.readObject ();
    }
    catch (ClassNotFoundException e) {
      this.processException (out, new StubNotFoundException ("Unable to find stub class", e));
      log.throwing ("com.sun.grid.jgrid.proxy.ComputeProxy", "processBindCall", e);
     
      return;
    }
   
View Full Code Here


       * off the stream. */
      Object name = objIn.readObject ();
      Object stub = objIn.readObject ();
    }
    catch (ClassNotFoundException e) {
      this.processException (out, new StubNotFoundException ("Unable to find stub class", e));
      log.throwing ("com.sun.grid.jgrid.ComputeEngine", "processRebindCall", e);
      return;
    }
   
    this.processException (out, new AccessException ("Rebind operation not permitted on this server"));
View Full Code Here

                            remoteClass.getName()));
                }
                isProxyStub = true;
            } catch (Exception ex) {
                // rmi.62=Unable to create dynamic proxy stub class
                throw new StubNotFoundException(Messages.getString("rmi.62"), ex); //$NON-NLS-1$
            }
        }

        try {
View Full Code Here

                return Class.forName(stubName);
            }
        } catch (ClassNotFoundException cnfe) {
            if (throwException) {
                // rmi.68=Stub {0} not found.
                throw new StubNotFoundException(Messages.getString("rmi.68", stubName), cnfe); //$NON-NLS-1$
            }
        }
        return null;
    }
View Full Code Here

            });
            return stub;

        } catch (Exception ex) {
            // rmi.68=Stub {0} not found.
            throw new StubNotFoundException(Messages.getString("rmi.68", stubName), //$NON-NLS-1$ //$NON-NLS-2$
                    ex);
        }
    }
View Full Code Here

        String proxyName = clazz.getName() + "__Proxy";
        Class proxyClass = null;
        try {
            proxyClass = _loader.loadClass(proxyName);
            if (!Proxy.class.isAssignableFrom(proxyClass)) {
                throw new StubNotFoundException(proxyName);
            }
        } catch (ClassNotFoundException exception) {
            Class superClass = clazz.getSuperclass();
            if (superClass != null && !superClass.isInterface()) {
                proxyClass = getProxyClass(superClass);
            } else {
                throw new StubNotFoundException(proxyName);
            }
        }
        return proxyClass;
    }
View Full Code Here

        Class remoteClass;

        try {
            remoteClass = getRemoteClass(implClass);
        } catch (ClassNotFoundException ex ) {
            throw new StubNotFoundException(
                "object does not implement a remote interface: " +
                implClass.getName());
        }

        if (forceStubUse ||
            !(ignoreStubClasses || !stubClassExists(remoteClass)))
        {
            return createStub(remoteClass, clientRef);
        }

        ClassLoader loader = implClass.getClassLoader();
        Class[] interfaces = getRemoteInterfaces(implClass);
        InvocationHandler handler =
            new RemoteObjectInvocationHandler(clientRef);

        /* REMIND: private remote interfaces? */

        try {
            return (Remote) Proxy.newProxyInstance(loader,
                                                   interfaces,
                                                   handler);
        } catch (IllegalArgumentException e) {
            throw new StubNotFoundException("unable to create proxy", e);
        }
    }
View Full Code Here

                Class.forName(stubname, false, remoteClass.getClassLoader());
            Constructor cons = stubcl.getConstructor(stubConsParamTypes);
            return (RemoteStub) cons.newInstance(new Object[] { ref });

        } catch (ClassNotFoundException e) {
            throw new StubNotFoundException(
                "Stub class not found: " + stubname, e);
        } catch (NoSuchMethodException e) {
            throw new StubNotFoundException(
                "Stub class missing constructor: " + stubname, e);
        } catch (InstantiationException e) {
            throw new StubNotFoundException(
                "Can't create instance of stub class: " + stubname, e);
        } catch (IllegalAccessException e) {
            throw new StubNotFoundException(
                "Stub class constructor not public: " + stubname, e);
        } catch (InvocationTargetException e) {
            throw new StubNotFoundException(
                "Exception creating instance of stub class: " + stubname, e);
        } catch (ClassCastException e) {
            throw new StubNotFoundException(
                "Stub class not instance of RemoteStub: " + stubname, e);
        }
    }
View Full Code Here

                            remoteClass.getName()));
                }
                isProxyStub = true;
            } catch (Exception ex) {
                // rmi.62=Unable to create dynamic proxy stub class
                throw new StubNotFoundException(Messages.getString("rmi.62"), ex); //$NON-NLS-1$
            }
        }

        try {
View Full Code Here

                return Class.forName(stubName);
            }
        } catch (ClassNotFoundException cnfe) {
            if (throwException) {
                // rmi.68=Stub {0} not found.
                throw new StubNotFoundException(Messages.getString("rmi.68", stubName), cnfe); //$NON-NLS-1$
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of java.rmi.StubNotFoundException

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.