Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jackson-core 2.15 introduces string limit #83

Open
dlamoris opened this issue May 24, 2024 · 1 comment
Open

jackson-core 2.15 introduces string limit #83

dlamoris opened this issue May 24, 2024 · 1 comment

Comments

@dlamoris
Copy link
Contributor

dlamoris commented May 24, 2024

Dependency override for jackson-core to 2.15 can cause elastic read to fail if a string is longer than 5 mb
FasterXML/jackson-core#863
should set the limit to unlimited somewhere or downgrade/upgrade jackson

@dlamoris
Copy link
Contributor Author

dlamoris commented May 24, 2024

exception encountered:

2024-05-24T16:57:24,636Z [task-20] ERROR o.o.mms.elastic.NodeElasticDAOImpl - Unable to parse response body for Response{requestLine=POST /_mget HTTP/1.1, host=[redacted], response=HTTP/1.1 200 OK}
java.io.IOException: Unable to parse response body for Response{requestLine=POST /_mget HTTP/1.1, host=[redacted], response=HTTP/1.1 200 OK}
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1630)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1581)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1551)
at org.elasticsearch.client.RestHighLevelClient.mget(RestHighLevelClient.java:814)
at org.openmbee.mms.elastic.BaseElasticDAOImpl.getResponses(BaseElasticDAOImpl.java:154)
at org.openmbee.mms.elastic.BaseElasticDAOImpl.findAllById(BaseElasticDAOImpl.java:138)
at org.openmbee.mms.elastic.NodeElasticDAOImpl.findAllById(NodeElasticDAOImpl.java:51)
at org.openmbee.mms.crud.services.NodeOperation.initInfoFromNodes(NodeOperation.java:95)
at org.openmbee.mms.crud.services.NodeGetHelper.processGetJsonFromNodes(NodeGetHelper.java:35)
at org.openmbee.mms.crud.services.NodeGetHelper.processGetJsonFromNodes(NodeGetHelper.java:71)
at org.openmbee.mms.crud.services.DefaultNodeService.lambda$readAsStream$0(DefaultNodeService.java:134)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
at java.base/java.util.stream.IntStream$2.forEachRemaining(IntStream.java:1040)
at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:711)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at org.openmbee.mms.crud.services.DefaultNodeService.readAsStream(DefaultNodeService.java:127)
at org.openmbee.mms.crud.controllers.elements.ElementsController.lambda$getAllElements$0(ElementsController.java:88)
at org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBodyReturnValueHandler$StreamingResponseBodyTask.call(StreamingResponseBodyReturnValueHandler.java:111)
at org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBodyReturnValueHandler$StreamingResponseBodyTask.call(StreamingResponseBodyReturnValueHandler.java:98)
at org.springframework.web.context.request.async.WebAsyncManager.lambda$startCallableProcessing$4(WebAsyncManager.java:337)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.fasterxml.jackson.core.exc.StreamConstraintsException: String length (5046272) exceeds the maximum length (5000000)
at com.fasterxml.jackson.core.StreamReadConstraints.validateStringLength(StreamReadConstraints.java:290)
at com.fasterxml.jackson.core.util.ReadConstrainedTextBuffer.validateStringLength(ReadConstrainedTextBuffer.java:27)
at com.fasterxml.jackson.core.util.TextBuffer.finishCurrentSegment(TextBuffer.java:931)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2584)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString(UTF8StreamJsonParser.java:2529)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getTextCharacters(UTF8StreamJsonParser.java:487)
at com.fasterxml.jackson.core.JsonGenerator._copyCurrentStringValue(JsonGenerator.java:2777)
at com.fasterxml.jackson.core.JsonGenerator._copyCurrentContents(JsonGenerator.java:2668)
at com.fasterxml.jackson.core.JsonGenerator.copyCurrentStructure(JsonGenerator.java:2619)
at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.copyCurrentStructure(JsonXContentGenerator.java:418)
at org.elasticsearch.common.xcontent.XContentBuilder.copyCurrentStructure(XContentBuilder.java:997)
at org.elasticsearch.index.get.GetResult.fromXContentEmbedded(GetResult.java:374)
at org.elasticsearch.action.get.MultiGetResponse.parseItem(MultiGetResponse.java:206)
at org.elasticsearch.action.get.MultiGetResponse.fromXContent(MultiGetResponse.java:177)
at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1897)
at org.elasticsearch.client.RestHighLevelClient.lambda$performRequestAndParseEntity$8(RestHighLevelClient.java:1552)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1628)
... 30 common frames omitted
Suppressed: java.lang.IllegalStateException: Failed to close the XContentBuilder
at org.elasticsearch.common.xcontent.XContentBuilder.close(XContentBuilder.java:1011)
at org.elasticsearch.index.get.GetResult.fromXContentEmbedded(GetResult.java:371)
... 35 common frames omitted
Caused by: java.io.IOException: Unclosed object or array found
at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.close(JsonXContentGenerator.java:469)
at org.elasticsearch.common.xcontent.XContentBuilder.close(XContentBuilder.java:1009)
... 36 common frames omitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant