Examples of ServiceException


Examples of loci.common.services.ServiceException

   */
  public void setXMLDocument(String omexml) throws ParserConfigurationException, SAXException, IOException, DependencyException, ServiceException {
    OMEXMLService svc = new ServiceFactory().getInstance(OMEXMLService.class);
    OMEModelObject root = svc.createOMEXMLRoot(omexml);
    if (! (root instanceof OME))
      throw new ServiceException("Root of XML document wasn't OME");
    this.omexml = (OME)root;
  }

Examples of net.sf.mark.modules.service.ServiceException

          appAuths.add(authDao.findById(authId));
        }
      }
      saveOrUpdate(role);
    } catch (Exception e) {
      throw new ServiceException(e);
    }
  }

Examples of net.sourceforge.ztail.core.services.ServiceException

   
    if (ent.isRegx()) {
      try {
        rs = compileRegexSearch(ent);
      } catch (PatternSyntaxException e) {
        throw new ServiceException(e);
      }
    } else if (ent.isCaseSensitive()) {
      rs = compileCaseSensitiveSearch(ent);
    } else {
      rs = compileRegularSearch(ent);

Examples of org.apache.activeio.xnet.ServiceException

                } else {
                    ipAddressMasksList.add(new ExactIPv6AddressPermission(localIps[i].getAddress()));
                }
            }
        } catch (UnknownHostException e) {
            throw new ServiceException("Could not get localhost inet address", e);
        }

        String ipString = props.getProperty("only_from");
        if (ipString != null) {
            StringTokenizer st = new StringTokenizer(ipString, " ");

Examples of org.apache.airavata.core.gfac.exception.ServiceException

                this.scheduler = (Scheduler) spiClass.newInstance();

                log.debug("Scheduler:" + className + " is loaded");

            } catch (ClassNotFoundException ex) {
                throw new ServiceException("Scheduler " + className + " not found", ex);
            } catch (Exception ex) {
                throw new ServiceException("Scheduler " + className + " could not be instantiated: " + ex, ex);
            }
        }
        return this.scheduler;
    }

