Examples of ApplicationException


Examples of com.github.hakko.musiccabinet.exception.ApplicationException

    initialDataSource.setPassword(password);
    try {
      dataSource.softResetDefaultUser();
      initialDataSource.softResetDefaultUser();
    } catch (SQLException e) {
      throw new ApplicationException("Password update failed!", e);
    }
    try {
      initialJdbcTemplate.execute("select 1");
    } catch (DataAccessException e) {
      throw new ApplicationException("Password update failed!", e);
    }
  }
View Full Code Here

Examples of com.google.apphosting.api.ApiProxy.ApplicationException

      checkVersion(version, module);
      checkNotDynamicModule(module);
    }
    String hostAndPort = module.getHostAndPort(instance);
    if (hostAndPort == null) {
      throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_INSTANCES_VALUE,
          "Instance " + instance + " not found");
    }
    return hostAndPort;
  }
View Full Code Here

Examples of com.google.code.lightssh.common.ApplicationException

    }else{
      type = schedulerTypeManager.get(jobType);
    }
   
    if( type == null )
      throw new ApplicationException("工作任务类型["+jobType+"]不存在!");
   
    List<JobQueue> queues = new ArrayList<JobQueue>();
    for(String refId:refIds ){
      JobQueue exists = getDao().get(jobType,refId);
      if( exists != null ){
View Full Code Here

Examples of com.imaginea.mongodb.exceptions.ApplicationException

            throw new DatabaseException(ErrorCodes.PASSWORD_IS_EMPTY, "Password is empty");
        }
        try {
            mongoInstance.getDB(dbName).addUser(username, password.toCharArray(), readOnly);
        } catch (MongoException e) {
            throw new ApplicationException(ErrorCodes.USER_CREATION_EXCEPTION, e.getMessage());
        }
        return "User: " + username + " has been added to the DB: " + dbName;
    }
View Full Code Here

Examples of com.youtube.vitess.gorpc.Exceptions.ApplicationException

    }
    if (response.getSeq().compareTo(seq) != 0) {
      throw new GoRpcException("sequence number mismatch");
    }
    if (response.getError() != null) {
      throw new ApplicationException(response.getError());
    }
    return response;
  }
View Full Code Here

