java.lang.NullPointerException

Apereo Issues | Bruce Tong | 6 years ago
  1. 0

    If you use Outlook to export your calendar as an ICS file, it works fine, but if you use Outlook to create a new calendar and then "Save As" an ICS file, ical4j fails to parse it. The format of the ICS files for user-created calendars is different (for who knows what reason). The exception it throws is... Sep 8 10:08:36 localhost.localdomain local1:ERROR [CalendarPortlet.log] [org.jasig.portal.ChannelManager#211] processor.ICalendarContentProcessorImpl.[] - ParserException in getEvents Sep 8 10:08:36 localhost.localdomain net.fortuna.ical4j.data.ParserException: Error at line 22: null Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:135) Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:176) Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:157) Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:145) Sep 8 10:08:36 localhost.localdomain at org.jasig.portlet.calendar.processor.ICalendarContentProcessorImpl.getEvents(ICalendarContentProcessorImpl.java:72) Sep 8 10:08:37 localhost.localdomain at org.jasig.portlet.calendar.adapter.ConfigurableHttpCalendarAdapter.getEvents(ConfigurableHttpCalendarAdapter.java:161) Sep 8 10:08:37 localhost.localdomain at org.jasig.portlet.calendar.mvc.controller.AjaxCalendarController.getEventList(AjaxCalendarController.java:169) Sep 8 10:08:37 localhost.localdomain at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Sep 8 10:08:37 localhost.localdomain at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) Sep 8 10:08:37 localhost.localdomain at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Sep 8 10:08:37 localhost.localdomain at java.lang.reflect.Method.invoke(Method.java:597) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:271) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:259) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleAction(AnnotationMethodHandlerAdapter.java:210) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.DispatcherPortlet.doActionService(DispatcherPortlet.java:694) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:480) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.FrameworkPortlet.processAction(FrameworkPortlet.java:462) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:145) Sep 8 10:08:37 localhost.localdomain at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) Sep 8 10:08:37 localhost.localdomain at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:167) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.DefaultPortletInvokerService.action(DefaultPortletInvokerService.java:85) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.PortletContainerImpl.doAction(PortletContainerImpl.java:217) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.portlet.rendering.PortletRendererImpl.doAction(PortletRendererImpl.java:184) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.channels.portlet.SpringPortletChannelImpl.action(SpringPortletChannelImpl.java:260) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.channels.portlet.CSpringPortletAdaptor.processAction(CSpringPortletAdaptor.java:155) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:524) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:41) Sep 8 10:08:37 localhost.localdomain at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source) Sep 8 10:08:37 localhost.localdomain at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Sep 8 10:08:37 localhost.localdomain at java.lang.reflect.Method.invoke(Method.java:597) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) Sep 8 10:08:37 localhost.localdomain at org.springframework.orm.jpa.JpaInterceptor.invoke(JpaInterceptor.java:96) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.$Proxy145.run(Unknown Source) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.FutureTask.run(FutureTask.java:138) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) Sep 8 10:08:37 localhost.localdomain at java.lang.Thread.run(Thread.java:619) Sep 8 10:08:37 localhost.localdomain aused by: java.lang.NullPointerException Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.startProperty(CalendarBuilder.java:332) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parseProperty(CalendarParserImpl.java:189) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:163) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parseComponent(CalendarParserImpl.java:344) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:160) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:112) Sep 8 10:08:37 localhost.localdomain ... 51 more Well it turns out that there are ical4j properties that can be set to change the way the parser behaves. If you make an ical4j.properties file like this... src/main/resources/ical4j.properties ---- start ---- # Known optional properties for ical4j: #net.fortuna.ical4j.parser=net.fortuna.ical4j.data.HCalendarParserFactory #net.fortuna.ical4j.timezone.registry=net.fortuna.ical4j.model.DefaultTimeZoneRegistryFactory #net.fortuna.ical4j.timezone.update.enabled={true|false} #net.fortuna.ical4j.timezone.date.floating={true|false} #net.fortuna.ical4j.factory.decoder=net.fortuna.ical4j.util.DefaultDecoderFactory #net.fortuna.ical4j.factory.encoder=net.fortuna.ical4j.util.DefaultEncoderFactory #net.fortuna.ical4j.recur.maxincrementcount=1000 #ical4j.unfolding.relaxed={true|false} #ical4j.parsing.relaxed={true|false} #ical4j.validation.relaxed={true|false} #ical4j.compatibility.outlook={true|false} #ical4j.compatibility.notes={true|false} # Values... ical4j.unfolding.relaxed=true ical4j.compatibility.outlook=true ical4j.compatibility.notes=true ---- end ---- I'll attach a copy of the properties file too.

    Apereo Issues | 6 years ago | Bruce Tong
    java.lang.NullPointerException
  2. 0

    If you use Outlook to export your calendar as an ICS file, it works fine, but if you use Outlook to create a new calendar and then "Save As" an ICS file, ical4j fails to parse it. The format of the ICS files for user-created calendars is different (for who knows what reason). The exception it throws is... Sep 8 10:08:36 localhost.localdomain local1:ERROR [CalendarPortlet.log] [org.jasig.portal.ChannelManager#211] processor.ICalendarContentProcessorImpl.[] - ParserException in getEvents Sep 8 10:08:36 localhost.localdomain net.fortuna.ical4j.data.ParserException: Error at line 22: null Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:135) Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:176) Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:157) Sep 8 10:08:36 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:145) Sep 8 10:08:36 localhost.localdomain at org.jasig.portlet.calendar.processor.ICalendarContentProcessorImpl.getEvents(ICalendarContentProcessorImpl.java:72) Sep 8 10:08:37 localhost.localdomain at org.jasig.portlet.calendar.adapter.ConfigurableHttpCalendarAdapter.getEvents(ConfigurableHttpCalendarAdapter.java:161) Sep 8 10:08:37 localhost.localdomain at org.jasig.portlet.calendar.mvc.controller.AjaxCalendarController.getEventList(AjaxCalendarController.java:169) Sep 8 10:08:37 localhost.localdomain at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Sep 8 10:08:37 localhost.localdomain at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) Sep 8 10:08:37 localhost.localdomain at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Sep 8 10:08:37 localhost.localdomain at java.lang.reflect.Method.invoke(Method.java:597) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:271) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:259) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleAction(AnnotationMethodHandlerAdapter.java:210) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.DispatcherPortlet.doActionService(DispatcherPortlet.java:694) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:480) Sep 8 10:08:37 localhost.localdomain at org.springframework.web.portlet.FrameworkPortlet.processAction(FrameworkPortlet.java:462) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:145) Sep 8 10:08:37 localhost.localdomain at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) Sep 8 10:08:37 localhost.localdomain at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) Sep 8 10:08:37 localhost.localdomain at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:167) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.DefaultPortletInvokerService.action(DefaultPortletInvokerService.java:85) Sep 8 10:08:37 localhost.localdomain at org.apache.pluto.core.PortletContainerImpl.doAction(PortletContainerImpl.java:217) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.portlet.rendering.PortletRendererImpl.doAction(PortletRendererImpl.java:184) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.channels.portlet.SpringPortletChannelImpl.action(SpringPortletChannelImpl.java:260) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.channels.portlet.CSpringPortletAdaptor.processAction(CSpringPortletAdaptor.java:155) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:524) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:41) Sep 8 10:08:37 localhost.localdomain at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source) Sep 8 10:08:37 localhost.localdomain at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Sep 8 10:08:37 localhost.localdomain at java.lang.reflect.Method.invoke(Method.java:597) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) Sep 8 10:08:37 localhost.localdomain at org.springframework.orm.jpa.JpaInterceptor.invoke(JpaInterceptor.java:96) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) Sep 8 10:08:37 localhost.localdomain at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) Sep 8 10:08:37 localhost.localdomain at org.jasig.portal.$Proxy145.run(Unknown Source) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.FutureTask.run(FutureTask.java:138) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) Sep 8 10:08:37 localhost.localdomain at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) Sep 8 10:08:37 localhost.localdomain at java.lang.Thread.run(Thread.java:619) Sep 8 10:08:37 localhost.localdomain aused by: java.lang.NullPointerException Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarBuilder.startProperty(CalendarBuilder.java:332) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parseProperty(CalendarParserImpl.java:189) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:163) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parseComponent(CalendarParserImpl.java:344) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:160) Sep 8 10:08:37 localhost.localdomain at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:112) Sep 8 10:08:37 localhost.localdomain ... 51 more Well it turns out that there are ical4j properties that can be set to change the way the parser behaves. If you make an ical4j.properties file like this... src/main/resources/ical4j.properties ---- start ---- # Known optional properties for ical4j: #net.fortuna.ical4j.parser=net.fortuna.ical4j.data.HCalendarParserFactory #net.fortuna.ical4j.timezone.registry=net.fortuna.ical4j.model.DefaultTimeZoneRegistryFactory #net.fortuna.ical4j.timezone.update.enabled={true|false} #net.fortuna.ical4j.timezone.date.floating={true|false} #net.fortuna.ical4j.factory.decoder=net.fortuna.ical4j.util.DefaultDecoderFactory #net.fortuna.ical4j.factory.encoder=net.fortuna.ical4j.util.DefaultEncoderFactory #net.fortuna.ical4j.recur.maxincrementcount=1000 #ical4j.unfolding.relaxed={true|false} #ical4j.parsing.relaxed={true|false} #ical4j.validation.relaxed={true|false} #ical4j.compatibility.outlook={true|false} #ical4j.compatibility.notes={true|false} # Values... ical4j.unfolding.relaxed=true ical4j.compatibility.outlook=true ical4j.compatibility.notes=true ---- end ---- I'll attach a copy of the properties file too.

    Apereo Issues | 6 years ago | Bruce Tong
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at net.fortuna.ical4j.data.CalendarBuilder.startProperty()
    2. iCal4j
      CalendarParserImpl.parse
      1. net.fortuna.ical4j.data.CalendarBuilder.startProperty(CalendarBuilder.java:332)
      2. net.fortuna.ical4j.data.CalendarParserImpl.parseProperty(CalendarParserImpl.java:189)
      3. net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:163)
      4. net.fortuna.ical4j.data.CalendarParserImpl.parseComponent(CalendarParserImpl.java:344)
      5. net.fortuna.ical4j.data.CalendarParserImpl.parsePropertyList(CalendarParserImpl.java:160)
      6. net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:112)
      6 frames