Package java.rmi

Examples of java.rmi.UnmarshalException


                activator.activate(this, force);
            return mobj.get();
        } catch (RemoteException e) {
            throw e;
        } catch (IOException e) {
            throw new UnmarshalException("activation failed", e);
        } catch (ClassNotFoundException e) {
            throw new UnmarshalException("activation failed", e);
        }

    }
View Full Code Here


                            Thread.currentThread().getContextClassLoader();
                        Thread.currentThread().setContextClassLoader(cl);
                        try {
          return wrappedClass.cast(mo.get());
      } catch (ClassNotFoundException cnfe) {
          throw new UnmarshalException(cnfe.toString(), cnfe);
                        } finally {
                            Thread.currentThread().setContextClassLoader(old);
                        }
                    }
                });
        } catch (PrivilegedActionException pe) {
            Exception e = extractException(pe);
            if (e instanceof IOException) {
                throw (IOException) e;
            }
            if (e instanceof ClassNotFoundException) {
    throw new UnmarshalException(e.toString(), e);
            }
      logger.warning("unwrap", "Failed to unmarshall object: " + e);
      logger.debug("unwrap", e);
        }
        return null;
View Full Code Here

            Exception e = extractException(pe);
            if (e instanceof IOException) {
                throw (IOException) e;
            }
            if (e instanceof ClassNotFoundException) {
                throw new UnmarshalException(e.toString(), e);
            }
      logger.warning("unwrap", "Failed to unmarshall object: " + e);
      logger.debug("unwrap", e);
        }
        return null;
View Full Code Here

    } // never reached
      }

      // specially treating for an UnmarshalException
      if (org instanceof UnmarshalException) {
    UnmarshalException ume = (UnmarshalException)org;
   
    if (ume.detail instanceof ClassNotFoundException)
        throw (ClassNotFoundException) ume.detail;
   
    /* In Sun's RMI implementation, if a method return
View Full Code Here

        ObjectInputStream in = null;
        try {
            in = new ObjectInputStream(_in);
            response = Response.read(in, request.getMethod());
        } catch (ClassNotFoundException exception) {
            throw new UnmarshalException("Failed to unmarshal response",
                                         exception);
        } catch (IOException exception) {
            throw new UnmarshalException("Failed to unmarshal response",
                                         exception);
        } finally {
            try {
                if (in != null) {
                    in.close();
View Full Code Here

                ( (container != null ) ?
                  "for ejb " + container.getEjbDescriptor().getName() :
                  "" );
      //issue 2422 -- UnmarshalException.initCause always
            //throws IllegalStateException.  Need to use 2-arg ctor.
            inv.exception = new UnmarshalException(errorMsg, e);
        }
       
        if( inv.exception != null ) {
            logger.log(Level.WARNING, "preEjbHandlerError", inv.exception);
            wsUtil.throwSOAPFaultException(inv.exception.getMessage(),
View Full Code Here

            if( webServiceMethodInPreHandler != null ) {
                Method postHandlerMethod =
                    wsUtil.getInvMethod(inv.getWebServiceTie(), context);
           
                if( !webServiceMethodInPreHandler.equals(postHandlerMethod) ) {
                    throw new UnmarshalException
                        ("Original method " + webServiceMethodInPreHandler
                         + " does not match post-handler method " +
                         postHandlerMethod);
                }
            }
View Full Code Here

    } catch(Exception e) {
        String errorMsg = localStrings.getLocalString
      ( "enterprise.webservice.errorUnMarshalMethod",
        "Error unmarshalling method for ejb {0}",
        new Object[] { ejbName() });
        ie = new UnmarshalException(errorMsg);
        ie.initCause(e);
    }
   
    if ( ie != null ) {
        inv.exception = ie;
View Full Code Here

                // the message context in any way that would impact which
                // method is invoked.
                Method postHandlerMethod = wsUtil.getInvMethod(
                        (com.sun.xml.rpc.spi.runtime.Tie)inv.getWebServiceTie(), context);
                if( !webServiceMethodInPreHandler.equals(postHandlerMethod) ) {
                    throw new UnmarshalException("Original method " + webServiceMethodInPreHandler +
                            " does not match post-handler method ");
                }
            }
        } catch(Exception e) {
            logger.log(Level.WARNING, LogUtils.POST_WEBHANDLER_ERROR, e.toString());
View Full Code Here

                // the message context in any way that would impact which
                // method is invoked.
                Method postHandlerMethod = wsUtil.getInvMethod(
                        (com.sun.xml.rpc.spi.runtime.Tie)inv.getWebServiceTie(), context);
                if( !webServiceMethodInPreHandler.equals(postHandlerMethod) ) {
                    throw new UnmarshalException("Original method " + webServiceMethodInPreHandler +
                         " does not match post-handler method ");
                }
            }
        } catch(Exception e) {
            wsUtil.throwSOAPFaultException(e.getMessage(),
View Full Code Here

TOP

Related Classes of java.rmi.UnmarshalException

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.