I'm trying to unmarshal a knowledge session that has been persisted to file, but I get
the following exception:
Stack Trace:
com.google.protobuf.InvalidProtocolBufferException: Protocol message was too large. May be
malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.
at com.google.protobuf.InvalidProtocolBufferException.sizeLimitExceeded:89
at com.google.protobuf.CodedInputStream.refillBuffer:720
at com.google.protobuf.CodedInputStream.isAtEnd:666
at com.google.protobuf.CodedInputStream.readTag:99
at org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom:967
at org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom:773
at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom:212
at com.google.protobuf.AbstractMessage$Builder.mergeFrom:746
at org.drools.marshalling.impl.ProtobufMessages$Header.parseFrom:724
at org.drools.marshalling.impl.PersisterHelper.readFromStreamWithHeader:234
at org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession:217
at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession:107
at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall:143
The session consists of >1M facts, and the file is ~167 MB in size.
While Googling, I stumbled upon the recommendation to run
CodedInputStream.resetSizeCounter() inbetween deserializing messages. Is this a fix that
could be implemented in Drools?
Is there any way of configuring or parameterizing the unmarshalling size limit used by
Drools?