Examples of CorruptModelException


Examples of org.sonatype.nexus.configuration.ModelUtils.CorruptModelException

          if (serversNode != null) {
            // servers node exists, this is Pro, and is versioned, use standard ways to get it's version
            // and enforce version presence
            if (versionNode != null) {
              if (Strings.isNullOrEmpty(versionNode.getValue())) {
                throw new CorruptModelException("Nexus Pro LDAP XML model invalid: empty 'version' node");
              }
              return versionNode.getValue();
            }
            else {
              throw new CorruptModelException("Passed in LDAP model does not have 'version' node");
            }
          }
          else {
            // servers node not exists, this is OSS and only one model version exists of it
            return OSS_VERSION_MARKER;
          }
        }
        catch (XmlPullParserException e) {
          throw new CorruptModelException("Passed in XML model cannot be parsed", e);
        }
      }
    }
View Full Code Here

Examples of org.sonatype.nexus.configuration.ModelUtils.CorruptModelException

          ossConfiguration.getConnectionInfo()
              .setSystemPassword(
                  legacyPasswordHelper.decrypt(ossConfiguration.getConnectionInfo().getSystemPassword()));
        }
        catch (Exception e) {
          throw new CorruptModelException("Could not decrypt legacy encrypted LDAP password during upgrade", e);
        }
      }
      final CLdapServerConfiguration newServerConfig = new CLdapServerConfiguration();
      newServerConfig.setId("default");
      newServerConfig.setName(buildName(ossConfiguration.getConnectionInfo()));
View Full Code Here

Examples of org.sonatype.nexus.configuration.ModelUtils.CorruptModelException

    public E read(final Reader reader) throws IOException, CorruptModelException {
      try {
        return doRead(reader);
      }
      catch (XmlPullParserException e) {
        throw new CorruptModelException("Model corrupted" + e.getMessage(), e);
      }
    }
View Full Code Here

Examples of org.sonatype.nexus.configuration.ModelUtils.CorruptModelException

          else {
            throw new MissingModelVersionException("Passed in XML model does not have " + fieldName + " node");
          }
        }
        catch (XmlPullParserException e) {
          throw new CorruptModelException("Passed in XML model cannot be parsed", e);
        }
      }
    }
View Full Code Here

Examples of org.sonatype.nexus.configuration.ModelUtils.CorruptModelException

    {
      try {
        doUpgrade(reader, writer);
      }
      catch (XmlPullParserException e) {
        throw new CorruptModelException("Model corrupted" + e.getMessage(), e);
      }
    }
View Full Code Here

Examples of org.sonatype.nexus.configuration.ModelUtils.CorruptModelException

    public Xpp3Dom read(final Reader reader) throws IOException, CorruptModelException {
      try {
        return Xpp3DomBuilder.build(reader);
      }
      catch (XmlPullParserException e) {
        throw new CorruptModelException(e.getMessage(), e);
      }
    }
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.