Menu

#580 Cannot create tasks in Exchange 2013 SP1

v4.5.1
closed-fixed
nobody
tasks (1)
5
2018-05-24
2014-10-23
No

Hello,

when I try to create a tasks in my Exchange 2013 account I get a 503 error in Lighting. It seems it´s trying to write the task in the "calendar folder" instead of the "tasks folder". In the debug file of DAVMail I get this:

2014-10-23 08:20:18,492 INFO [main] davmail - DavMail Gateway 4.5.1-2303 listening on SMTP port 1025 POP port 1110 IMAP port 1143 CALDAV port 1080 LDAP port 1389
2014-10-23 08:20:19,982 DEBUG [CheckRelease] davmail.DavGateway - DavMail released version: 4.5.1-2303
2014-10-23 08:20:41,106 DEBUG [davmail.caldav.CaldavServer] davmail - Connection from /0:0:0:0:0:0:0:1 on port 1080
2014-10-23 08:20:41,112 DEBUG [CaldavConnection-50748] davmail - < PUT /users/cc-my-user%40mydomain.noexists/calendar/ae460248-371f-4846-bbeb-8f714d7a9978.ics HTTP/1.1
2014-10-23 08:20:41,113 DEBUG [CaldavConnection-50748] davmail - < Host: localhost:1080
2014-10-23 08:20:41,114 DEBUG [CaldavConnection-50748] davmail - < User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 Lightning/3.3.1
2014-10-23 08:20:41,114 DEBUG [CaldavConnection-50748] davmail - < Accept: text/xml
2014-10-23 08:20:41,114 DEBUG [CaldavConnection-50748] davmail - < Accept-Language: en-US,en;q=0.5
2014-10-23 08:20:41,114 DEBUG [CaldavConnection-50748] davmail - < Accept-Encoding: gzip, deflate
2014-10-23 08:20:41,115 DEBUG [CaldavConnection-50748] davmail - < Accept-Charset: utf-8,;q=0.1
2014-10-23 08:20:41,115 DEBUG [CaldavConnection-50748] davmail - < Content-Length: 279
2014-10-23 08:20:41,115 DEBUG [CaldavConnection-50748] davmail - < Content-Type: text/calendar; charset=utf-8
2014-10-23 08:20:41,115 DEBUG [CaldavConnection-50748] davmail - < If-None-Match:

2014-10-23 08:20:41,115 DEBUG [CaldavConnection-50748] davmail - < Authorization: **
2014-10-23 08:20:41,115 DEBUG [CaldavConnection-50748] davmail - < Connection: keep-alive
2014-10-23 08:20:41,116 DEBUG [CaldavConnection-50748] davmail - < Pragma: no-cache
2014-10-23 08:20:41,116 DEBUG [CaldavConnection-50748] davmail - < Cache-Control: no-cache
2014-10-23 08:20:41,118 DEBUG [CaldavConnection-50748] davmail.caldav.CaldavConnection - < BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTODO
CREATED:20141023T072039Z
LAST-MODIFIED:20141023T072041Z
DTSTAMP:20141023T072041Z
UID:ae460248-371f-4846-bbeb-8f714d7a9978
SUMMARY:aaa
CLASS:PUBLIC
END:VTODO
END:VCALENDAR

