<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:56:27 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-1542] Improve YangInstanceIdentifier serialization error reporting</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1542</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-1130&quot; title=&quot;(devices) POST returns 500 on data already exists&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-1130&quot;&gt;&lt;del&gt;NETCONF-1130&lt;/del&gt;&lt;/a&gt; contains this stack trace:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;2023-09-05T12:38:46,308 | ERROR | qtp1936609051-682 | ServerRuntime$Responder          | 172 - org.glassfish.jersey.core.jersey-server - 2.40.0 | An exception has been thrown from an exception mapper class org.opendaylight.restconf.nb.rfc8040.jersey.providers.errors.RestconfDocumentedExceptionMapper.
java.lang.IllegalArgumentException: Invalid input /(http://netconfcentral.org/ns/toaster2?revision=2009-11-20)toaster/darknessFactor: schema for argument (http://netconfcentral.org/ns/toaster2?revision=2009-11-20)toaster (after ) not found
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:463) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.util.AbstractStringInstanceIdentifierCodec.serializeImpl(AbstractStringInstanceIdentifierCodec.java:53) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.util.AbstractStringInstanceIdentifierCodec.serializeImpl(AbstractStringInstanceIdentifierCodec.java:35) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.codec.AbstractIllegalArgumentCodec.serialize(AbstractIllegalArgumentCodec.java:32) ~[?:?]
	at org.opendaylight.yangtools.yang.data.codec.gson.JSONInstanceIdentifierCodec.writeValue(JSONInstanceIdentifierCodec.java:107) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.codec.gson.JSONInstanceIdentifierCodec$RFC7951.writeValue(JSONInstanceIdentifierCodec.java:37) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.writeValue(JSONNormalizedNodeStreamWriter.java:459) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.scalarValue(JSONNormalizedNodeStreamWriter.java:441) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.ForwardingNormalizedNodeStreamWriter.scalarValue(ForwardingNormalizedNodeStreamWriter.java:107) ~[bundleFile:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.errors.StreamWriterWithDisabledValidation.scalarValue(StreamWriterWithDisabledValidation.java:50) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.wasProcessAsSimpleNode(NormalizedNodeWriter.java:129) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.write(NormalizedNodeWriter.java:103) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.writeChildren(NormalizedNodeWriter.java:170) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.wasProcessedAsCompositeNode(NormalizedNodeWriter.java:190) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.write(NormalizedNodeWriter.java:99) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.writeChildren(NormalizedNodeWriter.java:170) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.wasProcessedAsCompositeNode(NormalizedNodeWriter.java:196) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.write(NormalizedNodeWriter.java:99) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.writeChildren(NormalizedNodeWriter.java:170) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.wasProcessedAsCompositeNode(NormalizedNodeWriter.java:185) ~[bundleFile:?]
	at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.write(NormalizedNodeWriter.java:99) ~[bundleFile:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.errors.RestconfDocumentedExceptionMapper.writeNormalizedNode(RestconfDocumentedExceptionMapper.java:198) ~[bundleFile:?]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The (perhaps cosmetic) problem here is that we are in NormalizedNodeWriter.write(), which is declared to throw IOException (in this case).&lt;/p&gt;

&lt;p&gt;This turns out to be a specific problem of YangInstanceIdentifier codecs in both JSON and XML (where we should report an XMLStreamException). Both of these call sites are serviced by AbstractIllegalArgumentCodec.serialize() which, as the class name would suggest, throws IllegalArgumentException.&lt;/p&gt;

&lt;p&gt;This means that writeValue() should first serialize the value safely:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; str;
    &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
         str = serialize(iid);
    } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (IllegalArgumentException e) {
         &lt;span class=&quot;code-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; IOException(e);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and emit it separately. This will allow this case to be properly serviced by RestconfDocumentedExceptionMapper.writeNormalizedNode(), if ever possible.&lt;/p&gt;</description>
                <environment></environment>
        <key id="37412">YANGTOOLS-1542</key>
            <summary>Improve YangInstanceIdentifier serialization error reporting</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <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="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Fri, 22 Sep 2023 23:21:58 +0000</created>
                <updated>Mon, 2 Oct 2023 12:20:33 +0000</updated>
                            <resolved>Mon, 2 Oct 2023 12:20:33 +0000</resolved>
                                                    <fixVersion>9.0.9</fixVersion>
                    <fixVersion>10.0.10</fixVersion>
                    <fixVersion>11.0.3</fixVersion>
                                    <component>codecs</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="37191">NETCONF-1130</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i046lb:</customfieldvalue>

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