JanusGraph / JanusGraph/janusgraph

Throw an NullPointerException error when querying with valueMap()

Open
#1,812 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

we have create a schema and add some vertexes in Janusgraph. For example,

![捕获](https://user-images.githubusercontent.com/32957961/65753098-d3dad000-e140-11e9-8492-53e40e026ac8.PNG)

However, when we want to adjust the schema structure and remove some PropertyKey like:
mgmt.getPropertyKey('age').remove().
An NullPointerException error was thrown while querying with valueMap() after this operation in the Gremlin console,
![捕获2](https://user-images.githubusercontent.com/32957961/65753084-c9b8d180-e140-11e9-8941-41d113b6be3a.PNG)
So, how to fix this problem? thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the schema setup in the Gremlin console, including removing the `age` PropertyKey with `mgmt.getPropertyKey('age').remove()`, then query with `valueMap()` and capture the full stack trace. Done means the same query no longer throws a NullPointerException after the property is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.