2014-10-23 08:20:41,361 DEBUG [CaldavConnection-50748] davmail - executeFollowRedirects(https://owa.mydomain.noexists/owa)
2014-10-23 08:20:41,368 DEBUG [CaldavConnection-50748] davmail - executeFollowRedirects: https://owa.mydomain.noexists/owa/auth/logon.aspx?url=https%3a%2f%2fowa.mydomain.noexists%2fowa&reason=0 redirectCount:1
2014-10-23 08:20:41,373 DEBUG [CaldavConnection-50748] davmail.exchange.ExchangeSession - Form based authentication detected
2014-10-23 08:20:41,387 DEBUG [CaldavConnection-50748] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://owa.mydomain.noexists/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fowa.mydomain.noexists%2fowa
2014-10-23 08:20:41,387 DEBUG [CaldavConnection-50748] davmail - executeFollowRedirects(https://owa.mydomain.noexists/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fowa.mydomain.noexists%2fowa)
2014-10-23 08:20:41,403 DEBUG [CaldavConnection-50748] davmail - executeFollowRedirects(https://owa.mydomain.noexists/owa/auth.owa)
2014-10-23 08:20:41,458 DEBUG [CaldavConnection-50748] davmail - executeFollowRedirects: https://owa.mydomain.noexists/owa redirectCount:1
2014-10-23 08:20:41,539 DEBUG [CaldavConnection-50748] davmail - executeFollowRedirects: /owa/ redirectCount:2
2014-10-23 08:20:41,778 WARN [CaldavConnection-50748] org.apache.commons.httpclient.HttpMethodDirector - Unable to respond to any of these challenges: {ntlm=NTLM, negotiate=Negotiate}
2014-10-23 08:20:41,792 WARN [CaldavConnection-50748] org.apache.commons.httpclient.HttpMethodDirector - Unable to respond to any of these challenges: {ntlm=NTLM, negotiate=Negotiate}
2014-10-23 08:20:41,793 DEBUG [CaldavConnection-50748] davmail.http.DavGatewayHttpClientFacade - Received 401 unauthorized at /ews/services.wsdl, retrying with NTLM
2014-10-23 08:20:42,290 DEBUG [CaldavConnection-50748] davmail.exchange.ExchangeSession - Current user email is cc-my-user@demydomain.noexists, alias is cc-my-user on Exchange2013
2014-10-23 08:20:42,290 DEBUG [CaldavConnection-50748] davmail.exchange.ExchangeSession - Session davmail.exchange.ews.EwsExchangeSession@12946d8 created
2014-10-23 08:20:42,290 DEBUG [CaldavConnection-50748] davmail.exchange.ExchangeSession - Created new session davmail.exchange.ews.EwsExchangeSession@12946d8 for user demydomain.noexists\my-user
2014-10-23 08:20:42,739 DEBUG [CaldavConnection-50748] davmail.exchange.ExchangeSession - Fixed Vcalendar body to server:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:GMT Standard Time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T010000
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VTODO
CREATED:20141023T072039Z
LAST-MODIFIED:20141023T072041Z
DTSTAMP:20141023T072041Z
UID:ae460248-371f-4846-bbeb-8f714d7a9978
SUMMARY:aaa
CLASS:PUBLIC
END:VTODO
END:VCALENDAR

2014-10-23 08:20:42,828 DEBUG [CaldavConnection-50748] davmail.exchange.ews.EWSMethod - ErrorCannotCreateTaskInNonTaskFolder
2014-10-23 08:20:42,830 ERROR [CaldavConnection-50748] davmail - ErrorCannotCreateTaskInNonTaskFolder No se puede crear ninguna tarea en una carpeta que no sea de tareas.
request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/></soap:Header><soap:Body><m:CreateItem SendMeetingInvitations="SendToNone" MessageDisposition="SaveOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="calendar"><t:Mailbox><t:EmailAddress>cc-my-user@mydomain.noexists</t:EmailAddress></t:Mailbox></t:DistinguishedFolderId></m:SavedItemFolderId><m:Items><t:Task><t:ExtendedProperty><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="urn:schemas:calendar:uid" PropertyType="String"/><t:Value>ae460248-371f-4846-bbeb-8f714d7a9978</t:Value></t:ExtendedProperty><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x10f3" PropertyType="String"/><t:Value>ae460248-371f-4846-bbeb-8f714d7a9978.EML</t:Value></t:ExtendedProperty><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x37" PropertyType="String"/><t:Value>aaa</t:Value></t:ExtendedProperty><t:PercentComplete>0</t:PercentComplete><t:Status>NotStarted</t:Status></t:Task></m:Items></m:CreateItem></soap:Body></soap:Envelope>
davmail.exchange.ews.EWSException: ErrorCannotCreateTaskInNonTaskFolder No se puede crear ninguna tarea en una carpeta que no sea de tareas.
request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/></soap:Header><soap:Body><m:CreateItem SendMeetingInvitations="SendToNone" MessageDisposition="SaveOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="calendar"><t:Mailbox><t:EmailAddress>cc-my-user@mydomain.noexists</t:EmailAddress></t:Mailbox></t:DistinguishedFolderId></m:SavedItemFolderId><m:Items><t:Task><t:ExtendedProperty><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="urn:schemas:calendar:uid" PropertyType="String"/><t:Value>ae460248-371f-4846-bbeb-8f714d7a9978</t:Value></t:ExtendedProperty><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x10f3" PropertyType="String"/><t:Value>ae460248-371f-4846-bbeb-8f714d7a9978.EML</t:Value></t:ExtendedProperty><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x37" PropertyType="String"/><t:Value>aaa</t:Value></t:ExtendedProperty><t:PercentComplete>0</t:PercentComplete><t:Status>NotStarted</t:Status></t:Task></m:Items></m:CreateItem></soap:Body></soap:Envelope>
at davmail.exchange.ews.EWSMethod.checkSuccess(EWSMethod.java:715)
at davmail.exchange.ews.EwsExchangeSession.executeMethod(EwsExchangeSession.java:2348)
at davmail.exchange.ews.EwsExchangeSession$Event.createOrUpdate(EwsExchangeSession.java:1688)
at davmail.exchange.ews.EwsExchangeSession.internalCreateOrUpdateEvent(EwsExchangeSession.java:2123)
at davmail.exchange.ExchangeSession.createOrUpdateItem(ExchangeSession.java:3056)
at davmail.caldav.CaldavConnection.handleFolderOrItem(CaldavConnection.java:287)
at davmail.caldav.CaldavConnection.handleRequest(CaldavConnection.java:225)
at davmail.caldav.CaldavConnection.run(CaldavConnection.java:169)
2014-10-23 08:20:43,833 DEBUG [CaldavConnection-50748] davmail - > HTTP/1.1 503 Service Unavailable
2014-10-23 08:20:43,834 DEBUG [CaldavConnection-50748] davmail - > Server: DavMail Gateway 4.5.1-2303
2014-10-23 08:20:43,834 DEBUG [CaldavConnection-50748] davmail - > DAV: 1, calendar-access, calendar-schedule, calendarserver-private-events, addressbook
2014-10-23 08:20:43,834 DEBUG [CaldavConnection-50748] davmail - > Date: Thu, 23 Oct 2014 07:20:43 +0000
2014-10-23 08:20:43,834 DEBUG [CaldavConnection-50748] davmail - > Expires: Thu, 23 Oct 2014 07:20:43 +0000
2014-10-23 08:20:43,835 DEBUG [CaldavConnection-50748] davmail - > Cache-Control: private, max-age=0
2014-10-23 08:20:43,835 DEBUG [CaldavConnection-50748] davmail - > Content-Type: text/plain;charset=UTF-8
2014-10-23 08:20:43,835 DEBUG [CaldavConnection-50748] davmail - > Connection: close
2014-10-23 08:20:43,835 DEBUG [CaldavConnection-50748] davmail - > Content-Length: 1339
2014-10-23 08:20:43,835 DEBUG [CaldavConnection-50748] davmail - >
2014-10-23 08:20:43,836 DEBUG [CaldavConnection-50748] davmail.caldav.CaldavConnection - > ErrorCannotCreateTaskInNonTaskFolder No se puede crear ninguna tarea en una carpeta que no sea de tareas.
request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><soap:Header><t:RequestServerVersion Version="Exchange2013"/></soap:Header><soap:Body><m:CreateItem SendMeetingInvitations="SendToNone" MessageDisposition="SaveOnly"><m:SavedItemFolderId><t:DistinguishedFolderId Id="calendar"><t:Mailbox><t:EmailAddress>cc-my-user@mydomain.noexists</t:EmailAddress></t:Mailbox></t:DistinguishedFolderId></m:SavedItemFolderId><m:Items><t:Task><t:ExtendedProperty><t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="urn:schemas:calendar:uid" PropertyType="String"/><t:Value>ae460248-371f-4846-bbeb-8f714d7a9978</t:Value></t:ExtendedProperty><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x10f3" PropertyType="String"/><t:Value>ae460248-371f-4846-bbeb-8f714d7a9978.EML</t:Value></t:ExtendedProperty><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x37" PropertyType="String"/><t:Value>aaa</t:Value></t:ExtendedProperty><t:PercentComplete>0</t:PercentComplete><t:Status>NotStarted</t:Status></t:Task></m:Items></m:CreateItem></soap:Body></soap:Envelope>

Discussion

  • Mickael Guessant

    It's supposed to detect tasks and switch from calendar to tasks folder:

    if (vCalendar.isTodo() && isMainCalendar(folderPath)) {
    // task item, move to tasks folder
    folderPath = TASKS;
    }

    => Somehow it does not switch ?!?

     
  • Mjasnik

    Mjasnik - 2015-05-19

    Hi,

    I faced the same problem in 4.6.1 and the problem was due to folder "davmailtemp". The error is not really obvious to find from the logs.

    There is "createCalendarFolder("davmailtemp", null);" in method loadVtimezone in EwsExchangeSession.java, if smth happens after creation and folder was not created as CalendarFolder before, this error occurs. How this happened - I don't know.

    I solved it by adding "deleteFolder("davmailtemp");" in the catch block for the method like this:

    java

        } catch (IOException e) {
            if (folderCreated) {
                LOGGER.warn("Delete temp folder - some error occured before delete folder");
                try {
                    deleteFolder("davmailtemp");
                } catch (IOException ex) {
                    LOGGER.warn("Unable to get DELETE temp folder: " + ex, ex);
                }
            }
            LOGGER.warn("Unable to get VTIMEZONE info: " + e, e);
        }
    

    Hopefully this helps.

     

    Last edit: Mjasnik 2015-05-19
  • Mickael Guessant

    • status: open --> closed-fixed
     
  • Mickael Guessant

    Definitely fixed in 4.8.5

     

Log in to post a comment.