NullPointerException on Crucible REST API ("filter?..") call
Asked by Paul Y:

Hello, everyone! I try to do REST call:

++[https://OUR-CRUCIBLE-INSTANCE.crucible.com/rest-service/reviews-v1/filter/details?allReviewersComplete=true\&fromDate=1451606400000](https://OUR-CRUCIBLE-INSTANCE.crucible.com/rest-service/reviews-v1/filter/details?allReviewersComplete=true&fromDate=1451606400000)++

And early this worked. But suddenly this stops to work, and now I get **504 Gateway Time-out.**REST client dumps it as:

```
<html><head><title>504 Gateway Time-out</title></head><body bgcolor="white"><center><h1>504 Gateway Time-out</h1></center><hr><center>nginx/1.6.2</center></body></html><!-- a padding to disable MSIE and Chrome friendly error page --><!-- a padding to disable MSIE and Chrome friendly error page --><!-- a padding to disable MSIE and Chrome friendly error page --><!-- a padding to disable MSIE and Chrome friendly error page --><!-- a padding to disable MSIE and Chrome friendly error page --><!-- a padding to disable MSIE and Chrome friendly error page -->
```

At the same time there is the Java traceback in logs (NPE):

```
2017-06-05 13:15:18,162 ERROR - Exception"null" (java.lang.NullPointerException) while processing"/rest-service/reviews-v1/filter" (Referer:"null")java.lang.NullPointerException        atorg.apache.felix.framework.BundleRevisionImpl.getResourceLocal(BundleRevisionImpl.java:498)[org.apache.felix.framework-4.2.1.jar:?]        atorg.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1505)[org.apache.felix.framework-4.2.1.jar:?]        atorg.apache.felix.framework.BundleWiringImpl.getResourceByDelegation(BundleWiringImpl.java:1417)[org.apache.felix.framework-4.2.1.jar:?]        atorg.apache.felix.framework.BundleWiringImpl$BundleClassLoader.getResource(BundleWiringImpl.java:2419)[org.apache.felix.framework-4.2.1.jar:?]        atjavax.xml.bind.ContextFinder.loadJAXBProperties(ContextFinder.java:489)[?:1.8.0_74]        at javax.xml.bind.ContextFinder.find(ContextFinder.java:382)[?:1.8.0_74]        atjavax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641)[?:1.8.0_74]        atjavax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)[?:1.8.0_74]        atcom.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getStoredJAXBContext(AbstractJAXBProvider.java:196)[?:?]        atcom.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getJAXBContext(AbstractJAXBProvider.java:179)[?:?]        atcom.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getMarshaller(AbstractJAXBProvider.java:153)[?:?]        atcom.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:151)[?:?]        atcom.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)[?:?]        atcom.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)[?:?]        atcom.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)[?:?]        atcom.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)[?:?]        atcom.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)[?:?]        atcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)[?:?]        atcom.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:159)[?:?]        atcom.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:829)[?:?]        atcom.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:69)[?:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugins.rest.module.servlet.RestServletUtilsUpdaterFilter.doFilterInternal(RestServletUtilsUpdaterFilter.java:22)[?:?]        at > [atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)[?:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)[?:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)[?:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)[?:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)[?:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58)[atlassian-plugins-servlet-4.4.0.jar:?]        atcom.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:32)[?:?]
```

Actually, I can not say what was the reason of the breaking, after what this call become broken. Other REST endpoints work fine! We updated a version, restarted sure, but nothing changed. Can somebody help, how to workaround or even to fix it?


Answers:
author: Paul Y
body: reason was: unexpected timeout. What is the reason of so long delay - is unknown.


Tags: developer

rest

rest-api