Examples of DuplicateIdException


Examples of de.scoopgmbh.copper.DuplicateIdException

      workflowPersistencePlugin.onWorkflowsSaved(con, uncheckedWfs);
    }
    catch(SQLException e) {
      // MySQL and DerbyDB throw a SQLIntegrityConstraintViolationException
      if (e instanceof SQLIntegrityConstraintViolationException || (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException)) {
        throw new DuplicateIdException(e);
      }
      // Postgres handling
      if (e.getMessage().contains("cop_workflow_instance_pkey") || (e.getNextException() != null && e.getNextException().getMessage().contains("cop_workflow_instance_pkey"))) {
        throw new DuplicateIdException(e);
      }
      throw e;
    }
    finally {
      JdbcUtils.closeStatement(stmtQueue);
View Full Code Here

Examples of de.scoopgmbh.copper.DuplicateIdException

      List<PersistentWorkflow<?>> uncheckedWfs = (List)wfs;
      workflowPersistencePlugin.onWorkflowsSaved(con, uncheckedWfs);
    }
    catch(SQLException e) {
      if (e.getErrorCode() == 1) {
        throw new DuplicateIdException(e);
      }
      throw e;
    }
    finally {
      JdbcUtils.closeStatement(stmt);
View Full Code Here

Examples of de.scoopgmbh.copper.DuplicateIdException

      if (w.getProcessorPoolId() == null) {
        w.setProcessorPoolId(TransientProcessorPool.DEFAULT_POOL_ID);
      }
      synchronized (workflowMap) {
        if (!newId && workflowMap.containsKey(w.getId()))
          throw new DuplicateIdException("engine already contains a workflow with id '"+w.getId()+"'");
        workflowMap.put(w.getId(), w);
      }
      dependencyInjector.inject(w);
      enqueue(w);
    }
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.collector.DuplicateIDException

    }

    @Override
    public OntologyScope createOntologyScope(String scopeID, OntologyInputSource<?,?>... coreSources) throws DuplicateIDException {

        if (registry.containsScope(scopeID)) throw new DuplicateIDException(scopeID,
                "Scope registry already contains ontology scope with ID " + scopeID);
        OntologyScope scope = new OntologyScopeImpl(scopeID, getNamespace(), spaceFactory, coreSources);
        // scope.addOntologyScopeListener(ONManager.get().getOntologyIndex());
        // TODO : manage scopes with null core ontologies
        fireScopeCreated(scope);
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.servicesapi.collector.DuplicateIDException

    @Override
    public synchronized void registerScope(Scope scope) throws DuplicateIDException {
        if (scope == null) throw new IllegalArgumentException("scope cannot be null.");
        String id = scope.getID();
        if (this.containsScope(id)) throw new DuplicateIDException(id,
                "Scope registry already contains ontology scope with ID " + id);
        // if (this.containsScope(id)) {
        // if (scope != getScope(id)) {
        // log.warn("Overriding different scope with same ID {}", id);
        // super.registerScope(scope);
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.