3 Replies Latest reply on Dec 2, 2013 12:18 PM by butch

    osapi.http.get java stack trace when using authz:signed

    butch

      Mark Weitzel

       

      We need to make some signed requests to our server from an HTML widget, but when adding the "authz":"signed" parameter we get a stack trace from jive.  Are we missing something important here?

       

      Working Example

       

      osapi.http.get({

        "href": "http://api.openweathermap.org/data/2.1/find/station?bbox=12,32,15,37,10&cluster=yes"

      }).execute(

        function(response) {

        }

      );

       

      Stack Trace Example

       

      osapi.http.get({

        "authz": "signed",

        "href": "http://api.openweathermap.org/data/2.1/find/station?bbox=12,32,15,37,10&cluster=yes"

      }).execute(

        function(response) {

        }

      );

       

      Stack Trace

       

      java.lang.NullPointerException

        at com.jivesoftware.community.opensocial.oauth.JiveOAuthRequest.sanitizeAndSign(JiveOAuthRequest.java:179)

        at org.apache.shindig.gadgets.oauth.OAuthRequest.fetchData(OAuthRequest.java:854)

        at org.apache.shindig.gadgets.oauth.OAuthRequest.attemptFetch(OAuthRequest.java:308)

        at org.apache.shindig.gadgets.oauth.OAuthRequest.fetchWithRetry(OAuthRequest.java:248)

        at org.apache.shindig.gadgets.oauth.OAuthRequest.fetchNoThrow(OAuthRequest.java:204)

        at org.apache.shindig.gadgets.oauth.OAuthRequest.fetch(OAuthRequest.java:185)

        at com.jivesoftware.community.opensocial.oauth.JiveOAuthRequest.fetch(JiveOAuthRequest.java:146)

        at org.apache.shindig.gadgets.http.DefaultRequestPipeline.fetchResponse(DefaultRequestPipeline.java:164)

        at org.apache.shindig.gadgets.http.DefaultRequestPipeline.execute(DefaultRequestPipeline.java:105)

        at com.jivesoftware.community.opensocial.gadgets.http.JiveRequestPipeline.execute(JiveRequestPipeline.java:48)

        at org.apache.shindig.gadgets.servlet.HttpRequestHandler.execute(HttpRequestHandler.java:251)

        at org.apache.shindig.gadgets.servlet.HttpRequestHandler.get(HttpRequestHandler.java:137)

        at sun.reflect.GeneratedMethodAccessor2661.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.apache.shindig.protocol.DefaultHandlerRegistry$MethodCaller.call(DefaultHandlerRegistry.java:483)

        at org.apache.shindig.protocol.DefaultHandlerRegistry$RpcInvocationHandler.execute(DefaultHandlerRegistry.java:302)

        at org.apache.shindig.protocol.DefaultHandlerRegistry$RpcInvocationWrapper.execute(DefaultHandlerRegistry.java:326)

        at org.apache.shindig.protocol.JsonRpcServlet.dispatchBatch(JsonRpcServlet.java:187)

        at org.apache.shindig.protocol.JsonRpcServlet.service(JsonRpcServlet.java:133)

        at com.jivesoftware.community.opensocial.ext.JiveJsonRpcServlet.service(JiveJsonRpcServlet.java:86)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.NoCacheDevModeFilter.doFilterInternal(NoCacheDevModeFilter.java:39)

        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416)

        at com.jivesoftware.community.web.struts.JiveFilterDispatcher.doFilter(JiveFilterDispatcher.java:108)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.ActivityRequestFilter.doFilter(ActivityRequestFilter.java:100)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.directwebremoting.servlet.DwrWebContextFilter.doFilter(DwrWebContextFilter.java:91)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.robots.RobotDetectorFilter.doFilterInternal(RobotDetectorFilter.java:62)

        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)

        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.aaa.UserResponseHeaderFilter.doFilter(UserResponseHeaderFilter.java:45)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)

        at com.jivesoftware.mobile.filters.APIContentTypeFilter.doFilter(APIContentTypeFilter.java:48)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at com.jivesoftware.mobile.filters.JCAPITokenFilter.doFilter(JCAPITokenFilter.java:50)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at com.jivesoftware.mobile.redirector.RedirectFilter.doFilter(RedirectFilter.java:140)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at com.jivesoftware.api.audit.RequestResponseAuditServletFilter.doFilter(RequestResponseAuditServletFilter.java:63)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at com.jivesoftware.community.opensocial.aaa.ShindigAuthenticationTranslationFilter.doFilter(ShindigAuthenticationTranslationFilter.java:185)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:163)

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)

        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.base.profiling.http.RequestProfilingFilter.doFilter(RequestProfilingFilter.java:47)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.P3PCompactPolicyFilter.doFilter(P3PCompactPolicyFilter.java:48)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.RemoveJsessionIdFilter.doFilter(RemoveJsessionIdFilter.java:40)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.ApplicationStateFilter.doFilter(ApplicationStateFilter.java:157)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.AbstractApplicationStateFilter.doFilter(AbstractApplicationStateFilter.java:61)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:50)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.base.plugin.PluginFilter.doFilter(PluginFilter.java:54)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.ResourceRoutingFilter.doFilter(ResourceRoutingFilter.java:44)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.base.profiling.http.ServerLatencyFilter.doFilter(ServerLatencyFilter.java:62)

        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.apache.shindig.common.servlet.HostFilter.doFilter(HostFilter.java:38)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.apache.shindig.auth.AuthenticationServletFilter.callChain(AuthenticationServletFilter.java:186)

        at org.apache.shindig.auth.AuthenticationServletFilter.doFilter(AuthenticationServletFilter.java:97)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.opensocial.filter.AppSubdomainFilter.doFilter(AppSubdomainFilter.java:71)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.MetricsFilter.doFilter(MetricsFilter.java:120)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.SetRequestCharacterEncodingFilter.doFilter(SetRequestCharacterEncodingFilter.java:75)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at com.jivesoftware.community.web.filter.DispatchContextResetFilter.doFilter(DispatchContextResetFilter.java:39)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

        at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:724)