{"record":{"id":"896b05278298b96c","repo":"apache/iceberg","slug":"property-s-has-been-deprecated-and-will-be-remo","errorCode":null,"errorMessage":"Property '%s' has been deprecated and will be removed in 2.0.0, use '%s' instead.","messagePattern":"Property '(.+?)' has been deprecated and will be removed in 2\\.0\\.0, use '(.+?)' instead\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/LocationProviders.java","lineNumber":88,"sourceCode":"    } else if (PropertyUtil.propertyAsBoolean(\n        properties,\n        TableProperties.OBJECT_STORE_ENABLED,\n        TableProperties.OBJECT_STORE_ENABLED_DEFAULT)) {\n      return new ObjectStoreLocationProvider(location, properties);\n    } else {\n      return new DefaultLocationProvider(location, properties);\n    }\n  }\n\n  private static final Set<String> DEPRECATED_PROPERTIES =\n      ImmutableSet.of(\n          TableProperties.OBJECT_STORE_PATH, TableProperties.WRITE_FOLDER_STORAGE_LOCATION);\n\n  private static String getAndCheckLegacyLocation(Map<String, String> properties, String key) {\n    String value = properties.get(key);\n\n    if (value != null && DEPRECATED_PROPERTIES.contains(key)) {\n      throw new IllegalArgumentException(\n          String.format(\n              \"Property '%s' has been deprecated and will be removed in 2.0.0, use '%s' instead.\",\n              key, TableProperties.WRITE_DATA_LOCATION));\n    }\n\n    return value;\n  }\n\n  static class DefaultLocationProvider implements LocationProvider {\n    private final String dataLocation;\n\n    DefaultLocationProvider(String tableLocation, Map<String, String> properties) {\n      this.dataLocation = LocationUtil.stripTrailingSlash(dataLocation(properties, tableLocation));\n    }\n\n    private static String dataLocation(Map<String, String> properties, String tableLocation) {\n      String dataLocation =\n          getAndCheckLegacyLocation(properties, TableProperties.WRITE_DATA_LOCATION);","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/LocationProviders.java#L70-L106","documentation":"getAndCheckLegacyLocation rejects table properties that are deprecated: if a deprecated key (e.g., object.store.path) still has a value, it throws immediately instead of silently honoring it, directing users to the replacement property before the 2.0.0 removal.","triggerScenarios":"A table still carries a value for a deprecated property in DEPRECATED_PROPERTIES (e.g., object.store.path, write.folder-storage.location style keys) while Iceberg resolves location providers.","commonSituations":"Tables upgraded from older Iceberg versions keeping stale properties; migration scripts copying old table properties; setting the old key from an outdated tutorial or tooling.","solutions":["Remove the deprecated property from table properties and set the modern replacement (e.g., use the current write.data.path / storage location properties)","Migrate stored data locations if needed before deleting the property","Update tooling/templates to write the new property names"],"exampleFix":"// before\ntable.updateProperties().set(\"object.store.path\", \"s3://bucket/base\").commit();\n// after\ntable.updateProperties().set(TableProperties.WRITE_DATA_LOCATION, \"s3://bucket/base\").commit();","handlingStrategy":"validation","validationCode":"if (props.get(\"object.store.path\") != null) {\n  throw new IllegalStateException(\"Remove deprecated 'object.store.path'; use the current write location property\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  LocationProviders.locationsFor(location, props);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"deprecated\")) { /* migrate property then retry */ }\n  else throw e;\n}","preventionTips":["Audit table properties for deprecated keys after version upgrades","Update provisioning scripts/templates to new property names","Migrate properties before the 2.0.0 removal deadline"],"tags":["java","deprecated","configuration"],"backgroundTag":"deprecated-api-usage","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}