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 case of null_value creation with value as null #7273

Closed
julianhille opened this Issue Aug 14, 2014 · 1 comment

Comments

Projects
None yet
5 participants
@julianhille
Copy link

commented Aug 14, 2014

Hey,

as we tried to understand the missing filter
we came across a null pointer exception in creating a default null_value in the mapping.

The NPE is thrown if we try to set the "null_value" to null.

PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
@cfontes

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2014

I can try.

Is there anything else that can be provided? A ErrorStack maybe?

Cheers.

@polyfractal polyfractal self-assigned this Oct 3, 2014

polyfractal added a commit that referenced this issue Oct 10, 2014

Mapper: Throw exception if null_value is set to null
The mapping parser should throw an exception if "null_value" is set to `null`.

Fixes #7273

```bash
PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
```
```
{
   "error": "MapperParsingException[mapping [bar]]; nested: MapperParsingException[Property [null_value] cannot be null.]; ",
   "status": 400
}
```

polyfractal added a commit that referenced this issue Oct 10, 2014

Mapper: Throw exception if null_value is set to null
The mapping parser should throw an exception if "null_value" is set to `null`.

Fixes #7273

```bash
PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
```
```
{
   "error": "MapperParsingException[mapping [bar]]; nested: MapperParsingException[Property [null_value] cannot be null.]; ",
   "status": 400
}
```

polyfractal added a commit that referenced this issue Oct 10, 2014

Mapper: Throw exception if null_value is set to null
The mapping parser should throw an exception if "null_value" is set to `null`.

Fixes #7273

```bash
PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
```
```
{
   "error": "MapperParsingException[mapping [bar]]; nested: MapperParsingException[Property [null_value] cannot be null.]; ",
   "status": 400
}
```

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Mapper: Throw exception if null_value is set to null
The mapping parser should throw an exception if "null_value" is set to `null`.

Fixes elastic#7273

```bash
PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
```
```
{
   "error": "MapperParsingException[mapping [bar]]; nested: MapperParsingException[Property [null_value] cannot be null.]; ",
   "status": 400
}
```

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Mapper: Throw exception if null_value is set to null
The mapping parser should throw an exception if "null_value" is set to `null`.

Fixes elastic#7273

```bash
PUT /foo
{
  "mappings": {
    "bar": {
      "properties": {
        "exception": {
          "null_value": null,
          "type": "integer"
        }
      }
    }
  }
}
```
```
{
   "error": "MapperParsingException[mapping [bar]]; nested: MapperParsingException[Property [null_value] cannot be null.]; ",
   "status": 400
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.