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

NPE in HBaseClient.fetchEntity() when no results are available #726

Closed
monkegoist opened this issue Mar 18, 2015 · 4 comments
Closed

NPE in HBaseClient.fetchEntity() when no results are available #726

monkegoist opened this issue Mar 18, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@monkegoist
Copy link

Null-check is missing in fetchEntity() method:

results = handler.readData(tableName, subEntityMetadata.getEntityClazz(), subEntityMetadata, 
    rowId, subEntityMetadata.getRelationNames(), filter, columns);
// Result will not be empty for match sub entity.
if (!results.isEmpty()) { <-- NPE here
    break;
}

This happens when query doesn't return any results (for example, I try to find user with non-existent name). See HBaseDataHandler#onRead(): output is null, results is empty.

Reproduced in 2.15.1, but as far as I can see, this is also actual for 2.16.

@pragalbhgarg
Copy link
Collaborator

@monkegoist
The part of code which you mentioned is for the JPA Inheritence implementation which is yet under development for kundera-hbase-v2. Hence, you might be facing such issues. We are actively working on it and will fix all such issues as soon as possible. Thanks for letting us know about the bug.

@monkegoist
Copy link
Author

@pragalbhgarg I see, thanks for your reply. Any insights on when you're planning to release fix version? So far, I just added null check and this seems to fix the issue.

@pragalbhgarg pragalbhgarg self-assigned this Mar 18, 2015
pragalbhgarg pushed a commit that referenced this issue Mar 19, 2015
@pragalbhgarg
Copy link
Collaborator

@monkegoist
We are planning on a patch release by mid April. Also, we have fixed the NPE in the trunk and will fix other related issues soon. We will notify you as we do that.

@pragalbhgarg pragalbhgarg added Fixed and removed Fix labels Mar 19, 2015
@chhavigangwal chhavigangwal added this to the 3.0 milestone Apr 14, 2015
@chhavigangwal
Copy link
Collaborator

Fixed with Kundera -2.17 release.

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

No branches or pull requests

3 participants