<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:19 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>[YANGTOOLS-122] Failed to maps instance-identifier (XML node) into Java InstanceIdentifier</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-122</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;java.lang.ClassCastException: java.lang.String cannot be cast to org.opendaylight.yangtools.yang.data.api.InstanceIdentifier&lt;/p&gt;

&lt;p&gt;yang module snippet:&lt;br/&gt;
leaf path {&lt;br/&gt;
   type instance-identifier;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;xml input snippet:&lt;br/&gt;
&amp;lt;path xmlns:topo=&quot;urn:TBD:params:xml:ns:yang:network-topology&quot;&amp;gt;/topo:network-topology/topo:topology&lt;span class=&quot;error&quot;&gt;&amp;#91;topo:topology-id=&amp;quot;pcep-topology&amp;quot;&amp;#93;&lt;/span&gt;&amp;lt;/path&amp;gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22542">YANGTOOLS-122</key>
            <summary>Failed to maps instance-identifier (XML node) into Java InstanceIdentifier</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="-1">Unassigned</assignee>
                                    <reporter username="milos.fabian@pantheon.tech">Milos Fabian</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Mar 2014 12:22:56 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:02 +0000</updated>
                            <resolved>Wed, 23 Apr 2014 09:10:36 +0000</resolved>
                                                                        <due>Tue, 15 Apr 2014 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="42683" author="milos.fabian@pantheon.tech" created="Wed, 26 Mar 2014 12:43:35 +0000"  >&lt;p&gt;test code:&lt;/p&gt;

&lt;p&gt;    private RuntimeGeneratedMappingServiceImpl mappingService;&lt;/p&gt;

&lt;p&gt;    @Before&lt;br/&gt;
    public void setup() &lt;/p&gt;
{
        this.mappingService = new RuntimeGeneratedMappingServiceImpl();
        this.mappingService.setPool(new ClassPool());
        this.mappingService.init();

        final ModuleInfoBackedContext moduleInfo = ModuleInfoBackedContext.create();
        moduleInfo.addModuleInfos(BindingReflections.loadModuleInfos());
        this.mappingService.onGlobalContextUpdated(moduleInfo.tryToCreateSchemaContext().get());
    }

&lt;p&gt;@Test&lt;br/&gt;
    public void testNotificationTransformation() throws Exception &lt;/p&gt;
{
        YangModuleInfo moduleInfo = BindingReflections.getModuleInfo(DataChangedNotification.class);
        Module module = mappingService.getSchemaContext().findModuleByName(moduleInfo.getName(),org.opendaylight.yangtools.yang.common.QName.parseRevision(moduleInfo.getRevision()));
        
        Document doc = XmlTools.fromXml(getClass().getClassLoader().getResourceAsStream(&quot;notification.xml&quot;));
        CompositeNode cn = XmlDocumentUtils.notificationToDomNodes(doc, Optional.of(module.getNotifications()));
        
        DataChangedNotification notification = (DataChangedNotification) this.mappingService.dataObjectFromDataDom(DataChangedNotification.class, cn);
        assertTrue(notification.getDataChangeEvent().size() &amp;gt; 0);
    }</comment>
                            <comment id="42691" author="milos.fabian@pantheon.tech" created="Wed, 26 Mar 2014 12:47:39 +0000"  >&lt;p&gt;Attachment notification.xml has been added with description: test input xml&lt;/p&gt;</comment>
                            <comment id="42692" author="milos.fabian@pantheon.tech" created="Wed, 26 Mar 2014 12:49:29 +0000"  >&lt;p&gt;Attachment RestconfUtilsTest.java has been added with description: test java class&lt;/p&gt;</comment>
                            <comment id="42684" author="milos.fabian@pantheon.tech" created="Wed, 26 Mar 2014 12:51:36 +0000"  >&lt;p&gt;(In reply to Milos Fabian from comment #3)&lt;br/&gt;
&amp;gt; Created attachment 79 &lt;span class=&quot;error&quot;&gt;&amp;#91;details&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;gt; test java class&lt;/p&gt;

&lt;p&gt;required dependency:&lt;br/&gt;
      &amp;lt;dependency&amp;gt;&lt;br/&gt;
      	&amp;lt;groupId&amp;gt;org.opendaylight.controller&amp;lt;/groupId&amp;gt;&lt;br/&gt;
      	&amp;lt;artifactId&amp;gt;sal-remote&amp;lt;/artifactId&amp;gt;&lt;br/&gt;
      	&amp;lt;version&amp;gt;1.1-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br/&gt;
      	&amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br/&gt;
      &amp;lt;/dependency&amp;gt;&lt;/p&gt;</comment>
                            <comment id="42685" author="rovarga" created="Wed, 9 Apr 2014 09:11:15 +0000"  >&lt;p&gt;Bump importance, this is blocking RESTCONF broker usability.&lt;/p&gt;</comment>
                            <comment id="42686" author="jgloncak" created="Thu, 10 Apr 2014 10:45:03 +0000"  >&lt;p&gt;Conversion of String to InstanceIdentifier was added. See&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/6021/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/6021/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curently test specified above is falling on LazyGeneratedCodecRegistry.getClassForPath()&lt;/p&gt;

&lt;p&gt;See stack trace:&lt;br/&gt;
Caused by: java.lang.NullPointerException&lt;br/&gt;
	at org.opendaylight.yangtools.sal.binding.generator.impl.LazyGeneratedCodecRegistry.getClassForPath(LazyGeneratedCodecRegistry.java:229)&lt;br/&gt;
	at org.opendaylight.yangtools.sal.binding.generator.impl.InstanceIdentifierCodecImpl._deserializePathArgument(InstanceIdentifierCodecImpl.java:90)&lt;br/&gt;
	at org.opendaylight.yangtools.sal.binding.generator.impl.InstanceIdentifierCodecImpl.deserializePathArgument(InstanceIdentifierCodecImpl.java:189)&lt;br/&gt;
	at org.opendaylight.yangtools.sal.binding.generator.impl.InstanceIdentifierCodecImpl.deserialize(InstanceIdentifierCodecImpl.java:69)&lt;br/&gt;
	at org.opendaylight.yangtools.sal.binding.generator.impl.InstanceIdentifierCodecImpl.deserialize(InstanceIdentifierCodecImpl.java:47)&lt;br/&gt;
----- OMITTED -----------&lt;/p&gt;</comment>
                            <comment id="42687" author="jgloncak" created="Thu, 10 Apr 2014 10:56:23 +0000"  >&lt;p&gt;String representation of InstanceIdentifier (from enclosed namespace.xml)&lt;br/&gt;
topo=&quot;urn:TBD:params:xml:ns:yang:network-topology&lt;/p&gt;

&lt;p&gt;Regarding creating of InstanceIdentifier from string maybe some of this question should be also solved:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;if in xml is specified namespace which revision of module should be used? Currently is used youngest yang module&lt;/li&gt;
	&lt;li&gt;what instances of PathArgument should be used in InstanceIdentifier? Currently is used InstanceIdentifier.NodeIdentifier and InstanceIdentifier.NodeIdentifierWithPredicates.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="42688" author="jgloncak" created="Thu, 10 Apr 2014 12:42:35 +0000"  >&lt;p&gt;Under &lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/6021/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/6021/&lt;/a&gt;&lt;br/&gt;
there are:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;patch set 2 - solution with independent InstanceIdentifierParser&lt;/li&gt;
	&lt;li&gt;patch set 3 - solution where InstanceIdentifierCodecStringImpl is added to TypeDefinitionAwareCodec&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="42689" author="jgloncak" created="Tue, 15 Apr 2014 06:52:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/6192/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/6192/&lt;/a&gt;&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;patch set contains standalone codec for InstanceIdentifier type with serialize and deserialize methods implemented which is part of TypeDefinitionAwareCodec class.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="42690" author="tony.tkacik@gmail.com" created="Wed, 16 Apr 2014 07:23:15 +0000"  >&lt;p&gt;DOM part of the codec was merged into master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="24781">CONTROLLER-227</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="12970" name="RestconfUtilsTest.java" size="2592" author="milos.fabian@pantheon.tech" created="Wed, 26 Mar 2014 12:49:29 +0000"/>
                            <attachment id="12969" name="notification.xml" size="495" author="milos.fabian@pantheon.tech" created="Wed, 26 Mar 2014 12:47:39 +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>595</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=595]]></customfieldvalue>

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

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