<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:37 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>[CONTROLLER-679] Restconf cannot deserialize leaf whose type is defined in another module</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-679</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;Define two yang models as follows&lt;/p&gt;

&lt;p&gt;types.yang &lt;br/&gt;
==============&lt;/p&gt;

&lt;p&gt;module types {&lt;br/&gt;
  namespace     &lt;br/&gt;
    &quot;urn:ping:params:xml:ns:yang:types&quot;;&lt;br/&gt;
  prefix&lt;br/&gt;
    &quot;types&quot;;&lt;/p&gt;

&lt;p&gt;  description &lt;br/&gt;
    &quot;Types and Groupings&quot;;&lt;/p&gt;

&lt;p&gt;  revision 2014-07-05 &lt;/p&gt;
{
    description
      &quot;Initial version.&quot;;
  }&lt;br/&gt;
&lt;br/&gt;
  typedef Name {&lt;br/&gt;
    type string {
      length &quot;1..64&quot;;
      
    }&lt;br/&gt;
    description&lt;br/&gt;
      &quot;This data type is used to model a name &quot;;&lt;br/&gt;
  }&lt;br/&gt;
}&lt;br/&gt;
&lt;br/&gt;
test.yang&lt;br/&gt;
========&lt;br/&gt;
&lt;br/&gt;
module test {&lt;br/&gt;
  namespace     &lt;br/&gt;
    &quot;urn:ping:params:xml:ns:yang:test&quot;;&lt;br/&gt;
  prefix&lt;br/&gt;
    &quot;test&quot;;&lt;br/&gt;
  import types { prefix &quot;types&quot;; }&lt;br/&gt;
  description &lt;br/&gt;
    &quot;Test &quot;;&lt;br/&gt;
&lt;br/&gt;
  revision 2014-07-05 {    description      &quot;Initial version.&quot;;  }

&lt;p&gt;  container test-container {&lt;br/&gt;
       leaf test-name &lt;/p&gt;
{
         type test:Name;
    }
&lt;p&gt;}&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Now try to set via restconf - &lt;br/&gt;
&amp;lt;test-container&amp;gt;&lt;br/&gt;
&amp;lt;test-name&amp;gt;Blah&lt;br/&gt;
&amp;lt;/test-name&amp;gt;&lt;br/&gt;
&amp;lt;test-container&amp;gt;&lt;/p&gt;

&lt;p&gt;org.opendaylight.yangtools.yang.binding.util.ClassLoaderUtils.loadClass fails with java.lang.ClassNotFoundException. This is because SAl is searching the package of &quot;test&quot; for &quot;types&quot; class.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25233">CONTROLLER-679</key>
            <summary>Restconf cannot deserialize leaf whose type is defined in another module</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="10003">Cannot Reproduce</resolution>
                                        <assignee username="ashwin.pankaj@hotmail.com">Ashwin Pankaj</assignee>
                                    <reporter username="ashwin.pankaj@hotmail.com">Ashwin Pankaj</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Aug 2014 08:24:15 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:04 +0000</updated>
                            <resolved>Thu, 14 Aug 2014 04:29:35 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="48836" author="jgloncak" created="Tue, 12 Aug 2014 10:56:52 +0000"  >&lt;p&gt;I am just guessing. Couldn&apos;t be problem that you are reffering module types in module test via incorrect prefix (test:Name instead of types:Name)&lt;/p&gt;

&lt;p&gt;  container test-container {&lt;br/&gt;
       leaf test-name &lt;/p&gt;
{
         type test:Name;
    }
&lt;p&gt;}&lt;/p&gt;</comment>
                            <comment id="48837" author="ashwin.pankaj@hotmail.com" created="Tue, 12 Aug 2014 11:21:56 +0000"  >&lt;p&gt;That was a typo.&lt;/p&gt;</comment>
                            <comment id="48838" author="jgloncak" created="Tue, 12 Aug 2014 11:23:28 +0000"  >&lt;p&gt;(In reply to Ashwin Pankaj from comment #2)&lt;br/&gt;
&amp;gt; That was a typo.&lt;/p&gt;

&lt;p&gt;does it mean that now it is ok or that it was typo here in bugzila and problem still exist?&lt;/p&gt;</comment>
                            <comment id="48839" author="jhajnar@cisco.com" created="Tue, 12 Aug 2014 12:54:13 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;After trying with today&apos;s build (August 12th) and correcting errors in your input and model:&lt;br/&gt;
type test:Name -&amp;gt; type types:Name, &lt;br/&gt;
last line of input &amp;lt;test-container&amp;gt; -&amp;gt; &amp;lt;/test-container&amp;gt;&lt;br/&gt;
everything works as expected. &lt;/p&gt;

&lt;p&gt;path: &lt;br/&gt;
PUT &lt;a href=&quot;http://localhost:8080/restconf/config/test:test-container/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/config/test:test-container/&lt;/a&gt;&lt;br/&gt;
data:&lt;br/&gt;
&amp;lt;test-container&amp;gt;&lt;br/&gt;
&amp;lt;test-name&amp;gt;Blah&lt;br/&gt;
&amp;lt;/test-name&amp;gt;&lt;br/&gt;
&amp;lt;/test-container&amp;gt;&lt;/p&gt;

&lt;p&gt;path:&lt;br/&gt;
GET &lt;a href=&quot;http://localhost:8080/restconf/config/test:test-container/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8080/restconf/config/test:test-container/&lt;/a&gt;&lt;br/&gt;
returns&lt;br/&gt;
&amp;lt;test-container xmlns=&quot;urn:ping:params:xml:ns:yang:test&quot;&amp;gt;&lt;br/&gt;
&amp;lt;test-name&amp;gt;Blah&amp;lt;/test-name&amp;gt;&lt;br/&gt;
&amp;lt;/test-container&amp;gt;&lt;/p&gt;

&lt;p&gt;Please provide feedback if this issue is fixed or still persists.&lt;/p&gt;</comment>
                            <comment id="48840" author="ashwin.pankaj@hotmail.com" created="Wed, 13 Aug 2014 04:30:13 +0000"  >&lt;p&gt;I am sorry I forgot to add one important detail - the exception occurs when a registered org.opendaylight,controller.md.sal.binding.api.DataChangelistener  tries to retrieve the updates to the config store using getupdatedData.&lt;/p&gt;

&lt;p&gt;I have attached a sample stack trace.&lt;/p&gt;</comment>
                            <comment id="48842" author="ashwin.pankaj@hotmail.com" created="Wed, 13 Aug 2014 04:31:05 +0000"  >&lt;p&gt;Attachment stack_trace.png has been added with description: stack trace&lt;/p&gt;</comment>
                            <comment id="48841" author="ashwin.pankaj@hotmail.com" created="Thu, 14 Aug 2014 04:29:35 +0000"  >&lt;p&gt;The method suggested by Jan works for me.&lt;/p&gt;

&lt;p&gt;I was using DataBroker SAL service to register for changes. This would trigger events but I was not able to get updated data.&lt;/p&gt;

&lt;p&gt;The fix is to implement dataChangeListener as mentioned in &lt;a href=&quot;https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13401" name="stack_trace.png" size="70222" author="ashwin.pankaj@hotmail.com" created="Wed, 13 Aug 2014 04:31:05 +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>1528</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=1528]]></customfieldvalue>

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

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