Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
7759
-
High
Description
Deserialization fails with following exception:
Caused by: java.lang.IllegalArgumentException: Failed to construct instance of class org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any.Dot1qTag$VlanId for input 2420
at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:51) ~[mdsal-binding-dom-codec-0.9.2-Boron-SR2.jar:na]
at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199) ~[mdsal-binding-dom-codec-0.9.2-Boron-SR2.jar:na]
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:329) ~[mdsal-binding-dom-codec-0.9.2-Boron-SR2.jar:na]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148) ~[mdsal-binding-dom-codec-0.9.2-Boron-SR2.jar:na]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.bindingToString(LazyDataObject.java:205) ~[mdsal-binding-dom-codec-0.9.2-Boron-SR2.jar:na]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:65) ~[mdsal-binding-dom-codec-0.9.2-Boron-SR2.jar:na]
at com.sun.proxy.$Proxy117.toString(Unknown Source) ~[n
when I do
dot1qTag.getVlanId()
here is yang model:
https://git.fd.io/hc2vpp/tree/v3po/api/src/main/yang/dot1q-types.yang
after debugging, I found that
EncapsulatedValueCodec.deserialize()
fails because of
java.lang.ClassCastException: Cannot cast java.lang.String to java.lang.Integer
In case if I use analogous restconf request, DataObject is retrieved from cache
at LazyDataObject.getBindingData and deserialization is not invoked.
The same request works if we downgrade odl dependencies to Beryllium-SR2.
I noticed that in case of beryllium, the generated Dot1qTagVlanIdBuilder was invoked.