<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15: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>[NETCONF-607] RPC with no input throw NPE when called via Restconf</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-607</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Given RPC (no input):&lt;/p&gt;

&lt;p&gt;&#160;&#160;&#160; rpc force-refresh {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; output {&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; leaf result &lt;/p&gt;
{&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type boolean;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; description &quot;Refresh operation result - true if successful, false otherwise.&quot;;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }
&lt;p&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&lt;br/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; }&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&lt;br/&gt;
&#160;&#160;&#160; }&lt;/p&gt;

&lt;p&gt;when called via restconf like this:&lt;/p&gt;

&lt;p&gt;curl -u admin:admin -X POST -v&#160; &lt;a href=&quot;http://localhost:8181/restconf/operations/jsonrpc:force-refresh&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/operations/jsonrpc:force-refresh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leads to following error:&lt;/p&gt;

&lt;p&gt;&amp;lt;html&amp;gt;&lt;br/&gt;
&amp;lt;head&amp;gt;&lt;br/&gt;
&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;charset=utf-8&quot;/&amp;gt;&lt;br/&gt;
&amp;lt;title&amp;gt;Error 500 Request failed.&amp;lt;/title&amp;gt;&lt;br/&gt;
&amp;lt;/head&amp;gt;&lt;br/&gt;
&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;HTTP ERROR 500&amp;lt;/h2&amp;gt;&lt;br/&gt;
&amp;lt;p&amp;gt;Problem accessing /restconf/operations/jsonrpc:force-refresh. Reason:&lt;br/&gt;
&amp;lt;pre&amp;gt;&#160;&#160;&#160; Request failed.&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;&lt;br/&gt;
&amp;lt;/body&amp;gt;&lt;br/&gt;
&amp;lt;/html&amp;gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Karaf log indicates NPE:&lt;/p&gt;

&lt;p&gt;Caused by: java.lang.NullPointerException&lt;br/&gt;
&#160;&#160; &#160;at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:426) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;?:?&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&#160; &#160;at org.opendaylight.netconf.sal.restconf.impl.StatisticsRestconfServiceWrapper.invokeRpc(StatisticsRestconfServiceWrapper.java:83) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;?:?&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&#160; &#160;at org.opendaylight.netconf.sal.rest.impl.RestconfCompositeWrapper.invokeRpc(RestconfCompositeWrapper.java:64) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;?:?&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&#160; &#160;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;?:?&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&#160; &#160;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~&lt;span class=&quot;error&quot;&gt;&amp;#91;?:?&amp;#93;&lt;/span&gt;&lt;br/&gt;
&#160;&#160; &#160;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Can we add check and throw RestconfDocumentedException so user will know that required input is missing?&lt;/p&gt;

&lt;p&gt;eg. this works&lt;/p&gt;

&lt;p&gt;curl -u admin:admin -X POST&#160; &lt;a href=&quot;http://localhost:8181/restconf/operations/jsonrpc:force-refresh&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/operations/jsonrpc:force-refresh&lt;/a&gt; -d &apos;&apos;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="31419">NETCONF-607</key>
            <summary>RPC with no input throw NPE when called via Restconf</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</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="JMorvay">Jakub Morvay</assignee>
                                    <reporter username="rkosegi">Richard Kosegi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Feb 2019 07:39:04 +0000</created>
                <updated>Thu, 21 Feb 2019 17:49:54 +0000</updated>
                            <resolved>Thu, 21 Feb 2019 17:49:54 +0000</resolved>
                                    <version>Neon</version>
                    <version>Fluorine SR2</version>
                    <version>Sodium</version>
                                    <fixVersion>Neon</fixVersion>
                    <fixVersion>Fluorine SR3</fixVersion>
                    <fixVersion>Sodium</fixVersion>
                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="66427" author="rkosegi" created="Fri, 8 Feb 2019 07:41:28 +0000"  >&lt;p&gt;Maybe this is regression? &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-509&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.opendaylight.org/browse/NETCONF-509&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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|i03mjb:</customfieldvalue>

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