<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:09:14 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[MDSAL-253] BindingToNormalizedNodeCodec fails to deserialize union of leafrefs</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-253</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Here is model example:&lt;/p&gt;

&lt;p&gt;    typedef name1-ref {&lt;br/&gt;
        type leafref &lt;/p&gt;
{
            path &quot;/tst:top/tst:name1&quot;;
        }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;    typedef name2-ref {&lt;br/&gt;
        type leafref &lt;/p&gt;
{
            path &quot;/tst:top/tst:name2&quot;;
        }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;    container top {&lt;br/&gt;
        leaf name1 &lt;/p&gt;
{
            type string;
        }&lt;br/&gt;
        leaf name2 {            type string;        }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;    container cont {&lt;br/&gt;
        leaf ref {&lt;br/&gt;
            type union &lt;/p&gt;
{
                type name1-ref;
                type name2-ref;
            }
&lt;p&gt;            mandatory true;&lt;br/&gt;
        }&lt;br/&gt;
    }&lt;/p&gt;

&lt;p&gt;Deserializing:&lt;/p&gt;

&lt;p&gt;    &quot;cont&quot;:&lt;/p&gt;
    {
    	&quot;ref&quot;: &quot;some-name&quot;
    }

&lt;p&gt;Gives following exception:&lt;br/&gt;
2017-05-15 13:45:14.761 CEST &lt;span class=&quot;error&quot;&gt;&amp;#91;qtp114012533-50&amp;#93;&lt;/span&gt; WARN  o.e.jetty.servlet.ServletHandler - /restconf/config/test:cont/&lt;br/&gt;
java.lang.IllegalStateException: Unable to load codec for class org.opendaylight.yang.gen.v1.urn.test.rev170101.Cont$Ref&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecForBindingClass(BindingCodecContext.java:306) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.3-Boron-SR3.jar:na&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Caused by: java.lang.NoSuchMethodException: org.opendaylight.yang.gen.v1.urn.test.rev170101.Cont$Ref.getName1Ref()&lt;br/&gt;
	at java.lang.Class.getMethod(Class.java:1786) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:1.8.0_45-internal&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.lambda$loader$0(UnionTypeCodec.java:33) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.3-Boron-SR3.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec$$Lambda$106/1574798546.call(Unknown Source) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecForBindingClass(BindingCodecContext.java:304) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.3-Boron-SR3.jar:na&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Full trace included.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27075">MDSAL-253</key>
            <summary>BindingToNormalizedNodeCodec fails to deserialize union of leafrefs</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="mgradzki">Marek Gradzki</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 May 2017 12:22:41 +0000</created>
                <updated>Thu, 1 Mar 2018 11:45:32 +0000</updated>
                            <resolved>Thu, 1 Mar 2018 11:45:32 +0000</resolved>
                                                    <fixVersion>Fluorine</fixVersion>
                                    <component>Binding codegen</component>
                    <component>Binding V2 codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="54677" author="mgradzki@cisco.com" created="Mon, 15 May 2017 12:25:08 +0000"  >&lt;p&gt;Attachment honeycomb.log.txt has been added with description: honeycomb log&lt;/p&gt;</comment>
                            <comment id="54670" author="jatoth@cisco.com" created="Mon, 22 May 2017 11:46:53 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;can you try this patch, please ?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/57619/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/57619/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know about results, please.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="54671" author="mgradzki@cisco.com" created="Tue, 23 May 2017 07:44:09 +0000"  >&lt;p&gt;It works for the example I attached. But the underlying issue we had was with following model:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gerrit.fd.io/r/#/c/6658/2/v3po/api/src/main/yang/unnumbered-interfaces.yang@26&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gerrit.fd.io/r/#/c/6658/2/v3po/api/src/main/yang/unnumbered-interfaces.yang@26&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this is still failing, but with different exception:&lt;br/&gt;
java.lang.IllegalStateException: Unable to load codec for class org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.unnumbered.interfaces.rev170510.unnumbered.config.attributes.Unnumbered$Use&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecForBindingClass(BindingCodecContext.java:306) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.4-SNAPSHOT.jar:na&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Caused by: java.lang.NoSuchMethodException: org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.unnumbered.interfaces.rev170510.unnumbered.config.attributes.Unnumbered$Use.getUint32UseValue()&lt;br/&gt;
	at java.lang.Class.getMethod(Class.java:1786) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:1.8.0_45-internal&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.lambda$loader$1(UnionTypeCodec.java:57) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.4-SNAPSHOT.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec$$Lambda$144/1975802955.call(Unknown Source) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecForBindingClass(BindingCodecContext.java:304) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.4-SNAPSHOT.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
	... 75 common frames omitted&lt;/p&gt;</comment>
                            <comment id="54672" author="jatoth@cisco.com" created="Tue, 23 May 2017 13:04:47 +0000"  >&lt;p&gt;(In reply to Marek Gradzki from comment #3)&lt;br/&gt;
&amp;gt; It works for the example I attached. But the underlying issue we had was&lt;br/&gt;
&amp;gt; with following model:&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://gerrit.fd.io/r/#/c/6658/2/v3po/api/src/main/yang/unnumbered-&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gerrit.fd.io/r/#/c/6658/2/v3po/api/src/main/yang/unnumbered-&lt;/a&gt;&lt;br/&gt;
&amp;gt; interfaces.yang@26&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; And this is still failing, but with different exception:&lt;br/&gt;
&amp;gt; java.lang.IllegalStateException: Unable to load codec for class&lt;br/&gt;
&amp;gt; org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.unnumbered.&lt;br/&gt;
&amp;gt; interfaces.rev170510.unnumbered.config.attributes.Unnumbered$Use&lt;br/&gt;
&amp;gt; 	at&lt;br/&gt;
&amp;gt; org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.&lt;br/&gt;
&amp;gt; getCodecForBindingClass(BindingCodecContext.java:306)&lt;br/&gt;
&amp;gt; ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.4-SNAPSHOT.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; 	&lt;br/&gt;
&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Caused by: java.lang.NoSuchMethodException:&lt;br/&gt;
&amp;gt; org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.unnumbered.&lt;br/&gt;
&amp;gt; interfaces.rev170510.unnumbered.config.attributes.Unnumbered$Use.&lt;br/&gt;
&amp;gt; getUint32UseValue()&lt;br/&gt;
&amp;gt; 	at java.lang.Class.getMethod(Class.java:1786) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:1.8.0_45-internal&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; 	at&lt;br/&gt;
&amp;gt; org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.&lt;br/&gt;
&amp;gt; lambda$loader$1(UnionTypeCodec.java:57)&lt;br/&gt;
&amp;gt; ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.4-SNAPSHOT.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; 	at&lt;br/&gt;
&amp;gt; org.opendaylight.yangtools.binding.data.codec.impl.&lt;br/&gt;
&amp;gt; UnionTypeCodec$$Lambda$144/1975802955.call(Unknown Source) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;na:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; 	at&lt;br/&gt;
&amp;gt; org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.&lt;br/&gt;
&amp;gt; getCodecForBindingClass(BindingCodecContext.java:304)&lt;br/&gt;
&amp;gt; ~&lt;span class=&quot;error&quot;&gt;&amp;#91;mdsal-binding-dom-codec-0.9.4-SNAPSHOT.jar:na&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; 	... 75 common frames omitted&lt;/p&gt;

&lt;p&gt;OK, fixed. I missed to do conversion of YANG type to Java type.&lt;/p&gt;</comment>
                            <comment id="54673" author="mgradzki@cisco.com" created="Tue, 23 May 2017 15:23:31 +0000"  >&lt;p&gt;Thanks. Retested and it works now.&lt;/p&gt;</comment>
                            <comment id="54674" author="martin.ciglan" created="Mon, 12 Jun 2017 07:05:48 +0000"  >&lt;p&gt;at some point, this needs cherry-pick to Carbon for binding spec v1. Back to CONFIRMED&lt;/p&gt;</comment>
                            <comment id="54675" author="jatoth@cisco.com" created="Fri, 21 Jul 2017 13:42:54 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60631/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60631/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="54676" author="jatoth@cisco.com" created="Mon, 24 Jul 2017 20:34:45 +0000"  >&lt;p&gt;+ master: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/60698/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/60698/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="60881" author="rovarga" created="Tue, 30 Jan 2018 23:57:50 +0000"  >&lt;p&gt;Binding V2 is not fixed, the patch needs to be ported.&lt;/p&gt;</comment>
                            <comment id="60960" author="jiehan2017" created="Wed, 7 Feb 2018 01:53:23 +0000"  >&lt;p&gt;Binding v2: &lt;a href=&quot;https://git.opendaylight.org/gerrit/67990&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/67990&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="29135">MDSAL-304</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="27091">MDSAL-269</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13826" name="honeycomb.log.txt" size="30063" author="mgradzki" created="Mon, 15 May 2017 12:25:08 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8449</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=8449]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10320"><![CDATA[Nitrogen]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10301"><![CDATA[Normal]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02x9b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>