[CONTROLLER-708] Getting error pulling RESTCONF URL Created: 20/Aug/14  Updated: 25/Jul/23  Due: 21/Aug/14  Resolved: 21/Aug/14

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Giles Heron Assignee: Tony Tkacik
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


Attachments: Zip Archive opendaylight.zip    
External issue ID: 1586

 Description   

When I pull a RESTCONF URL that refers to a top level container in a specific sub-module I'm getting an error:

The URL is:

http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/ncs/yang-ext:mount/tailf-ncs:devices/

The error is:

HTTP Status 500 - java.lang.NoSuchMethodError: javax.ws.rs.WebApplicationException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found

type Exception report

message java.lang.NoSuchMethodError: javax.ws.rs.WebApplicationException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.ws.rs.WebApplicationException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

root cause

java.lang.NoSuchMethodError: javax.ws.rs.WebApplicationException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found
org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException.<init>(RestconfDocumentedException.java:90)
org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException.<init>(RestconfDocumentedException.java:105)
org.opendaylight.controller.sal.restconf.impl.BrokerFacade.readDataViaTransaction(BrokerFacade.java:186)
org.opendaylight.controller.sal.restconf.impl.BrokerFacade.readOperationalData(BrokerFacade.java:95)
org.opendaylight.controller.sal.restconf.impl.RestconfImpl.readOperationalData(RestconfImpl.java:690)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.32 logs.



 Comments   
Comment by Giles Heron [ 20/Aug/14 ]

Attachment opendaylight.zip has been added with description: zipped opendaylight.log

Comment by Tony Tkacik [ 20/Aug/14 ]

Are you experiencing this in distribution of Opendaylight with original bundled tomcat?

This seems that
javax.ws.rs.WebApplicationException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found

JAX-RS version is 1.0, but Opendaylight uses and requires 2.0

Comment by Giles Heron [ 20/Aug/14 ]

Yes - I'm using the bundled Tomcat...

Comment by Tony Tkacik [ 21/Aug/14 ]

Underlaying bug was in YANGTools processing single quoted strings.
Fix is present in

https://git.opendaylight.org/gerrit/10131

Generated at Wed Feb 07 19:53:40 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.