Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12889

NPE when asking the job status with REST before the job actually starts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.4-milestone-2
    • 7.4-milestone-1
    • REST
    • None
    • Unknown
    • N/A
    • N/A

    Description

      The issue is that the job's start date is not checked for null and, when given to the Calendar instance, generates the exception:

      Dec 08, 2015 6:54:40 PM org.restlet.engine.application.StatusFilter doHandle
      WARNING: Exception or error caught in status service
      java.lang.NullPointerException
              at java.util.Calendar.setTime(Calendar.java:1106)
              at org.xwiki.rest.internal.DomainObjectFactory.createJobStatus(DomainObjectFactory.java:294)
              at org.xwiki.rest.internal.resources.job.JobStatusResourceImpl.getJobStatus(JobStatusResourceImpl.java:42)
              at sun.reflect.GeneratedMethodAccessor598.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:171)
              at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:291)
              at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:1043)
              at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:792)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
              at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75)
              at org.restlet.Application.handle(Application.java:391)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
              at org.restlet.Component.handle(Component.java:391)
              at org.restlet.Server.handle(Server.java:491)
              at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74)
              at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153)
              at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
              at org.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:85)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:137)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handle(Server.java:499)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
              at java.lang.Thread.run(Thread.java:745)
      
      

      Attachments

        Activity

          People

            enygma Eduard Moraru
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: