<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:52:31 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-230] Error 500 on GET/OPTIONS</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-230</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;On doing a GET&lt;br/&gt;
http://&amp;lt;device&amp;gt;:8080/restconf/config/opendaylight-inventory:nodes/nod&lt;br/&gt;
e/&amp;lt;device&amp;gt;/yang-ext:mount/Cisco-IOS-XR-ipv4-io-oper:ipv4-network&lt;/p&gt;

&lt;p&gt;ODL receive sends an 500 HTTP error, with the following output. Possibly a netconf problem...&lt;/p&gt;




&lt;p&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Apache Tomcat/7.0.32 - Error report&amp;lt;/title&amp;gt;&amp;lt;style&amp;gt;&amp;lt;!--H1 &lt;/p&gt;
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
&lt;p&gt; H2 &lt;/p&gt;
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
&lt;p&gt; H3 &lt;/p&gt;
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
&lt;p&gt; BODY &lt;/p&gt;
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
&lt;p&gt; B &lt;/p&gt;
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
&lt;p&gt; P &lt;/p&gt;
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
&lt;p&gt;A &lt;/p&gt;
{color : black;}
&lt;p&gt;A.name &lt;/p&gt;
{color : black;}
&lt;p&gt;HR &lt;/p&gt;
{color : #525D76;}
&lt;p&gt;--&amp;gt;&amp;lt;/style&amp;gt; &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;HTTP Status 500 - &amp;lt;/h1&amp;gt;&amp;lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;type&amp;lt;/b&amp;gt; Exception report&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;message&amp;lt;/b&amp;gt; &amp;lt;u&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;description&amp;lt;/b&amp;gt; &amp;lt;u&amp;gt;The server encountered an internal error that prevented it from fulfilling this request.&amp;lt;/u&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;exception&amp;lt;/b&amp;gt; &amp;lt;pre&amp;gt;java.lang.NullPointerException&lt;br/&gt;
	org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toDomNodes(XmlDocumentUtils.java:430)&lt;br/&gt;
	org.opendaylight.controller.sal.connect.netconf.NetconfMapping.toRpcResult(NetconfMapping.java:377)&lt;br/&gt;
	org.opendaylight.controller.sal.connect.netconf.NetconfDevice.invokeRpc(NetconfDevice.java:463)&lt;br/&gt;
	org.opendaylight.controller.sal.connect.netconf.NetconfDevice.readConfigurationData(NetconfDevice.java:414)&lt;br/&gt;
	org.opendaylight.controller.sal.connect.netconf.NetconfDevice.readConfigurationData(NetconfDevice.java:79)&lt;br/&gt;
	org.opendaylight.controller.md.sal.common.impl.routing.AbstractDataReadRouter$1.apply(AbstractDataReadRouter.java:71)&lt;br/&gt;
	org.opendaylight.controller.md.sal.common.impl.routing.AbstractDataReadRouter$1.apply(AbstractDataReadRouter.java:68)&lt;br/&gt;
	com.google.common.collect.Iterators$8.transform(Iterators.java:860)&lt;br/&gt;
	com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)&lt;br/&gt;
	org.opendaylight.controller.sal.dom.broker.impl.DataReaderRouter.merge(DataReaderRouter.java:75)&lt;br/&gt;
	org.opendaylight.controller.sal.dom.broker.impl.DataReaderRouter.merge(DataReaderRouter.java:38)&lt;br/&gt;
	org.opendaylight.controller.md.sal.common.impl.routing.AbstractDataReadRouter.readConfigurationData(AbstractDataReadRouter.java:40)&lt;br/&gt;
	org.opendaylight.controller.md.sal.common.impl.service.AbstractDataBroker.readConfigurationData(AbstractDataBroker.java:191)&lt;br/&gt;
	org.opendaylight.controller.sal.dom.broker.MountPointImpl.readConfigurationData(MountPointImpl.java:83)&lt;br/&gt;
	org.opendaylight.controller.sal.restconf.impl.BrokerFacade.readConfigurationDataBehindMountPoint(BrokerFacade.java:106)&lt;br/&gt;
	org.opendaylight.controller.sal.restconf.impl.RestconfImpl.readConfigurationData(RestconfImpl.java:203)&lt;br/&gt;
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;br/&gt;
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
	java.lang.reflect.Method.invoke(Method.java:606)&lt;br/&gt;
	com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)&lt;br/&gt;
	com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)&lt;br/&gt;
	com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)&lt;br/&gt;
	com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)&lt;br/&gt;
	com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)&lt;br/&gt;
	com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)&lt;br/&gt;
	com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)&lt;br/&gt;
	com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)&lt;br/&gt;
	com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)&lt;br/&gt;
	com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)&lt;br/&gt;
	com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)&lt;br/&gt;
	com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)&lt;br/&gt;
	com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)&lt;br/&gt;
	com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)&lt;br/&gt;
	com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)&lt;br/&gt;
	javax.servlet.http.HttpServlet.service(HttpServlet.java:848)&lt;br/&gt;
	org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:440)&lt;br/&gt;
	org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:179)&lt;br/&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;note&amp;lt;/b&amp;gt; &amp;lt;u&amp;gt;The full stack trace of the root cause is available in the Apache Tomcat/7.0.32 logs.&amp;lt;/u&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&amp;gt;&amp;lt;h3&amp;gt;Apache Tomcat/7.0.32&amp;lt;/h3&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="24784">CONTROLLER-230</key>
            <summary>Error 500 on GET/OPTIONS</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="-1">Unassigned</assignee>
                                    <reporter username="wojdec">Wojciech Dec</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Mar 2014 20:34:29 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:16 +0000</updated>
                            <resolved>Thu, 11 Sep 2014 12:29:17 +0000</resolved>
                                                                    <component>restconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="47794" author="tony.tkacik@gmail.com" created="Fri, 28 Mar 2014 16:46:14 +0000"  >&lt;p&gt;Please make sure if the ietf-inet-types and ietf-yang-types are in cache/schema folder. Some network devices fail to provide this YANG modules, and reading anything IP related then will fail in similar extension.&lt;/p&gt;</comment>
                            <comment id="47795" author="tony.tkacik@gmail.com" created="Fri, 28 Mar 2014 16:46:14 +0000"  >&lt;p&gt;Please make sure if the ietf-inet-types and ietf-yang-types are in cache/schema folder. Some network devices fail to provide this YANG modules, and reading anything IP related then will fail in similar extension.&lt;/p&gt;</comment>
                            <comment id="47796" author="wdec@cisco.com" created="Fri, 28 Mar 2014 17:12:29 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;yes, the schema are all there. I traced down the problem to the following however:&lt;br/&gt;
The GET that produces the server error is for a config resource, which actually is an operational resource in the yang model. &lt;br/&gt;
Correct behavior IMO would be to send an HTTP Error 400 - bad request.&lt;/p&gt;</comment>
                            <comment id="47797" author="tony.tkacik@gmail.com" created="Wed, 2 Apr 2014 08:42:20 +0000"  >&lt;p&gt;Changed to enhancement, since this is improving error reporting.&lt;/p&gt;</comment>
                            <comment id="47798" author="wdec@cisco.com" created="Wed, 2 Apr 2014 15:58:54 +0000"  >&lt;p&gt;Sending a GET for a resource foo that is not in the data store should return an Error 400. Replying with an Error 500 (server error + java backtrace) does not appear to be proper, and it doesn&apos;t look like an enhancement, esp since it is also not compliant with the Restconf spec.&lt;/p&gt;

&lt;p&gt;It is also inconsistent with the rest of the RESTConf ASPI response codes, which when interrogated with a GET for a non existing item &quot;foo&quot; in the data tree returns an Error 400: URI has bad format. &quot;foo&quot; was not found in parent data node.&lt;/p&gt;</comment>
                            <comment id="47799" author="wdec@cisco.com" created="Wed, 2 Apr 2014 16:08:15 +0000"  >&lt;p&gt;Same behavior observed on OPTIONS.&lt;/p&gt;</comment>
                            <comment id="47800" author="wdec@cisco.com" created="Fri, 23 May 2014 14:16:27 +0000"  >&lt;p&gt;Changing back to bug, since it&apos;s in effect an improperly handled exception.&lt;/p&gt;</comment>
                            <comment id="47801" author="tpantelis" created="Wed, 28 May 2014 04:04:57 +0000"  >&lt;p&gt;At the very least the NullPointerException is a bug and should be fixed. The code path has since changed so the methods/line numbers don&apos;t match the trace above but it looks like line 430 in XmlDocumentUtils.toDomNode is here:&lt;/p&gt;

&lt;p&gt;        NodeList nodes = element.getChildNodes();&lt;br/&gt;
        ...&lt;br/&gt;
   --&amp;gt;  for (int i = 0; i &amp;lt; nodes.getLength(); i++) {&lt;/p&gt;

&lt;p&gt;So getChildNodes returned null which indicates an empty root element. We should protect against that. I suspect the device returned a valid response but with no data.&lt;/p&gt;

&lt;p&gt;Whether rest should report 400 or 404 is another story. Basically the mount point is a pass thru to the device so rest should report whatever the device reports. If the query was invalid then the device should report it as such but apparently it didn&apos;t.&lt;/p&gt;</comment>
                            <comment id="47802" author="tony.tkacik@gmail.com" created="Thu, 11 Sep 2014 12:29:17 +0000"  >&lt;p&gt;This bug is observed in old code path to Netconf, which is not actual anymore. Unable to reproduce with new code path to Netconf.&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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>573</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=573]]></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|i02j47:</customfieldvalue>

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