Package org.fao.geonet.exceptions

Examples of org.fao.geonet.exceptions.OperationAbortedEx


    catch(Exception e)
    {
      log.warning("Raised exception when searching : "+ e);
      log.warning(Util.getStackTrace(e));
            this.errors.add(new HarvestError(e, log));
      throw new OperationAbortedEx("Raised exception when searching", e);
    }
  }
View Full Code Here


        request.setMethod(GET);
      } else if (oper.getPostUrl() != null) {
        request.setUrl(oper.getPostUrl());
        request.setMethod(POST);
      } else {
        throw new OperationAbortedEx("No GET or POST DCP available in this service.");
      }
    }

    if(oper.getPreferredOutputSchema() != null) {
      request.setOutputSchema(oper.getPreferredOutputSchema());
View Full Code Here

            AbstractHarvester ah = context.getApplicationContext().getBean(type, AbstractHarvester.class);
            ah.setContext(context);

            return ah;
        } catch (Exception e) {
            throw new OperationAbortedEx("Cannot instantiate harvester", e);
        }
    }
View Full Code Here

    if (log.isDebugEnabled())
      log.debug("Number of child elements in response: " + response.getChildren().size());

    String rss = response.getName();
    if (!rss.equals("rss")) {
      throw new OperationAbortedEx("Missing 'rss' element in\n", Xml.getString(response));
    }

    Element channel = response.getChild("channel");
    if (channel == null) {
      throw new OperationAbortedEx("Missing 'channel' element in \n", Xml.getString(response));
    }

    @SuppressWarnings("unchecked")
        List<Element> list = channel.getChildren();
View Full Code Here

                log.debug("Search results:\n" + Xml.getString(response));
            }
            return response;
        } catch (BadSoapResponseEx e) {
            errors.add(new HarvestError(e, log));
            throw new OperationAbortedEx("Raised exception when searching: "
                    + e.getMessage(), e);
        } catch (BadXmlResponseEx e) {
            errors.add(new HarvestError(e, log));
            throw new OperationAbortedEx("Raised exception when searching: "
                    + e.getMessage(), e);
        } catch (IOException e) {
            errors.add(new HarvestError(e, log));
            throw new OperationAbortedEx("Raised exception when searching: "
                    + e.getMessage(), e);
        }
    }
View Full Code Here

        realDeletePluginSchema(name, doDependencies);
      } catch (Exception e) {
        String errStr = "Could not update schema "+name+", remove of outdated schema failed. Exception message if any is "+e.getMessage();
        Log.error(Geonet.SCHEMA_MANAGER, errStr);
        e.printStackTrace();
        throw new OperationAbortedEx(errStr, e);
      }

      // -- add the new one
      realAddPluginSchema(applicationContext, name, in);
    } finally {
View Full Code Here

      if (doDependencies) {
        List<String> dependsOnMe = getSchemasThatDependOnMe(name);
        if (dependsOnMe.size() > 0) {
          String errStr = "Cannot remove schema "+name+" because the following schemas list it as a dependency: "+dependsOnMe;
          Log.error(Geonet.SCHEMA_MANAGER, errStr);
          throw new OperationAbortedEx(errStr);
        }
      }

      removeSchemaInfo(name);
    }
View Full Code Here

      writeSchemaPluginCatalog(schemaPluginCatRoot);
    } catch (Exception e) {
      e.printStackTrace();
      hmSchemas.remove(name);
      deleteDir(dir);
      throw new OperationAbortedEx("Failed to add schema "+name+" : "+e.getMessage(), e);
    }
  }
View Full Code Here

            }
        } catch (Exception e) {
            String errStr = "Failed whilst " + stage + ". Exception message if any is " + e.getMessage();
            Log.error(Geonet.SCHEMA_MANAGER, errStr);
            e.printStackTrace();
            throw new OperationAbortedEx(errStr, e);
        }

    }
View Full Code Here

    {
            HarvestError error = new HarvestError(e, log);
            error.setDescription("Raised exception when searching : "+ e);
            this.errors.add(error);
            error.printLog(log);
      throw new OperationAbortedEx("Raised exception when searching", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.fao.geonet.exceptions.OperationAbortedEx

Copyright © 2018 www.massapicom. 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.