Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 859747

Summary: ovirt-engine-restapi : 500 error when trying to browse to rsdl link
Product: Red Hat Enterprise Virtualization Manager Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-restapiAssignee: Ori Liel <oliel>
Status: CLOSED CURRENTRELEASE QA Contact: Oded Ramraz <oramraz>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dyasny, ecohen, iheim, mpastern, Rhev-m-bugs, sgrinber, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: si20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:59:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server logs none

Description Oded Ramraz 2012-09-23 18:14:16 UTC
Description of problem:

Whenever I'm trying to browse to rsdl link ( api/?rsdl ) I'm getting 500 error ( see Additional Information )


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

type Exception report

message

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

exception

org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
	org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
	org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
	org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
	org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

root cause

java.lang.NullPointerException
	org.ovirt.engine.api.restapi.resource.BackendApiResource.addSystemVersion(BackendApiResource.java:347)
	org.ovirt.engine.api.restapi.resource.BackendApiResource.get(BackendApiResource.java:305)
	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:601)
	org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
	org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
	org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
	org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
	org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

Comment 1 Oded Ramraz 2012-09-23 18:17:49 UTC
Created attachment 616184 [details]
server logs

Comment 2 Simon Grinberg 2012-09-23 18:50:48 UTC
(In reply to comment #0)
> Description of problem:
> 
> Whenever I'm trying to browse to rsdl link ( api/?rsdl ) I'm getting 500
> error ( see Additional Information )

Oded, which version is that?

On my setup it works with:
https://rhevm31.demo.redhat.com/api?rsdl

Meaning api?rsdl and not api/?rsdl

Comment 3 Oded Ramraz 2012-09-23 20:45:59 UTC
When browsing to /api?rsdl and then /api/?rsdl everything works fine.
When staring with /api/?rsdl I get this exception ( you might need to restart ovirt-engine service in order to reproduce it ).
BTW both https://aqua-rhel.qa.lab.tlv.redhat.com/api/?schema and https://aqua-rhel.qa.lab.tlv.redhat.com/api?schema ( for retrieving XSD file ) works fine.
I except /api/?rsdl link to work fine or alternately to get 404 error, but not 500 server error.

Comment 4 Michael Pasternak 2012-09-24 06:39:00 UTC
trailing slash in /api/?rsdl is incorrect, but 500 should not occur

Comment 5 Michael Pasternak 2012-09-24 06:40:50 UTC
btw correct url is /api?rsdl

Comment 6 Ori Liel 2012-10-03 10:05:54 UTC
posted upstream: 

  http://gerrit.ovirt.org/#/c/8236/


merged upstream: 

  commit cb805abab75feb2951636522636fd2efec2dc3dd


posted downstream: 

  https://gerrit.eng.lab.tlv.redhat.com/#/c/2422/


merged downstream:

  3a508b06346e5b537832f1976c6a332be7fa1d0e

Comment 7 Oded Ramraz 2012-10-09 14:08:56 UTC
Verified si20 : both api?rsdl and api/?rsdl works now.