org.bedework.calfacade.exc.CalFacadeException: java.lang.NullPointerException

Apereo Issues | Matej Spiller-Muys | 4 years ago
  1. 0

    CalWS does not work very well. I was trying using it through wsimport and SoapUI. CalWS issues: 1. jaxws and soapUI seems to format input soap request. therefor hdrMsg.getFirstChild() and body.getFirstChild() returns #text node and not the element node, causing unmarshal error. According to SOAP spec this is allowed. Consider instead using: public static Element getFirstElement(Node parent) { Node n = parent.getFirstChild(); while (n != null && Node.ELEMENT_NODE != n.getNodeType()) { n = n.getNextSibling(); } if (n == null) { return null; } return (Element)n; } // Only expect one header at most. if (hdrMsg != null) { Element elem = getFirstElement(hdrMsg); if (elem != null) { res.hdrs = new Object[1]; res.hdrs[0] = u.unmarshal(elem); } } res.body = u.unmarshal(getFirstElement(body)); 2. SoapHandler MUST return Fault instead of a "throw new WebdavException(t);" WebdavException is generating 200 OK page confusing the web service clients and is not according to the SOAP specification. 3. CalWS-SOAP PDF from docs uses namespace xmlns:ns2="http://docs.oasis-open.org/ns/wscal/calws-soap" however wsdl is using xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap" Which one is correct? 4. addItem sample from PDF after fixing the namespace returns NPE <ns2:addItem xmlns:ns2="http://docs.oasis-open.org/ns/wscal/calws-soap" xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0"> <ns2:href>/user/douglm/calendar</ns2:href> <ns3:icalendar> <ns3:vcalendar> <ns3:components> <ns3:vevent> <ns3:properties> <ns3:uid> <ns3:text>1302064354993</ns3:text> </ns3:uid> <ns3:summary> <ns3:text>try this</ns3:text> </ns3:summary> <ns3:dtstart> <ns3:date-time>20110406T150000Z</ns3:date-time> </ns3:dtstart> <ns3:dtend> <ns3:date-time>20110406T160000Z</ns3:date-time> </ns3:dtend> </ns3:properties> </ns3:vevent> </ns3:components> </ns3:vcalendar> </ns3:icalendar> </ns2:addItem> 08:06:45,663 ERROR [BwSysIntfImpl] org.bedework.caldav.bwserver.BwSysIntfImpl@36 f065 org.bedework.calfacade.exc.CalFacadeException: java.lang.NullPointerException at org.bedework.icalendar.IcalTranslator.fromIcal(IcalTranslator.java:69 3) at org.bedework.caldav.bwserver.BwSysIntfImpl.fromIcal(BwSysIntfImpl.jav a:1725) at org.bedework.caldav.server.CaldavBWIntf.putEvent(CaldavBWIntf.java:94 5) at org.bedework.caldav.server.soap.calws.CalwsHandler.doAddItem(CalwsHan dler.java:605) at org.bedework.caldav.server.soap.calws.CalwsHandler.processRequest(Cal wsHandler.java:196) at org.bedework.caldav.server.soap.calws.CalwsHandler.processPost(CalwsH andler.java:155) at org.bedework.caldav.server.PostMethod.doMethod(PostMethod.java:286) at edu.rpi.cct.webdav.servlet.common.WebdavServlet.service(WebdavServlet .java:149) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:190) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:525) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce ss(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok e(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC onnectionValve.java:158) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:598) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 7) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at edu.rpi.cmt.calendar.XcalUtil.getDtTzid(XcalUtil.java:270) at edu.rpi.cmt.calendar.WsXMLTranslator.processValue(WsXMLTranslator.jav a:356) at edu.rpi.cmt.calendar.WsXMLTranslator.processProperty(WsXMLTranslator. java:218) at edu.rpi.cmt.calendar.WsXMLTranslator.processProperties(WsXMLTranslato r.java:157) at edu.rpi.cmt.calendar.WsXMLTranslator.processComponent(WsXMLTranslator .java:188) at edu.rpi.cmt.calendar.WsXMLTranslator.processCalcomps(WsXMLTranslator. java:173) at edu.rpi.cmt.calendar.WsXMLTranslator.processVcalendar(WsXMLTranslator .java:147) at edu.rpi.cmt.calendar.WsXMLTranslator.fromXcal(WsXMLTranslator.java:11 5) at org.bedework.icalendar.IcalTranslator.fromIcal(IcalTranslator.java:68 7) ... 30 more

    Apereo Issues | 4 years ago | Matej Spiller-Muys
    org.bedework.calfacade.exc.CalFacadeException: java.lang.NullPointerException
  2. 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
  3. 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 edu.rpi.cmt.calendar.XcalUtil.getDtTzid()
    2. edu.rpi.cmt
      WsXMLTranslator.fromXcal
      1. edu.rpi.cmt.calendar.XcalUtil.getDtTzid(XcalUtil.java:270)
      2. edu.rpi.cmt.calendar.WsXMLTranslator.processValue(WsXMLTranslator.java:356)
      3. edu.rpi.cmt.calendar.WsXMLTranslator.processProperty(WsXMLTranslator.java:218)
      4. edu.rpi.cmt.calendar.WsXMLTranslator.processProperties(WsXMLTranslator.java:157)
      5. edu.rpi.cmt.calendar.WsXMLTranslator.processComponent(WsXMLTranslator.java:188)
      6. edu.rpi.cmt.calendar.WsXMLTranslator.processCalcomps(WsXMLTranslator.java:173)
      7. edu.rpi.cmt.calendar.WsXMLTranslator.processVcalendar(WsXMLTranslator.java:147)
      8. edu.rpi.cmt.calendar.WsXMLTranslator.fromXcal(WsXMLTranslator.java:115)
      8 frames
    3. org.bedework.icalendar
      IcalTranslator.fromIcal
      1. org.bedework.icalendar.IcalTranslator.fromIcal(IcalTranslator.java:687)
      1 frame
    4. org.bedework.caldav
      PostMethod.doMethod
      1. org.bedework.caldav.bwserver.BwSysIntfImpl.fromIcal(BwSysIntfImpl.java:1725)
      2. org.bedework.caldav.server.CaldavBWIntf.putEvent(CaldavBWIntf.java:945)
      3. org.bedework.caldav.server.soap.calws.CalwsHandler.doAddItem(CalwsHandler.java:605)
      4. org.bedework.caldav.server.soap.calws.CalwsHandler.processRequest(CalwsHandler.java:196)
      5. org.bedework.caldav.server.soap.calws.CalwsHandler.processPost(CalwsHandler.java:155)
      6. org.bedework.caldav.server.PostMethod.doMethod(PostMethod.java:286)
      6 frames
    5. edu.rpi.cct
      WebdavServlet.service
      1. edu.rpi.cct.webdav.servlet.common.WebdavServlet.service(WebdavServlet.java:149)
      1 frame
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      1 frame
    7. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    8. JBoss Application Server Tomcat
      ReplyHeaderFilter.doFilter
      1. org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      1 frame
    9. Glassfish Core
      StandardContextValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      4 frames
    10. JBoss Application Server Tomcat
      SecurityAssociationValve.invoke
      1. org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      1 frame
    11. Glassfish Core
      AuthenticatorBase.invoke
      1. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
      1 frame
    12. JBoss Application Server Tomcat
      SecurityContextEstablishmentValve.invoke
      1. org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      2. org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      3. org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      3 frames
    13. Glassfish Core
      ErrorReportValve.invoke
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      2. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      2 frames
    14. JBoss Application Server Tomcat
      CachedConnectionValve.invoke
      1. org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      1 frame
    15. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
      2. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      3. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      3 frames
    16. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      3 frames
    17. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:662)
      1 frame