javax.ws.rs.WebApplicationException: java.lang.NullPointerException

Atlassian JIRA | Duy Luong | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    *Problem:* A "System Error" is displayed when trying to get an ics. Message: Oops - an error has occurred URL is similar to: {{https://<instance-name>/wiki/rest/calendar-services/1.0/calendar/export/subcalendar/private/2f21af192d072d23b1a6a788987e529dc8f7a0ac.ics}} Every access to a team cal .ics generates in the logs: {noformat} 2014-05-22 12:26:30.421501500 2014-05-22 12:26:30,416 ERROR [TP-Processor8] [common.error.jersey.ThrowableExceptionMapper] toResponse Server Error in REST: 500: com.sun.jersey.core.spi.factory.ResponseImpl@1432819 2014-05-22 12:26:30.421503500 -- url: /wiki/rest/calendar-services/1.0/calendar/export/subcalendar/private/2f21af192d072d23b1a6a788987e529dc8f7a0ac.ics | userName: sysadmin | referer: https://<some-url> 2014-05-22 12:26:30.421504500 javax.ws.rs.WebApplicationException: java.lang.NullPointerException 2014-05-22 12:26:30.421513500 at com.atlassian.confluence.extra.calendar3.rest.CalendarResource$19.write(CalendarResource.java:1495) 2014-05-22 12:26:30.421514500 at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71) 2014-05-22 12:26:30.421515500 at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57) 2014-05-22 12:26:30.421515500 at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306) 2014-05-22 12:26:30.421517500 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437) 2014-05-22 12:26:30.421518500 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) 2014-05-22 12:26:30.421521500 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) 2014-05-22 12:26:30.421521500 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) 2014-05-22 12:26:30.421522500 at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) 2014-05-22 12:26:30.421523500 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178) 2014-05-22 12:26:30.421524500 at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795) 2014-05-22 12:26:30.421525500 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73) ... 2014-05-22 12:26:30.422819500 at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) 2014-05-22 12:26:30.422820500 at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) 2014-05-22 12:26:30.422821500 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) 2014-05-22 12:26:30.422821500 at java.lang.Thread.run(Thread.java:662) 2014-05-22 12:26:30.422822500 Caused by: java.lang.NullPointerException 2014-05-22 12:26:30.422822500 at net.fortuna.ical4j.model.PropertyList.getProperty(PropertyList.java:99) 2014-05-22 12:26:30.422823500 at net.fortuna.ical4j.transform.PublishTransformer.transform(PublishTransformer.java:73) 2014-05-22 12:26:30.422824500 at com.atlassian.confluence.extra.calendar3.util.CalendarExportTransformer.transform(CalendarExportTransformer.java:72) 2014-05-22 12:26:30.422825500 at com.atlassian.confluence.extra.calendar3.DefaultICalendarExporter.getTransformedSubCalendarContent(DefaultICalendarExporter.java:144) 2014-05-22 12:26:30.422825500 at com.atlassian.confluence.extra.calendar3.DefaultICalendarExporter.export(DefaultICalendarExporter.java:64) 2014-05-22 12:26:30.422828500 at com.atlassian.confluence.extra.calendar3.rest.CalendarResource$19.write(CalendarResource.java:1491) 2014-05-22 12:26:30.422829500 ... 223 more 2014-05-22 12:26:30.423281500 2014-05-22 12:26:30,422 INFO [TP-Processor8] [atlassian.confluence.status.SystemErrorInformationLogger] writeToLog 2014-05-22 12:26:30.423282500 Request Unique ID : 6ba8962c-0ead-4732-9b3a-9f81693457e8 2014-05-22 12:26:30.423282500 -------------------------- 2014-05-22 12:26:30.423282500 JVM Stats 2014-05-22 12:26:30.423283500 -------------------------- 2014-05-22 12:26:30.423283500 allocatedHeap = 340975616 2014-05-22 12:26:30.423283500 availablePermGen = 77944008 2014-05-22 12:26:30.423284500 usedMemory = 312218008 2014-05-22 12:26:30.423288500 totalMemory = 340975616 2014-05-22 12:26:30.423289500 freeMemory = 28757608 2014-05-22 12:26:30.423289500 maxPermGen = 268435456 2014-05-22 12:26:30.423289500 usedPermGen = 190491448 2014-05-22 12:26:30.423290500 freeMemoryInMegabytes = 27 2014-05-22 12:26:30.423290500 freeAllocatedHeap = 28757608 2014-05-22 12:26:30.423290500 availableHeap = 218689128 2014-05-22 12:26:30.423290500 usedMemoryInMegabytes = 297 2014-05-22 12:26:30.423291500 maxHeap = 530907136 2014-05-22 12:26:30.423291500 usedHeap = 312218008 2014-05-22 12:26:30.423292500 totalMemoryInMegabytes = 325 2014-05-22 12:26:30.423292500 -------------------------- 2014-05-22 12:26:30.423293500 Request Information 2014-05-22 12:26:30.423293500 -------------------------- 2014-05-22 12:26:30.423293500 URL: https://<instance-name>/wiki/500page.jsp 2014-05-22 12:26:30.423294500 Scheme: https 2014-05-22 12:26:30.423294500 Server: <instance-name> 2014-05-22 12:26:30.423294500 Port: 443 2014-05-22 12:26:30.423295500 URI: /wiki/500page.jsp 2014-05-22 12:26:30.423295500 Context Path: /wiki 2014-05-22 12:26:30.423296500 Servlet Path: /500page.jsp 2014-05-22 12:26:30.423296500 Path Info: null 2014-05-22 12:26:30.423296500 Query String: null 2014-05-22 12:26:30.423297500 -------------------------- 2014-05-22 12:26:30.423297500 Attributes 2014-05-22 12:26:30.423297500 -------------------------- 2014-05-22 12:26:30.423298500 javax.servlet.forward.request_uri: /wiki/rest/calendar-services/1.0/calendar/export/subcalendar/private/2f21af192d072d23b1a6a788987e529dc8f7a0ac.ics 2014-05-22 12:26:30.423301500 javax.servlet.forward.context_path: /wiki 2014-05-22 12:26:30.423301500 javax.servlet.forward.servlet_path: /rest 2014-05-22 12:26:30.423301500 javax.servlet.forward.path_info: /500page.jsp 2014-05-22 12:26:30.423302500 os_securityfilter_already_filtered: true 2014-05-22 12:26:30.423302500 com.atlassian.seraph.auth.LoginReason: OK 2014-05-22 12:26:30.423307500 atlassian.core.seraph.original.url: /500page.jsp 2014-05-22 12:26:30.423307500 com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter: true 2014-05-22 12:26:30.423308500 javax.servlet.error.status_code: 500 2014-05-22 12:26:30.423308500 javax.servlet.error.servlet_name: noop 2014-05-22 12:26:30.423309500 com.opensymphony.sitemesh.USINGSTREAM: false 2014-05-22 12:26:30.423309500 com.atlassian.gzipfilter.GzipFilter_already_filtered: true 2014-05-22 12:26:30.423310500 loginfilter.already.filtered: true 2014-05-22 12:26:30.423311500 javax.servlet.error.message: Internal Server Error 2014-05-22 12:26:30.423311500 com.opensymphony.sitemesh.APPLIED_ONCE: true 2014-05-22 12:26:30.423311500 com.atlassian.core.filters.HeaderSanitisingFilter_already_filtered: true 2014-05-22 12:26:30.423312500 __cleanup_recursion_counter: 0 2014-05-22 12:26:30.423312500 com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter_already_filtered: true 2014-05-22 12:26:30.423314500 javax.servlet.error.request_uri: /wiki/rest/calendar-services/1.0/calendar/export/subcalendar/private/2f21af192d072d23b1a6a788987e529dc8f7a0ac.ics 2014-05-22 12:26:30.423317500 com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter: true 2014-05-22 12:26:30.423317500 -------------------------- 2014-05-22 12:26:30.423318500 Parameters 2014-05-22 12:26:30.423318500 -------------------------- 2014-05-22 12:26:30.423318500{noformat} *Plausible Cause:* The Time Zone property is null (according to logs) and should be proper handled. *Temporary Workaround:* Restart Confluence. The error might reappear after a couple of days.

    Atlassian JIRA | 3 years ago | Duy Luong
    javax.ws.rs.WebApplicationException: java.lang.NullPointerException

    Root Cause Analysis

    1. javax.ws.rs.WebApplicationException

      java.lang.NullPointerException

      at com.atlassian.confluence.extra.calendar3.rest.CalendarResource$19.write()
    2. com.atlassian.confluence
      CalendarResource$19.write
      1. com.atlassian.confluence.extra.calendar3.rest.CalendarResource$19.write(CalendarResource.java:1495)
      1 frame
    3. jersey-core
      StreamingOutputProvider.writeTo
      1. com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
      2. com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
      2 frames
    4. Jersey
      WebApplicationImpl.handleRequest
      1. com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
      2. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
      3. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
      4. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
      4 frames
    5. Jersey
      ServletContainer.service
      1. com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      2. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
      2 frames
    6. com.atlassian.plugins
      RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter
      1. com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
      1 frame
    7. Jersey
      ServletContainer.doFilter
      1. com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795)
      1 frame
    8. com.atlassian.plugins
      RestDelegatingServletFilter.doFilter
      1. com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
      1 frame