It's all about the answers!

Ask a question

gadgets.io.makeRequest() returns an HTTP 500


Daniel Stefan Haischt (21412322) | asked Oct 12 '11, 9:24 a.m.
Hi,

I am trying to add Sonar Open Social gadgets to an RTC V3.0.1 instance. The gadget is internally calling gadgets.io.makeRequest() to retrieve a list of available projects from the Sonar server.

For some reason gadgets.io.makeRequest() returns an HTTP 500:

XMLHttpRequest { onreadystatechange=[xpconnect wrapped nsIDOMEventListener],  responseText="Error 500: SRVE0295E: Error reported: 500\r\n",  more...}


Although if I manually try to access the URL passed to gadgets.io.makeRequest() Sonar returns a list of projects as expected. So I am wondering why if accessing the same URL through the Open Social API within RTC a WAS specific HTTP 500 error (SRVE0295E) will be triggered?

https://github.com/jeremi/sonar-gadget

Is anybody able to shed some light on what is going on under the covers?

Cheers
Daniel S. Haischt

PS: I adjusted the original gadget code to only use local URL served by a local IHS instance.

4 answers



permanent link
Daniel Stefan Haischt (21412322) | answered Oct 24 '11, 4:12 p.m.
The corresponding WAS exception originating from the CCM WAS profile log looks as follows:


[10/24/11 22:08:42:427 CEST] 00000039 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[equinoxbridgeservlet]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: SRVE0295E: Error reported: 500
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:637)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1169)
at net.jazz.web.opensocial.container.internal.MakeRequestServlet.doGet(MakeRequestServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at net.jazz.ajax.servlets.LoggingHttpServlet.service(LoggingHttpServlet.java:34)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)


Hope that helps to understand the issue better.

Cheers
Daniel

permanent link
Randy Hudson (216243) | answered Oct 24 '11, 5:25 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Gadget makeRequest (whether it requires oauth authentication or not) is only supported when the destination is to a "friend" server. If it requires authentication, then the destination must be a friend. If not, the URL is still restricted for security reasons.

permanent link
Daniel Stefan Haischt (21412322) | answered Oct 25 '11, 1:25 a.m.
Hi Randy,

Gadget makeRequest (whether it requires oauth authentication or not) is only supported when the destination is to a "friend" server. If it requires authentication, then the destination must be a friend. If not, the URL is still restricted for security reasons.


the Gadgets that are getting invoked will be served by an IHS that does not require authentication. The base URL of the IHS server has been added to the whitelist (outbound). Isn't that sufficient?

Regards,
Daniel

permanent link
Daniel Stefan Haischt (21412322) | answered Sep 14 '12, 10:40 a.m.
Looks like this was kind of unsupported in RTC V3 AFAIK. That is using gadgets living on an alien server. Have to re-test on RTC V4.x.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.