Examples of org.apache.avalon.framework.service.ServiceException

                {
                    proxy.setType( InstrumentManagerClient.INSTRUMENT_TYPE_VALUE );
                }
                else
                {
                    throw new ServiceException( fullInstrumentName, "Encountered an unknown "
                        + "Instrument type for the Instrument with key, "
                        + fullInstrumentName + ": " + instrument.getClass().getName() );
                }

                // Mark the instrument proxy as registered.
                proxy.setRegistered();
               
                // Store a reference to the proxy in the Instrument.
                ( (AbstractInstrument)instrument ).setInstrumentProxy( proxy );

                instrumentableProxy.addInstrumentProxy( proxy );
            }
            else
            {
                // Register the existing proxy with the Instrument.  Make sure that the
                //  type didn't change on us.
                if( instrument instanceof CounterInstrument )
                {
                    switch( proxy.getType() )
                    {
                        case InstrumentManagerClient.INSTRUMENT_TYPE_COUNTER:
                            // Type is the same.
                            // Store a reference to the proxy in the Instrument.
                            ( (AbstractInstrument)instrument ).setInstrumentProxy( proxy );
                            break;

                        case InstrumentManagerClient.INSTRUMENT_TYPE_NONE:
                            // Not yet set.  Created in configuration.
                            proxy.setType( InstrumentManagerClient.INSTRUMENT_TYPE_COUNTER );

                            // Store a reference to the proxy in the Instrument.
                            ( (AbstractInstrument)instrument ).setInstrumentProxy( proxy );
                            break;

                        default:
                            throw new ServiceException( instrumentName,
                                "Instruments of more than one type are assigned to name: "
                                + instrumentName );
                    }
                }
                else if( instrument instanceof ValueInstrument )
                {
                    switch( proxy.getType() )
                    {
                        case InstrumentManagerClient.INSTRUMENT_TYPE_VALUE:
                            // Type is the same.
                            // Store a reference to the proxy in the Instrument.
                            ( (AbstractInstrument)instrument ).setInstrumentProxy( proxy );
                            break;

                        case InstrumentManagerClient.INSTRUMENT_TYPE_NONE:
                            // Not yet set.  Created in configuration.
                            proxy.setType( InstrumentManagerClient.INSTRUMENT_TYPE_VALUE );

                            // Store a reference to the proxy in the Instrument.
                            ( (AbstractInstrument)instrument ).setInstrumentProxy( proxy );
                            break;

                        default:
                            throw new ServiceException( instrumentName,
                                "Instruments of more than one type are assigned to name: "
                                + instrumentName );
                    }
                }
                else
                {
                    throw new ServiceException( instrumentName, "Encountered an unknown Instrument "
                        + "type for the Instrument with name, " + instrumentName + ": "
                        + instrument.getClass().getName() );
                }
               
                // Mark the instrument proxy as registered.
                proxy.setRegistered();
            }
        }

        // Loop over the child Instrumentables published by this Instrumentable
        Instrumentable[] children = instrumentable.getChildInstrumentables();
        for ( int i = 0; i < children.length; i++ )
        {
            Instrumentable child = children[i];
           
            // Make sure that the child instrumentable name is set.
            String childName = child.getInstrumentableName();
            if( childName == null )
            {
                String msg = "The getInstrumentableName() method of a child Instrumentable of " +
                    instrumentableName + " returned null.  Child class: " +
                    child.getClass().getName();
                getLogger().debug( msg );
                throw new ServiceException( instrumentable.getClass().getName(), msg );
            }
           
            String fullChildName = instrumentableName + "." + childName;
           
            getLogger().debug( "Registering Child Instrumentable: " + fullChildName );

Examples of org.apache.hadoop.lib.server.ServiceException

    if (security.equals("kerberos")) {
      String defaultName = getServer().getName();
      String keytab = System.getProperty("user.home") + "/" + defaultName + ".keytab";
      keytab = getServiceConfig().get(KERBEROS_KEYTAB, keytab).trim();
      if (keytab.length() == 0) {
        throw new ServiceException(FileSystemAccessException.ERROR.H01, KERBEROS_KEYTAB);
      }
      String principal = defaultName + "/localhost@LOCALHOST";
      principal = getServiceConfig().get(KERBEROS_PRINCIPAL, principal).trim();
      if (principal.length() == 0) {
        throw new ServiceException(FileSystemAccessException.ERROR.H01, KERBEROS_PRINCIPAL);
      }
      Configuration conf = new Configuration();
      conf.set("hadoop.security.authentication", "kerberos");
      UserGroupInformation.setConfiguration(conf);
      try {
        UserGroupInformation.loginUserFromKeytab(principal, keytab);
      } catch (IOException ex) {
        throw new ServiceException(FileSystemAccessException.ERROR.H02, ex.getMessage(), ex);
      }
      LOG.info("Using FileSystemAccess Kerberos authentication, principal [{}] keytab [{}]", principal, keytab);
    } else if (security.equals("simple")) {
      Configuration conf = new Configuration();
      conf.set("hadoop.security.authentication", "simple");
      UserGroupInformation.setConfiguration(conf);
      LOG.info("Using FileSystemAccess simple/pseudo authentication, principal [{}]", System.getProperty("user.name"));
    } else {
      throw new ServiceException(FileSystemAccessException.ERROR.H09, security);
    }

    String hadoopConfDirProp = getServiceConfig().get(HADOOP_CONF_DIR, getServer().getConfigDir());
    File hadoopConfDir = new File(hadoopConfDirProp).getAbsoluteFile();
    if (hadoopConfDir == null) {
      hadoopConfDir = new File(getServer().getConfigDir()).getAbsoluteFile();
    }
    if (!hadoopConfDir.exists()) {
      throw new ServiceException(FileSystemAccessException.ERROR.H10, hadoopConfDir);
    }
    try {
      serviceHadoopConf = loadHadoopConf(hadoopConfDir);
    } catch (IOException ex) {
      throw new ServiceException(FileSystemAccessException.ERROR.H11, ex.toString(), ex);
    }

    LOG.debug("FileSystemAccess FileSystem configuration:");
    for (Map.Entry entry : serviceHadoopConf) {
      LOG.debug("  {} = {}", entry.getKey(), entry.getValue());

Examples of org.apache.hive.service.ServiceException

        serverIPAddress = InetAddress.getByName(hiveHost);
      } else {
        serverIPAddress = InetAddress.getLocalHost();
      }
    } catch (UnknownHostException e) {
      throw new ServiceException(e);
    }
    // HTTP mode
    if (HiveServer2.isHTTPTransportMode(hiveConf)) {
      workerKeepAliveTime =
          hiveConf.getTimeVar(ConfVars.HIVE_SERVER2_THRIFT_HTTP_WORKER_KEEPALIVE_TIME,

Examples of org.apache.lucene.gdata.server.ServiceException

     *      org.apache.lucene.gdata.data.GDataAccount)
     */
    public void createFeed(final ServerBaseFeed feed, final GDataAccount account)
            throws ServiceException {
        if (feed == null)
            throw new ServiceException("Can not create feed -- feed is null",
                    GDataResponse.BAD_REQUEST);
        if (account == null)
            throw new ServiceException(
                    "Can not create feed -- account is null",
                    GDataResponse.UNAUTHORIZED);
        if (feed.getId() == null)
            throw new ServiceException("Feed ID is null can not create feed",
                    GDataResponse.BAD_REQUEST);
        if (account.getName() == null)
            throw new ServiceException(
                    "Account name is null -- can't create feed",
                    GDataResponse.UNAUTHORIZED);
        try {
            feed.setUpdated(getCurrentDateTime());
            feed.setAccount(account);
            this.storage.storeFeed(feed, account.getName());
        } catch (StorageException e) {
            if (LOG.isInfoEnabled())
                LOG.info("Can not save feed -- " + e.getMessage(), e);
            throw new ServiceException("Can not save feed", e,
                    GDataResponse.BAD_REQUEST);
        }

    }

Examples of org.apache.oozie.service.ServiceException

    public void register(Class<? extends ActionExecutor> klass) throws ServiceException {
        XLog log = XLog.getLog(getClass());
        ActionExecutor executor = (ActionExecutor) ReflectionUtils.newInstance(klass, services.getConf());
        if (executors.containsKey(executor.getType())) {
            throw new ServiceException(ErrorCode.E0150, XLog.format(
                    "Action executor for action type [{1}] already registered", executor.getType()));
        }
        ActionExecutor.enableInit();
        executor.initActionType();
        ActionExecutor.disableInit();
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.