org.bedework.calfacade.exc.CalFacadeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by Matej Spiller-Muys,
  • 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
    via by Matej Spiller-Muys,
    • org.bedework.calfacade.exc.CalFacadeException: java.lang.NullPointerException at org.bedework.icalendar.IcalTranslator.fromIcal(IcalTranslator.java:693) at org.bedework.caldav.bwserver.BwSysIntfImpl.fromIcal(BwSysIntfImpl.java:1725) at org.bedework.caldav.server.CaldavBWIntf.putEvent(CaldavBWIntf.java:945) at org.bedework.caldav.server.soap.calws.CalwsHandler.doAddItem(CalwsHandler.java:605) at org.bedework.caldav.server.soap.calws.CalwsHandler.processRequest(CalwsHandler.java:196) at org.bedework.caldav.server.soap.calws.CalwsHandler.processPost(CalwsHandler.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(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 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.java:356) at edu.rpi.cmt.calendar.WsXMLTranslator.processProperty(WsXMLTranslator.java:218) at edu.rpi.cmt.calendar.WsXMLTranslator.processProperties(WsXMLTranslator.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:115) at org.bedework.icalendar.IcalTranslator.fromIcal(IcalTranslator.java:687) ... 30 more
    No Bugmate found.