@Override
  public GeoCouchFeatureStore create(URL configURL) throws ResourceInitException {

    GeoCouchFeatureStore fs = null;
    try {
      GeoCouchFeatureStoreConfig config =
          (GeoCouchFeatureStoreConfig)
              JAXBUtils.unmarshall(CONFIG_JAXB_PACKAGE, CONFIG_SCHEMA, configURL, workspace);

      XMLAdapter resolver = new XMLAdapter();
      resolver.setSystemId(configURL.toString());

      String srs = config.getStorageCRS();
      srs = srs.trim();
      ICRS crs = CRSManager.getCRSRef(srs);

      String couchUrl = config.getGeoCouchUrl();
      if (!couchUrl.endsWith("/")) {
        couchUrl += "/";
      }

      List<String> configSchemas = config.getGMLSchema();
      String[] schemas = new String[configSchemas.size()];
      int i = -1;
      for (String s : configSchemas) {
        schemas[++i] = resolver.resolve(s).toString();
      }

      GMLAppSchemaReader decoder = new GMLAppSchemaReader(null, null, schemas);
      AppSchema schema = decoder.extractAppSchema();

      fs = new GeoCouchFeatureStore(crs, schema, couchUrl);

    } catch (Throwable e) {

      String msg =
          "Error in feature store configuration file '" + configURL + "': " + e.getMessage();
      LOG.error(msg);
      throw new ResourceInitException(msg, e);
    }
    return fs;
  }