Examples of ServiceException


Examples of org.jmanage.core.services.ServiceException

            if(t != null){
                if(t instanceof ServiceException || t instanceof UnAuthorizedAccessException){
                    return new InvocationResult(t);
                }else if(t instanceof ConnectionFailedException){
                    return new InvocationResult(
                            new ServiceException(ErrorCodes.CONNECTION_FAILED));
                }
            }
            logger.log(Level.SEVERE, "Error while invoking: " +
                    invocation.getClassName() +"->"+ invocation.getMethodName(),
                    e);

Examples of org.jpokemon.server.ServiceException

    try {
      pokemonIndex = request.getInt("pokemon");
    }
    catch (JSONException e) {
      throw new ServiceException("Pokemon index not provided");
    }

    try {
      pokemon = player.party().get(pokemonIndex);
    }
    catch (IllegalArgumentException e) {
      throw new ServiceException("Pokemon index " + pokemonIndex + " not found");
    }

    return pokemon;
  }

Examples of org.jresponder.service.ServiceException

    try {
      Object ret = JSONValue.parseWithException(aParamJson);
      params = ((Map<String,Object>)ret);
    }
    catch (Exception e) {
      throw new ServiceException(ServiceExceptionType.INVALID_PARAMS, e);
    }

  }

Examples of org.mule.api.registry.ServiceException

            String scheme = getFullScheme();
            TransportServiceDescriptor sd;
            sd = (TransportServiceDescriptor) muleContext.getRegistry().lookupServiceDescriptor(ServiceType.TRANSPORT, scheme, null);
            if (sd == null)
            {
                throw new ServiceException(CoreMessages.noServiceTransportDescriptor(scheme));
            }
            EndpointURIBuilder builder = sd.createEndpointURIBuilder();
            EndpointURI built = builder.build(this.uri, muleContext);
            initialise(built);
        }

Examples of org.onebusaway.exceptions.ServiceException

  @Override
  public Object invoke(FederatedServiceCollection collection, Method method,
      Object[] args) throws ServiceException, IllegalArgumentException,
      IllegalAccessException, InvocationTargetException {
    if (args.length == 0) {
      throw new ServiceException("unexpected number of arguments");
    }
    SituationQueryBean query = (SituationQueryBean) args[0];
    Set<String> agencyIds = new HashSet<String>();
    if (query.getAffects() != null) {
      for (SituationQueryBean.AffectsBean affects : query.getAffects()) {

Examples of org.osgi.framework.ServiceException

            for (Object o = m_lockedRegsMap.get(reg); (o != null); o = m_lockedRegsMap.get(reg))
            {
                // We don't allow cycles when we call out to the service factory.
                if (o.equals(Thread.currentThread()))
                {
                    throw new ServiceException(
                        "ServiceFactory.getService() resulted in a cycle.",
                        ServiceException.FACTORY_ERROR,
                        null);
                }

Examples of org.osgi.framework.ServiceException

                {
                    throw (ServiceException) ex.getException();
                }
                else
                {
                    throw new ServiceException(
                        "Service factory exception: " + ex.getException().getMessage(),
                        ServiceException.FACTORY_EXCEPTION, ex.getException());
                }
            }
            return svcObj;

Examples of org.osgi.framework.ServiceException

        {
            svcObj = m_factory.getService(bundle, this);
        }
        catch (Throwable th)
        {
            throw new ServiceException(
                "Service factory exception: " + th.getMessage(),
                ServiceException.FACTORY_EXCEPTION, th);
        }
        if (svcObj != null)
        {
            for (int i = 0; i < m_classes.length; i++)
            {
                Class clazz = Util.loadClassUsingClass(
                    svcObj.getClass(), m_classes[i], Felix.m_secureAction);
                if ((clazz == null) || !clazz.isAssignableFrom(svcObj.getClass()))
                {
                    if (clazz == null)
                    {
                        throw new ServiceException(
                            "Service cannot be cast due to missing class: " + m_classes[i],
                            ServiceException.FACTORY_ERROR);
                    }
                    else
                    {
                        throw new ServiceException(
                            "Service cannot be cast: " + m_classes[i],
                            ServiceException.FACTORY_ERROR);
                    }
                }
            }
        }
        else
        {
            throw new ServiceException(
                "Service factory returned null.", ServiceException.FACTORY_ERROR);
        }
        return svcObj;
    }

Examples of org.osgi.framework.ServiceException

        HttpService httpService = getHttpService();
        try {
            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(), null);
            LOG.info("Successfully registered CXF DOSGi servlet at " + contextRoot);
        } catch (Exception e) {
            throw new ServiceException("CXF DOSGi: problem registering CXF HTTP Servlet", e);
        }       
        Bus bus = cxf.getBus();
       
        String address = constructAddress(dswContext, contextRoot);
        ServerFactoryBean factory = createServerFactoryBean();

Examples of org.osgi.framework.ServiceException

            Object svc = bundleContext.getService(sr);
            if (svc instanceof HttpService) {
                return (HttpService) svc;
            }
        }
        throw new ServiceException("CXF DOSGi: No HTTP Service could be found to publish CXF endpoint in.");
    }
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.