Examples of de.willuhn.util.ApplicationException

      return;
    }
    catch (Exception e)
    {
      Logger.error("unable to notify user",e);
      throw new ApplicationException(i18n.tr("Datenbank-Import fehlgeschlagen"));
    }
   
    FileDialog fd = new FileDialog(GUI.getShell(),SWT.OPEN);
    fd.setFileName("hibiscus-backup-" + BackupCreate.DATEFORMAT.format(new Date()) + ".xml");
    fd.setFilterExtensions(new String[]{"*.xml"});
    fd.setText("Bitte w�hlen Sie die Backup-Datei aus");
    String f = fd.open();
    if (f == null || f.length() == 0)
      return;
   
    final File file = new File(f);
    if (!file.exists())
      return;

    Application.getController().start(new BackgroundTask() {
      private boolean cancel = false;
   
      /**
       * @see de.willuhn.jameica.system.BackgroundTask#run(de.willuhn.util.ProgressMonitor)
       */
      public void run(ProgressMonitor monitor) throws ApplicationException
      {
        monitor.setStatusText(i18n.tr("Importiere Backup"));
        Logger.info("importing backup " + file.getAbsolutePath());
        final ClassLoader loader = Application.getPluginLoader().getManifest(HBCI.class).getClassLoader();

        Reader reader = null;
        try
        {
          InputStream is = new BufferedInputStream(new FileInputStream(file));
          reader = new XmlReader(is,new ObjectFactory() {
         
            public GenericObject create(String type, String id, Map values) throws Exception
            {
              AbstractDBObject object = (AbstractDBObject) Settings.getDBService().createObject(loader.loadClass(type),null);
              object.setID(id);
              Iterator i = values.keySet().iterator();
              while (i.hasNext())
              {
                String name = (String) i.next();
                object.setAttribute(name,values.get(name));
              }
              return object;
            }
         
          });
         
          long count = 1;
          GenericObject o = null;
          while ((o = reader.read()) != null)
          {
            try
            {
              ((AbstractDBObject)o).insert();
            }
            catch (Exception e)
            {
              if (o instanceof Protokoll)
              {
                // Bei den Protokollen kann das passieren. Denn beim Import der Datei werden vorher
                // die Konten importiert. Und deren Anlage fuehrt auch bereits zur Erstellung von
                // Protokollen, deren IDs dann im Konflikt zu diesen hier stehen.
                Logger.write(Level.DEBUG,"unable to import " + o.getClass().getName() + ":" + o.getID() + ", skipping",e);
              }
              else
              {
                Logger.error("unable to import " + o.getClass().getName() + ":" + o.getID() + ", skipping",e);
                monitor.log("  " + i18n.tr("{0} fehlerhaft ({1}), �berspringe",new String[]{BeanUtil.toString(o),e.getMessage()}));
              }
            }
            if (count++ % 100 == 0)
              monitor.addPercentComplete(1);
          }
         
          monitor.setStatus(ProgressMonitor.STATUS_DONE);
          monitor.setStatusText("Backup importiert");
          monitor.setPercentComplete(100);
        }
        catch (Exception e)
        {
          Logger.error("error while importing data",e);
          throw new ApplicationException(e.getMessage());
        }
        finally
        {
          if (reader != null)
          {
View Full Code Here

Examples of fr.norsys.mapper.console.exception.ApplicationException

      throws ApplicationException {
    Application a = null;
    try {
      a = (Application) BeanUtils.cloneBean(application);
    } catch (Exception e) {
      throw new ApplicationException(
          "Impossible to clone application bean:" + application
              + "=> " + e);
    }
    a.setId(UIDGenerator.generateId());
    applications.add(a);
    try {
      fileService.createNewFile(a.getName() + xmlFileExt, appliDirPath);
    } catch (FileException e1) {
      throw new ApplicationException(e1.toString());
    }
    try {
      mappingService.saveMapping(a, appliDirPath + a.getName()
          + xmlFileExt);
    } catch (MappingException e) {
      throw new ApplicationException(e.toString());
    }
  }
View Full Code Here

Examples of javax.ejb.ApplicationException

            }
        } catch (InvocationTargetException e) {
            Throwable cause = e.getCause();
            RPCException rpcException = new RPCException(cause);
            // ApplicationException ?
            ApplicationException applicationException = getBeanInfo().getApplicationExceptions().get(cause.getClass().getName());
            if (applicationException != null) {
                rpcException.setApplicationException();
            }
            ejbResponse.setRPCException(rpcException);
            if (enabledEvent) {
View Full Code Here

Examples of javax.ejb.ApplicationException

                }
            } catch (InvocationTargetException e) {
                Throwable cause = e.getCause();
                RPCException rpcException = new RPCException(cause);
                // ApplicationException ?
                ApplicationException applicationException = getBeanInfo().getApplicationExceptions().get(
                        cause.getClass().getName());
                if (applicationException != null) {
                    rpcException.setApplicationException();
                }
                ejbResponse.setRPCException(rpcException);
View Full Code Here

Examples of javax.ejb.ApplicationException

     */
    protected ApplicationException getApplicationException(final EasyBeansInvocationContext invocationContext,
            final Exception e) {
        Map<String, ApplicationException> applicationExceptions = invocationContext.getFactory().getBeanInfo()
                .getApplicationExceptions();
        ApplicationException appException = applicationExceptions.get(e.getClass().getName());
        if (appException != null) {
            return appException;
        }
        // If runtime exception, not an application by default
        if (e instanceof RuntimeException) {
View Full Code Here
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.