контекст < /strong>: < /p>
- Spring-boot 3.2.4, упакованные в виде War и De-Deplosed Commags. 17.0.11 Temurin).
- opensearch java client 2.19.0 (также протестирован 2,6 → тот же результат).
- Все зависимости живут в веб-inf/lib-без затенения/uber-jar.
Статическая инициализация xcontentbuilder < /li>
< /ol>
Код: Выделить всё
public class XContentBuilder implements Closeable {
/** Map: Java type ➜ lambda that writes that value */
private static final Map valueMap = (Map) value;
map(valueMap, ensureNoSelfReferences, true);
} else if (value instanceof Iterable) {
value((Iterable) value, ensureNoSelfReferences);
} else if (value instanceof Object[]) {
values((Object[]) value, ensureNoSelfReferences);
} else if (value instanceof ToXContent) {
value((ToXContent) value);
} else if (value instanceof Enum) {
// Write out the Enum toString
value(Objects.toString(value));
} else {
throw new IllegalArgumentException("cannot write xcontent for unknown value of type " + value.getClass());
}
}
< /code>
allodalargumentException - это добавление: < /p>
java.lang.IllegalArgumentException: cannot write xcontent for unknown value of type class java.time.LocalDate
at org.opensearch.core.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:866)
at org.opensearch.core.xcontent.XContentBuilder.value(XContentBuilder.java:837)
at org.opensearch.core.xcontent.XContentBuilder.field(XContentBuilder.java:822)
at org.opensearch.index.query.RangeQueryBuilder.doXContent(RangeQueryBuilder.java:334)
Подробнее здесь: https://stackoverflow.com/questions/796 ... appears-ra