[infinispan-issues] [JBoss JIRA] (ISPN-7405) DMR operation register-proto-schemas fails with NPE if the proto file has syntax errors
Pedro Ruivo (JIRA)
issues at jboss.org
Fri Jan 27 10:30:01 EST 2017
[ https://issues.jboss.org/browse/ISPN-7405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13354434#comment-13354434 ]
Pedro Ruivo commented on ISPN-7405:
-----------------------------------
[~anistor], I've digging a little bit in it. This are my findings:
In Alpha4, the operation fails in runtime with {{java.lang.IllegalStateException: Syntax error in myFileWithSyntaxErrors.proto at 1:7: unexpected label: kaboom}}.
However, in Beta1, things changed. When it fails, it started to invoke {{ProgressCallback.handleError}}. However, this method tries to store in the cache and creates a put command with {{null}} {{Metadata}}. When the cache-store tries to fetch the lifespan, the metadata is null and the NPE is thrown.
I've made a patch for it [1] and it seems to work based on your description. Pick it up and try with your tests.
[1] https://github.com/pruivo/infinispan/tree/t_7405
> DMR operation register-proto-schemas fails with NPE if the proto file has syntax errors
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-7405
> URL: https://issues.jboss.org/browse/ISPN-7405
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Querying, Server
> Affects Versions: 9.0.0.Beta2
> Reporter: Adrian Nistor
> Priority: Blocker
> Fix For: 9.0.0.CR1
>
> Attachments: error.log
>
>
> Start an infinispan server and run the following CLI command:
> ./bin/ispn-cli.sh -c '/subsystem=datagrid-infinispan/cache-container=local:register-proto-schemas(file-names=[myFileWithSyntaxErrors.proto], file-contents=[kaboom])'
> since the file has syntax errors it should still be placed in the ___protobuf_metadata cache and a myFileWithSyntaxErrors.proto.errors key should also be created. No exception should be thrown. Currently no key is written in cache and the NPE from the attached log happens.
> When registering a proper file without syntax errors this works correctly.
> The problem disappears if I disable global state persistence, so the cachestore seems to play a role in this.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the infinispan-issues
mailing list