diff --git a/integration/integration_test.py b/integration/integration_test.py index 417354bc83d9e..77510daecc0b4 100644 --- a/integration/integration_test.py +++ b/integration/integration_test.py @@ -648,7 +648,7 @@ def get_static_json_files(): def run_all_tests(debug=False): - testers = [JavaTester(debug=debug), CPPTester(debug=debug)] + testers = [CPPTester(debug=debug), JavaTester(debug=debug)] static_json_files = get_static_json_files() generated_json_files = get_generated_json_files() json_files = static_json_files + generated_json_files diff --git a/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java b/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java index 02bfd6b09755c..1c570b4011781 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/stream/MessageSerializer.java @@ -183,9 +183,10 @@ public static ArrowRecordBatch deserializeRecordBatch(ReadChannel in, ArrowBlock ArrowBuf metadataBuffer = buffer.slice(4, block.getMetadataLength() - 4); - // Read the metadata. - RecordBatch recordBatchFB = - RecordBatch.getRootAsRecordBatch(metadataBuffer.nioBuffer().asReadOnlyBuffer()); + Message messageFB = + Message.getRootAsMessage(metadataBuffer.nioBuffer().asReadOnlyBuffer()); + + RecordBatch recordBatchFB = (RecordBatch) messageFB.header(new RecordBatch()); // Now read the body final ArrowBuf body = buffer.slice(block.getMetadataLength(),