Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
Running registry-manager export-dd (or any command using DataExporter) fails immediately with:
[ERROR] Missing required property 'FieldValue.<variant value>'
This is thrown by MissingRequiredPropertyException in opensearch-java 3.x when FieldValue.Builder.stringValue(null) is called. The crash occurs because DataExporter.export() initializes searchAfter = null and passes it directly to SearchImpl.all(), which unconditionally constructs a FieldValue from that null value.
The ES (non-AWS) SearchImpl implementation already guards against this with if (searchAfter != null) in RegistryRequestBuilder. The AWS SearchImpl was missing the same guard, making it incompatible with opensearch-java 3.x.
Root Cause
In registry-common: SearchImpl.all() (AWS connection):
// Before fix — crashes when searchAfter is null under opensearch-java 3.x
this.craftsman.searchAfter(Arrays.asList(new FieldValue.Builder().stringValue(searchAfter).build()));
Fix
Skip the searchAfter call when the value is null, matching the existing ES implementation behaviour:
if (searchAfter != null) {
this.craftsman.searchAfter(Arrays.asList(new FieldValue.Builder().stringValue(searchAfter).build()));
}
🕵️ Expected behavior
registry-manager export-dd should execute without error and export documents from the -dd index.
📜 To Reproduce
- Build
registry-mgr against registry-common using opensearch-java 3.x
- Run:
registry-manager export-dd -registry file:///path/to/registry-config.xml -auth /path/to/auth.txt -file /tmp/out.json
- Observe:
[ERROR] Missing required property 'FieldValue.<variant value>'
🖥 Environment Info
- Version of this software: 6.2.2-SNAPSHOT
- Operating System: macOS
- OpenSearch Java client: 3.x (registry-common 2.5.4-SNAPSHOT)
📚 Version of Software Used
- registry-mgr 6.2.2-SNAPSHOT
- registry-common 2.5.4-SNAPSHOT
🩺 Test Data / Additional context
- Affects all
DataExporter-based commands: export-dd, export-data
- The
list-dd command is not affected (uses a different code path)
- The non-AWS (ES direct) connection is not affected
🦄 Related requirements
N/A
For Internal Dev Team To Complete
⚙️ Engineering Details
Fix is in registry-common: src/main/java/gov/nasa/pds/registry/common/connection/aws/SearchImpl.java — add null guard in all(String sortField, int size, String searchAfter) before calling craftsman.searchAfter().
🎉 Integration & Test
🤖 Generated with Claude Code
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
Running
registry-manager export-dd(or any command usingDataExporter) fails immediately with:This is thrown by
MissingRequiredPropertyExceptionin opensearch-java 3.x whenFieldValue.Builder.stringValue(null)is called. The crash occurs becauseDataExporter.export()initializessearchAfter = nulland passes it directly toSearchImpl.all(), which unconditionally constructs aFieldValuefrom that null value.The ES (non-AWS)
SearchImplimplementation already guards against this withif (searchAfter != null)inRegistryRequestBuilder. The AWSSearchImplwas missing the same guard, making it incompatible with opensearch-java 3.x.Root Cause
In
registry-common:SearchImpl.all()(AWS connection):Fix
Skip the
searchAftercall when the value is null, matching the existing ES implementation behaviour:🕵️ Expected behavior
registry-manager export-ddshould execute without error and export documents from the-ddindex.📜 To Reproduce
registry-mgragainstregistry-commonusing opensearch-java 3.xregistry-manager export-dd -registry file:///path/to/registry-config.xml -auth /path/to/auth.txt -file /tmp/out.json[ERROR] Missing required property 'FieldValue.<variant value>'🖥 Environment Info
📚 Version of Software Used
🩺 Test Data / Additional context
DataExporter-based commands:export-dd,export-datalist-ddcommand is not affected (uses a different code path)🦄 Related requirements
N/A
For Internal Dev Team To Complete
⚙️ Engineering Details
Fix is in
registry-common:src/main/java/gov/nasa/pds/registry/common/connection/aws/SearchImpl.java— add null guard inall(String sortField, int size, String searchAfter)before callingcraftsman.searchAfter().🎉 Integration & Test