[rules-users] com.google.protobuf.InvalidProtocolBufferException thrown when deserializing

Wolfgang Laun wolfgang.laun at gmail.com
Mon Jul 23 07:41:13 EDT 2012


Looks like a com.google limit to me.
-W

On 23/07/2012, chrisLi <shengtao0077 at 163.com> wrote:
> Hi Droolers,
>
>     I am using DroolsObjectOutputStream/DroolsObjectInputStream to
> serialize/deserialzie a Stateful
>
> knowledgeSession. The process of serialziation worked well and the size of
> the file containing the serialzied
>
> infomation is about 150M. However, when I tried to deserialize the file
> into
> a session, I got an exception. The
>
> stacktrace of the exception is as follows:
>
>  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(InvalidProtocolBufferException.java:89)
> 	at
> com.google.protobuf.CodedInputStream.refillBuffer(CodedInputStream.java:720)
> 	at com.google.protobuf.CodedInputStream.isAtEnd(CodedInputStream.java:666)
> 	at com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:99)
> 	at
> org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom(ProtobufMessages.java:963)
> 	at
> org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom(ProtobufMessages.java:769)
> 	at
> com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:212)
> 	at
> com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:746)
> 	at
> org.drools.marshalling.impl.ProtobufMessages$Header.parseFrom(ProtobufMessages.java:720)
> 	at
> org.drools.marshalling.impl.PersisterHelper.readFromStreamWithHeader(PersisterHelper.java:234)
> 	at
> org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:221)
> 	at
> org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
> 	at
> org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
> 	at com.sample.engine.CepEngine.deserialize(CepEngine.java:308)
> 	at com.sample.engine.CepEngine.<init>(CepEngine.java:77)
> 	at com.sample.test.EventDataConsumer.<init>(EventDataConsumer.java:19)
> 	at com.sample.test.CepTimeTest.main(CepTimeTest.java:19)
> Exception in thread "main" java.lang.NullPointerException
> 	at com.sample.engine.CepEngine.initCommons(CepEngine.java:138)
> 	at com.sample.engine.CepEngine.<init>(CepEngine.java:90)
> 	at com.sample.test.EventDataConsumer.<init>(EventDataConsumer.java:19)
> 	at com.sample.test.CepTimeTest.main(CepTimeTest.java:19)
>
>
> It seems that some code of drools set the size limit of deserialized file.
> Thus, where can I set the size limit
>
> to meet my needs? Is there a configuration file I can use?
>
> Thank you very much. Any response will be appreciated.
>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/com-google-protobuf-InvalidProtocolBufferException-thrown-when-deserializing-tp4018822.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list