[CONTROLLER-1058] IdentityValuesDTO cannot be cast to java.lang.String Created: 03/Dec/14 Updated: 25/Jul/23 Resolved: 03/Mar/15 |
|
| Status: | Verified |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jozef Gloncak | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 2468 |
| Description |
|
while executing this curl ,"endpoints-obj":{"ipv4":{"source-ipv4-address":"39.39.39.39","destination-ipv4-address":"43.43.43.43"}},"ero":{"subobject":[{"loose":false,"ip-prefix":{"ip-prefix":"195.20.160.40/32"}},{"loose":false,"ip-prefix":{"ip-prefix":"201.20.160.43/32"}},{"loose":false,"ip-prefix":{"ip-prefix":"43.43.43.43/32"}}]}}}}' 127.0.0.1:8181/restconf/operations/network-topology-pcep:add-lsp following exception was returned |
| Comments |
| Comment by Jozef Gloncak [ 03/Dec/14 ] | ||
|
Attachment karaf_20141202.log.xz has been added with description: logfile | ||
| Comment by Jozef Gloncak [ 03/Dec/14 ] | ||
|
It looks like translation from IdentityValuesDTO to YangInstanceIdentifier wasn't successful in method RestconfImpl.normalizeSimpleNode() (if deserialization returns null then original value - IdentityValuesDTO instance - is returned.) I checked deserialization() method for InstanceIdentifier. If null value is returned then also log entry "Instance-identifier will be translated as NULL for data..." at INFO level is logged. I searched for this log message in provided logfile but nothing was found (log file in attachment). It is also possible to get null as return value without log entry if IdentityValueDTO contains no data. I suppose that this isn't this case because there should be following data (from input CURL): It was also reported that this problem wasn't present on There is only one commit which was merged at this time and relates with sal-rest-connector - https://git.opendaylight.org/gerrit/#/c/12524/11 - but it doesn't change anything related with instance-identifier. | ||
| Comment by Vratko Polak [ 03/Dec/14 ] | ||
|
The curl command in the description is missing dash between "POST " and "H ". Attached log from recent build of master branch, mostly INFO but at critical point TRACE. To my eye, this looks as first suspicious message: 2014-12-03 15:57:12,481 | DEBUG | ogy-pcep:add-lsp | SchemaContextUtil
and then this sequence looks to be the main symptom: 2014-12-03 15:57:12,953 | DEBUG | ogy-pcep:add-lsp | InstanceIdentifierCodecImpl | 114 - org.opendaylight.yangtools.binding-generator-impl - 0.7.0.SNAPSHOT | DOM Instance Identifier /(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)network-topology/topology[ {(urn:TBD:params:xml:ns:yang:network-topology?revision=2013-10-21)topology-id=pcep-topology}] deserialized to KeyedInstanceIdentifier {targetType=interface org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey [_topologyId=Uri [_value=pcep-topology]]]]}2014-12-03 15:57:12,954 | WARN | ogy-pcep:add-lsp | ntimeGeneratedMappingServiceImpl | 114 - org.opendaylight.yangtools.binding-generator-impl - 0.7.0.SNAPSHOT | Failed to deserialize path InstanceIdentifier {targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.AddLspInput, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.AddLspInput]}data Node[MutableCompositeNodeTOImpl], qName[input], modify[n/a], children.size = 4 | ||
| Comment by Vratko Polak [ 03/Dec/14 ] | ||
|
Attachment trace_20141203.log.xz has been added with description: compressed karaf.log | ||
| Comment by Jozef Gloncak [ 16/Dec/14 ] | ||
|
This two patches should solve this issue |