[YANGTOOLS-827] NullPointerException Created: 30/Oct/17 Updated: 21/Jun/18 Resolved: 20/Nov/17 |
|
| Status: | Verified |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | 1.2.0, 1.1.2, 1.0.4 |
| Fix Version/s: | 2.0.0, 1.2.1, 1.1.3 |
| Type: | Bug | Priority: | High |
| Reporter: | Claudio David Gasparini | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Adding a new version for a data yang model [0][1] ends with NPE[2] on tests [0] https://git.opendaylight.org/gerrit/#/c/64865/1 [2] |
| Comments |
| Comment by Robert Varga [ 07/Nov/17 ] |
|
This is reproducible and is related to ordering of revisions. If they are correctly ordered according to https://tools.ietf.org/html/rfc7950#section-7.1.9 everything works okay. When they are not, as is the case in the above patches, things break. The problem is either in mdsal infra or yangtools. |
| Comment by Claudio David Gasparini [ 07/Nov/17 ] |
|
Running node against pcc-mock will throw 2017-11-07 17:42:44,827 | INFO | config-pusher | ConfigPusherImpl | 213 - org.opendaylight.controller.config-persister-impl - 0.8.0.SNAPSHOT | All configuration snapshots have been pushed successfully. |
| Comment by Robert Varga [ 07/Nov/17 ] |
|
It seems org.opendaylight.yangtools.yang.parser.impl.util.YangModelDependencyInfo is the culprit here. What is happening is that the module revision is satisfied by the first statement and not updated, leading YangTextSchemaContextResolver to believe the model cannot be resolved, which in turn leads to it being excluded. This leads to a schemacontext which does not actually represent the correct view of models, leading to the NPE. |
| Comment by Robert Varga [ 07/Nov/17 ] |
|
carbon: https://git.opendaylight.org/gerrit/65279 |
| Comment by Michael Vorburger [ 21/Jun/18 ] |
|
something similar looking in MDSAL-354 |