[CONTROLLER-143] MD-SAL not unmarshalling not yet seen Identifiers Created: 29/Jan/14 Updated: 25/Jul/23 Resolved: 25/Feb/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | David Bainbridge | Assignee: | Maros Marsalek |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Issue Links: |
|
||||||||
| External issue ID: | 388 | ||||||||
| Description |
|
Using the toaster sample and the release distribution, when I issue a request to "make-toast" a null pointer exception is being thrown in org.opendaylight.controller.sample.toaster.provider.OpendaylightToaster.logToastInput(OpendaylightToaster.java:100). It appears the the toasterToastType input parameter is not correctly be marshalled as the value in the internal structure is even though it has been set on the API call. The toasterDoneness value is being marshalled correctly. My concern is that this may mean that general marshalling for the RESTCONF interface is not working correctly. The API is being invoked using the following curl: curl -v -H "Content-Type: application/vnd.yang.operation+json" -XPOST http://admin:admin@localhost:8080/restconf/operations/toaster:make-toast -d '{ "input" : { "toasterDoneness" : 3, "toasterToastType" : "white-bread" }}' |
| Comments |
| Comment by Martin Sunal [ 04/Feb/14 ] |
|
This commit https://git.opendaylight.org/gerrit/#/c/5035/ added media types: I check also all arguments which are sent and all are correctly sent to transaction. If you still get NPE then a problem is in another component and bug should be moved to MD-SAL. |
| Comment by David Bainbridge [ 07/Feb/14 ] |
|
Traces this down to ValueWithQName in yang tools (LazyGeneratedCodecRegistry.java:544). The dynamically generated codec does not seem to be unmashaling the data correctly. |
| Comment by David Bainbridge [ 07/Feb/14 ] |
|
It seems to get the proper value from MutableCompositeNodeTOImpl, and the AbstractNodeTO returns the value as a QName |
| Comment by David Bainbridge [ 07/Feb/14 ] |
|
seems to note be able to find find a reference to the class WhiteBread at line 960 in LazyGeneratedCodecRegistry.java. |
| Comment by Tony Tkacik [ 19/Feb/14 ] |
|
Fix is submitted to code review: https://git.opendaylight.org/gerrit/#/c/5414/ |
| Comment by David Bainbridge [ 20/Feb/14 ] |
|
I just pulled a fresh clone of the controller. Did a git fetch https://git.opendaylight.org/gerrit/controller refs/changes/14/5414/2 && git checkout FETCH_HEAD to git this patch merged into my source. Removed $HOME/.m2/respository/org. Did a mvn -U -DskipTests clean install. Ran the new build and attempted: } |
| Comment by Tony Tkacik [ 25/Feb/14 ] |
|
Original bug is fixed. Opened followup |