List of usage examples for java.lang IllegalAccessException getMessage
public String getMessage()
From source file:org.cloudgraph.hbase.mapreduce.GraphServiceDelegate.java
@Override public void commit(DataGraph graph, JobContext jobContext) throws IOException { String jobName = this.getClass().getSimpleName(); if (jobContext != null) jobName = jobContext.getJobName(); SnapshotMap snapshotMap = new SnapshotMap(new Timestamp((new Date()).getTime())); MutationCollector collector = null;/*from w w w.j a v a2 s.c o m*/ Connection connection = HBaseConnectionManager.instance().getConnection(); try { collector = new GraphMutationCollector(this.context, snapshotMap, jobName); // FIXME: if an exception happens here we don't have table writers // to close // as required by the 1.0.0 HBase client API. Will cause resource // bleed // Map<TableWriter, List<Row>> mutations = new HashMap<TableWriter, // List<Row>>(); Map<TableWriter, Map<String, Mutations>> mutations = new HashMap<>(); try { mutations = collector.collectChanges(graph, connection); } catch (IllegalAccessException e) { throw new GraphServiceException(e); } TableWriter[] tableWriters = new TableWriter[mutations.keySet().size()]; mutations.keySet().toArray(tableWriters); GraphMutationWriter writer = new GraphMutationWriter(); try { writer.writeChanges(tableWriters, mutations, snapshotMap, jobName); } finally { for (TableWriter tableWriter : tableWriters) tableWriter.close(); } List<DataObject> changedObjects = graph.getChangeSummary().getChangedDataObjects(); for (DataObject dataObject : changedObjects) if (!graph.getChangeSummary().isDeleted(dataObject)) ((PlasmaNode) dataObject).getDataObject().reset(snapshotMap, jobName); graph.getChangeSummary().endLogging(); graph.getChangeSummary().beginLogging(); } finally { try { connection.close(); } catch (IOException e) { log.error(e.getMessage(), e); } if (collector != null) collector.close(); } }
From source file:com.ucuenca.pentaho.plugin.step.ontologymapping.OntoMapDialog.java
/** * Method in charge to lookup and execute the step getter method for DB table name * @param stepName Name of step involved * @param stepData step data interface//from ww w . jav a 2 s.c o m * @return table name */ private String lookupGetterMethod(String stepName, StepDataInterface stepData) { String value = null; try { value = (String) stepData.getClass().getField("DBTABLE").get(stepData); } catch (NoSuchFieldException ne) { logDebug("NO 'DBTABLE' FIELD FOUND ON " + stepName + " STEP DATA CLASS"); } catch (SecurityException se) { logDebug("NO 'DBTABLE' PUBLIC FIELD FOUND ON " + stepName + " STEP DATA CLASS"); } catch (IllegalAccessException ae) { logDebug(ae.getMessage()); } return value; }
From source file:au.org.theark.lims.web.component.subjectlims.lims.biospecimen.form.BiospecimenModalDetailForm.java
/** * Takes all details of a biospecimen, copies to a new Biospecimen, then allows editing of details before save * //w ww. j av a2 s . c o m * @param target */ protected void onCloneBiospecimen(AjaxRequestTarget target) { final Biospecimen clonedBiospecimen = cpModel.getObject().getBiospecimen(); final String clonedBiospecimenUid = clonedBiospecimen.getBiospecimenUid(); final Biospecimen biospecimen = new Biospecimen(); try { // Copy parent biospecimen details to new biospecimen PropertyUtils.copyProperties(biospecimen, clonedBiospecimen); // Amend specific fields/detail biospecimen.setId(null); if (biospecimen.getStudy().getAutoGenerateBiospecimenUid()) { biospecimen.setBiospecimenUid(Constants.AUTO_GENERATED); } else { biospecimen.setBiospecimenUid(null); } // Cloning not a child biospecimen // biospecimen.setParent(clonedBiospecimen); // biospecimen.setParentUid(clonedBiospecimen.getBiospecimenUid()); biospecimen.setSampleType(clonedBiospecimen.getSampleType()); biospecimen.setBioCollection(clonedBiospecimen.getBioCollection()); biospecimen.setQuantity(null); biospecimen.setUnit(clonedBiospecimen.getUnit()); biospecimen.setComments("Clone of " + clonedBiospecimenUid); biospecimen.setBarcoded(false); biospecimen.setQuantity(clonedBiospecimen.getQuantity()); biospecimen.setUnit(clonedBiospecimen.getUnit()); biospecimen.setTreatmentType(clonedBiospecimen.getTreatmentType()); biospecimen.setChildren(new ArrayList<Biospecimen>(0)); Study studyFromClone = clonedBiospecimen.getStudy(); // There should be a study and only then do the rest of the code here if (studyFromClone != null) { Study study = iArkCommonService.getStudy(studyFromClone.getId()); biospecimen.setStudy(study); // Reset the biospecimen detail cpModel.getObject().setBiospecimen(biospecimen); // Set the bioTransaction detail org.apache.shiro.subject.Subject currentUser = SecurityUtils.getSubject(); cpModel.getObject().getBioTransaction().setRecorder(currentUser.getPrincipal().toString()); cpModel.getObject().getBioTransaction().setQuantity(null); cpModel.getObject().getBioTransaction().setUnit(biospecimen.getUnit()); enableQuantityTreatment(target); CompoundPropertyModel<BiospecimenCustomDataVO> bioCFDataCpModel = new CompoundPropertyModel<BiospecimenCustomDataVO>( new BiospecimenCustomDataVO()); bioCFDataCpModel.getObject().setBiospecimen(biospecimen); bioCFDataCpModel.getObject().setArkFunction(iArkCommonService .getArkFunctionByName(au.org.theark.core.Constants.FUNCTION_KEY_VALUE_BIOSPECIMEN)); biospecimenCFDataEntryPanel = new BiospecimenCustomDataDataViewPanel("biospecimenCFDataEntryPanel", bioCFDataCpModel).initialisePanel(null); arkCrudContainerVo.getDetailPanelFormContainer().addOrReplace(biospecimenCFDataEntryPanel); // refresh the bioTransaction panel initialiseBioTransactionListPanel(); arkCrudContainerVo.getDetailPanelFormContainer().addOrReplace(bioTransactionListPanel); // refresh the location panel cpModel.getObject().setBiospecimenLocationVO(new BiospecimenLocationVO()); initialiseBiospecimenLocationPanel(); arkCrudContainerVo.getDetailPanelFormContainer().addOrReplace(biospecimenLocationPanel); target.add(biospecimenLocationPanel); // Notify in progress this.info("Cloning biospecimen " + clonedBiospecimenUid + ", please save to confirm"); target.add(feedbackPanel); // hide button panel biospecimenbuttonsPanel.setVisible(false); target.add(biospecimenbuttonsPanel); } else { log.error("Cannot find a study for the cloned biospecimen."); } } catch (IllegalAccessException e) { log.error(e.getMessage()); } catch (InvocationTargetException e) { log.error(e.getMessage()); } catch (NoSuchMethodException e) { log.error(e.getMessage()); } }
From source file:au.org.theark.lims.web.component.subjectlims.lims.biospecimen.form.BiospecimenModalDetailForm.java
/** * Handle processing or aliquoting of a parent biospecimen. Process essentially changing the type of a parent biospecimen. Aliquot essentially * taking an amount from a parent biospecimen. * //from w w w .j a v a 2s .com * @param target * AjxaxRequestTarget * @param processOrAliquot * indication to whether a process or an aliquot * @param comment * comment to add to biospecimen comments */ protected void processOrAliquot(AjaxRequestTarget target, String processOrAliquot, String comment) { final Biospecimen parentBiospecimen = cpModel.getObject().getBiospecimen(); final String parentBiospecimenUid = parentBiospecimen.getBiospecimenUid(); final Biospecimen biospecimen = new Biospecimen(); cpModel.getObject().setParentBiospecimen(parentBiospecimen); try { // Copy parent biospecimen details to new biospecimen PropertyUtils.copyProperties(biospecimen, parentBiospecimen); // Amend specific fields/detail biospecimen.setId(null); if (biospecimen.getStudy().getAutoGenerateBiospecimenUid()) { biospecimen.setBiospecimenUid(Constants.AUTO_GENERATED); } else { biospecimen.setBiospecimenUid(null); } /*** * TRAV TO INVESTIGATE ASAP // Cloning not a child biospecimen // biospecimen.setParent(clonedBiospecimen); // biospecimen.setParentUid(clonedBiospecimen.getBiospecimenUid()); **/ biospecimen.setParent(parentBiospecimen); biospecimen.setParentUid(parentBiospecimen.getBiospecimenUid()); biospecimen.setSampleType(parentBiospecimen.getSampleType()); biospecimen.setBioCollection(parentBiospecimen.getBioCollection()); biospecimen.setQuantity(null); biospecimen.setUnit(parentBiospecimen.getUnit()); biospecimen.setComments(comment + parentBiospecimenUid); biospecimen.setBarcoded(false); biospecimen.setTreatmentType(parentBiospecimen.getTreatmentType()); biospecimen.setChildren(new ArrayList<Biospecimen>(0)); Study studyFromParent = parentBiospecimen.getStudy(); // There should be a study and only then do the rest of the code here if (studyFromParent != null) { Study study = iArkCommonService.getStudy(studyFromParent.getId()); biospecimen.setStudy(study); // Reset the biospecimen detail cpModel.getObject().setBiospecimen(biospecimen); cpModel.getObject().setBiospecimenProcessing(processOrAliquot); // Set the bioTransaction detail org.apache.shiro.subject.Subject currentUser = SecurityUtils.getSubject(); cpModel.getObject().getBioTransaction().setRecorder(currentUser.getPrincipal().toString()); cpModel.getObject().getBioTransaction().setQuantity(null); cpModel.getObject().getBioTransaction().setUnit(biospecimen.getUnit()); //TODO: unit enableQuantityTreatment(target); CompoundPropertyModel<BiospecimenCustomDataVO> bioCFDataCpModel = new CompoundPropertyModel<BiospecimenCustomDataVO>( new BiospecimenCustomDataVO()); bioCFDataCpModel.getObject().setBiospecimen(biospecimen); bioCFDataCpModel.getObject().setArkFunction(iArkCommonService .getArkFunctionByName(au.org.theark.core.Constants.FUNCTION_KEY_VALUE_BIOSPECIMEN)); biospecimenCFDataEntryPanel = new BiospecimenCustomDataDataViewPanel("biospecimenCFDataEntryPanel", bioCFDataCpModel).initialisePanel(null); arkCrudContainerVo.getDetailPanelFormContainer().addOrReplace(biospecimenCFDataEntryPanel); // refresh the bioTransaction panel initialiseBioTransactionListPanel(); arkCrudContainerVo.getDetailPanelFormContainer().addOrReplace(bioTransactionListPanel); // refresh the location panel cpModel.getObject().setBiospecimenLocationVO(new BiospecimenLocationVO()); initialiseBiospecimenLocationPanel(); arkCrudContainerVo.getDetailPanelFormContainer().addOrReplace(biospecimenLocationPanel); target.add(biospecimenLocationPanel); // Notify in progress this.info(processOrAliquot + " biospecimen " + cpModel.getObject().getBiospecimen().getParentUid() + ", please save to confirm"); target.add(feedbackPanel); // hide button panel biospecimenbuttonsPanel.setVisible(false); target.add(biospecimenbuttonsPanel); } else { log.error("Cannot find a study for the parent biospecimen."); } } catch (IllegalAccessException e) { log.error(e.getMessage()); } catch (InvocationTargetException e) { log.error(e.getMessage()); } catch (NoSuchMethodException e) { log.error(e.getMessage()); } }
From source file:org.cloudgraph.hbase.mapreduce.GraphServiceDelegate.java
@Override public void commit(DataGraph[] graphs, JobContext jobContext) throws IOException { String jobName = this.getClass().getSimpleName(); if (jobContext != null) jobName = jobContext.getJobName(); SnapshotMap snapshotMap = new SnapshotMap(new Timestamp((new Date()).getTime())); // Map<TableWriter, List<Row>> mutations = new HashMap<TableWriter, // List<Row>>(); Map<TableWriter, Map<String, Mutations>> mutations = new HashMap<>(); MutationCollector collector = null;//from w w w. j a v a 2s. c o m Connection connection = HBaseConnectionManager.instance().getConnection(); try { collector = new GraphMutationCollector(this.context, snapshotMap, jobName); try { mutations = collector.collectChanges(graphs, connection); } catch (IllegalAccessException e) { throw new GraphServiceException(e); } TableWriter[] tableWriters = new TableWriter[mutations.keySet().size()]; mutations.keySet().toArray(tableWriters); GraphMutationWriter writer = new GraphMutationWriter(); try { writer.writeChanges(tableWriters, mutations, snapshotMap, jobName); } finally { for (TableWriter tableWriter : tableWriters) tableWriter.close(); } for (DataGraph graph : graphs) { List<DataObject> changedObjects = graph.getChangeSummary().getChangedDataObjects(); for (DataObject dataObject : changedObjects) if (!graph.getChangeSummary().isDeleted(dataObject)) ((PlasmaNode) dataObject).getDataObject().reset(snapshotMap, jobName); graph.getChangeSummary().endLogging(); graph.getChangeSummary().beginLogging(); } } finally { try { connection.close(); } catch (IOException e) { log.error(e.getMessage(), e); } if (collector != null) collector.close(); } }
From source file:org.springframework.data.document.mongodb.MongoTemplate.java
protected Object getIdValue(Object object) { MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(object.getClass()); MongoPersistentProperty idProp = entity.getIdProperty(); if (idProp == null) { throw new MappingException("No id property found for object of type " + entity.getType().getName()); }//from w w w . j ava 2 s. c o m try { return MappingBeanHelper.getProperty(object, idProp, Object.class, true); } catch (IllegalAccessException e) { throw new MappingException(e.getMessage(), e); } catch (InvocationTargetException e) { throw new MappingException(e.getMessage(), e); } }
From source file:org.springframework.data.document.mongodb.MongoTemplate.java
/** * Populates the id property of the saved object, if it's not set already. * * @param savedObject/*w ww. j ava 2 s . com*/ * @param id */ protected void populateIdIfNecessary(Object savedObject, Object id) { if (id == null) { return; } MongoPersistentProperty idProp = getIdPropertyFor(savedObject.getClass()); if (idProp == null) { return; } try { MappingBeanHelper.setProperty(savedObject, idProp, id); return; } catch (IllegalAccessException e) { throw new MappingException(e.getMessage(), e); } catch (InvocationTargetException e) { throw new MappingException(e.getMessage(), e); } }
From source file:org.openengsb.core.ekb.common.EDBConverter.java
/** * Recursive function to generate a list of EDBObjects out of a model object. *///from w w w .j a v a 2 s . c o m private String convertSubModel(OpenEngSBModel model, List<EDBObject> objects, ConnectorInformation info) { String contextId = ContextHolder.get().getCurrentContextId(); String oid = EDBConverterUtils.createOID(model, contextId); EDBObject object = new EDBObject(oid); try { EDBConverterUtils.fillEDBObjectWithEngineeringObjectInformation(object, model); } catch (IllegalAccessException e) { LOGGER.warn("Unable to fill completely the EngineeringObjectInformation into the EDBObject", e); throw new EKBException("Unable to fill completely the EngineeringObjectInformation into the EDBObject", e); } for (OpenEngSBModelEntry entry : model.toOpenEngSBModelEntries()) { if (entry.getValue() == null) { continue; } else if (entry.getType().equals(FileWrapper.class)) { try { FileWrapper wrapper = (FileWrapper) entry.getValue(); String content = Base64.encodeBase64String(wrapper.getContent()); object.putEDBObjectEntry(entry.getKey(), content, String.class); object.putEDBObjectEntry(entry.getKey() + EDBConverterUtils.FILEWRAPPER_FILENAME_SUFFIX, wrapper.getFilename(), String.class); } catch (IOException e) { LOGGER.error(e.getMessage()); } } else if (OpenEngSBModel.class.isAssignableFrom(entry.getType())) { OpenEngSBModel temp = (OpenEngSBModel) entry.getValue(); String subOid = convertSubModel(temp, objects, info); object.putEDBObjectEntry(entry.getKey(), subOid, String.class); } else if (List.class.isAssignableFrom(entry.getType())) { List<?> list = (List<?>) entry.getValue(); if (list == null || list.size() == 0) { continue; } Boolean modelItems = null; for (int i = 0; i < list.size(); i++) { Object item = list.get(i); if (modelItems == null) { modelItems = OpenEngSBModel.class.isAssignableFrom(item.getClass()); } if (modelItems) { item = convertSubModel((OpenEngSBModel) item, objects, info); } String entryName = EDBConverterUtils.getEntryNameForList(entry.getKey(), i); object.putEDBObjectEntry(entryName, item, item.getClass()); } } else if (entry.getType().isArray()) { Object[] array = (Object[]) entry.getValue(); if (array == null || array.length == 0) { continue; } Boolean modelItems = null; for (int i = 0; i < array.length; i++) { Object item = array[i]; if (modelItems == null) { modelItems = OpenEngSBModel.class.isAssignableFrom(item.getClass()); } if (modelItems) { item = convertSubModel((OpenEngSBModel) item, objects, info); } String entryName = EDBConverterUtils.getEntryNameForList(entry.getKey(), i); object.putEDBObjectEntry(entryName, item, item.getClass()); } } else if (Map.class.isAssignableFrom(entry.getType())) { Map<?, ?> map = (Map<?, ?>) entry.getValue(); if (map == null || map.size() == 0) { continue; } Boolean keyIsModel = null; Boolean valueIsModel = null; int i = 0; for (Map.Entry<?, ?> ent : map.entrySet()) { if (keyIsModel == null) { keyIsModel = OpenEngSBModel.class.isAssignableFrom(ent.getKey().getClass()); } if (valueIsModel == null) { valueIsModel = OpenEngSBModel.class.isAssignableFrom(ent.getValue().getClass()); } Object key = ent.getKey(); Object value = ent.getValue(); if (keyIsModel) { key = convertSubModel((OpenEngSBModel) key, objects, info); } if (valueIsModel) { value = convertSubModel((OpenEngSBModel) value, objects, info); } object.putEDBObjectEntry(EDBConverterUtils.getEntryNameForMapKey(entry.getKey(), i), key); object.putEDBObjectEntry(EDBConverterUtils.getEntryNameForMapValue(entry.getKey(), i), value); i++; } } else { object.putEDBObjectEntry(entry.getKey(), entry.getValue(), entry.getClass()); } } object.putEDBObjectEntry(EDBConstants.MODEL_TYPE, model.retrieveModelName()); object.putEDBObjectEntry(EDBConstants.MODEL_TYPE_VERSION, model.retrieveModelVersion()); object.putEDBObjectEntry("domainId", info.getDomainId()); object.putEDBObjectEntry("connectorId", info.getConnectorId()); object.putEDBObjectEntry("instanceId", info.getInstanceId()); object.putEDBObjectEntry("contextId", contextId); objects.add(object); return oid; }
From source file:de.fiz.ddb.aas.auxiliaryoperations.ThreadOrganisationCreate.java
/** * /*w ww . java 2 s . c o m*/ * @return Organisation * @throws AASUnauthorizedException * @throws NamingException * @throws IOException * @throws CloneNotSupportedException * @throws IllegalAccessException * @throws Exception */ @PreAuthorize(privileges = { PrivilegeEnum.DEFAULT }, scope = Scope.ORGANIZATION) public Organisation call() throws AASUnauthorizedException, ExecutionException, NameAlreadyBoundException { Organisation vResult = this._orgObj; // -- Fr eine Prfung, ob bereits existent: // but only if that is not a copy in the export directory if (!this.isAddToLicensedOrgs() && organizationExists(this._orgObj.getOIDs().getOrgName())) { throw new NameAlreadyBoundException( "Error: A organization with ID: '" + this._orgObj.getOIDs().getOrgName() + "' already exists!"); } try { // -- Ist ein Parent bekannt, muss auch die komplette RDN aufgebaut // werden: if (!this.isAddToLicensedOrgs()) { if ((this._orgObj.getOrgRDN() == null) && (this._orgObj.getOrgParent() != null) && (!this._orgObj.getOrgParent().isEmpty())) { ThreadOIDsRDNComplement threadOIDsRDNComplement = new ThreadOIDsRDNComplement( new OIDs(this._orgObj.getOrgParent(), false), getPerformer()); this._orgParentOIDs = threadOIDsRDNComplement.call(); if (this._orgParentOIDs != null) { LOG.info("OrgParent = " + this._orgParentOIDs); this._orgObj.setOrgRDN(new StringBuilder(this._orgObj.getId()).append(",") .append(this._orgParentOIDs.getOrgRDN()).toString()); } else { throw new IllegalArgumentException("Error: A parent organization with ID: '" + this._orgObj.getOrgParent() + "' not found!"); } } else { this._orgObj.setOrgRDN(this._orgObj.getId()); } } // -- Ask about Geo coordinates but only if that is not a copy in the export directory or Licensed directory if (!this.isAddToLicensedOrgs() && !this.isIngestingOperation()) { boolean vQueryRequestForGeocoding = ((Math.abs(this._orgObj.getAddress().getLatitude()) <= 1e-6) || (Math.abs(this._orgObj.getAddress().getLongitude()) <= 1e-6)); if (vQueryRequestForGeocoding) { try { GeoRequest vGeoRequest = new GeoRequest(new GeoAdresse(this._orgObj.getAddress()), LDAPConnector.getSingletonInstance().getHttpProxy()); vGeoRequest.setAskForLocation(true); // -- should be set by Properties... change it! vGeoRequest.addAcceptLocationType(GeoLocationType.ROOFTOP, GeoLocationType.RANGE_INTERPOLATED, GeoLocationType.GEOMETRIC_CENTER, GeoLocationType.APPROXIMATE); _submit = LDAPConnector.getSingletonInstance().getExecutorServiceOne().submit(vGeoRequest); } catch (IllegalAccessException ex) { LOG.log(Level.SEVERE, "Error bei Adresse: " + this._orgObj.getAddress(), ex); } } } this.createOrg(); vResult = this._orgObj; // -- The performer gets automatically a member of this organization // X but only if that is not a copy in the export or licensed directory if ((!this.isAddToLicensedOrgs()) && (this._performer != null)) { //if ((this._performer != null)) { Map<OIDs, Set<PrivilegeEnum>> privileges = new HashMap<OIDs, Set<PrivilegeEnum>>(); privileges.put(this._orgObj.getOIDs(), new HashSet<PrivilegeEnum>()); privileges.get(this._orgObj.getOIDs()).add(PrivilegeEnum.ADMIN_ORG); ThreadUserOrgPrivilegsOperations threadUserOrgPrivilegsOperations = new ThreadUserOrgPrivilegsOperations( _performer.getUid(), privileges, Action.ADD, this._performer); threadUserOrgPrivilegsOperations.call(); } } catch (ExecutionException ex) { LOG.log(Level.WARNING, ex.getMessage(), ex.getCause()); throw ex; } catch (NameNotFoundException ex) { LOG.log(Level.SEVERE, ex.getMessage()); throw new ExecutionException(ex.getMessage(), ex); } catch (AssertionError ex) { LOG.log(Level.SEVERE, ex.getMessage()); throw new ExecutionException(ex.getMessage(), ex); } finally { if (this._ready != null) { this._ready.countDown(); } if ((_submit != null) && (!_submit.isDone()) && (!_submit.isCancelled())) { _submit.cancel(true); } } return vResult; }
From source file:com.taobao.android.builder.tasks.transform.ClassInjectTransform.java
private ClassPool initClassPool(List<JarInput> jarInputs, List<DirectoryInput> directoryInputs) { if (((VariantScopeImpl) this.appVariantContext.getScope()).getVariantData().getName().toLowerCase() .contains("debug")) { try {// w ww . j a va 2 s .c o m FieldUtils.writeStaticField(ClassPool.class, "defaultPool", null, true); } catch (IllegalAccessException e) { e.printStackTrace(); } } else { //logger.warn(">>> ?daemon <<<<"); } final ClassPool pool = ClassPool.getDefault(); try { File verifyFile = PathUtil.getJarFile(com.taobao.verify.Verifier.class); pool.insertClassPath(verifyFile.getAbsolutePath()); for (File file : appVariantContext.getScope().getJavaClasspath()) { if (file.isFile()) { pool.insertClassPath(file.getAbsolutePath()); } else { pool.appendClassPath(file.getAbsolutePath()); } } String path = Joiner.on(File.pathSeparator) .join(scope.getGlobalScope().getAndroidBuilder().getBootClasspathAsStrings(false)); pool.appendPathList(path); for (JarInput jarInput : jarInputs) { pool.insertClassPath(jarInput.getFile().getAbsolutePath()); } for (DirectoryInput directoryInput : directoryInputs) { pool.appendClassPath(directoryInput.getFile().getAbsolutePath()); } } catch (NotFoundException e) { throw new StopExecutionException(e.getMessage()); } return pool; }