Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Ask questions about your setup or get help installing ZCS server (ZD section below).
busymac
Posts: 6
Joined: Wed Oct 05, 2022 9:41 am

Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by busymac »

We have a user using our exchange client app (for macOS) and is experiencing sync issues. Upon investigation it seems the server is constantly sending back errors for even simple GetItem requests:

```
POST https://hostname/ews/Exchange.asmx
User-Agent: BusyCal-3.11.1 CFNetwork/1327.0.4 Darwin/21.2.0 CalendarAgent/961.4.2
Content-Type: text/xml; charset=UTF-8
SOAPAction: http://schemas.microsoft.com/exchange/s ... es/GetItem
Cache-Control: no-cache
2022-10-05 10:42:19 -2- received response =>
HTTP 200
URL: https://hostname/ews/Exchange.asmx
Strict-Transport-Security: max-age=31536000
Content-Encoding: gzip
Content-Type: text/xml;charset=utf-8
Vary: Accept-Encoding, User-Agent
Server: nginx
```

This returns:

```
<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelop ... ersionInfo xmlns:ns2="http://schemas.microsoft.com/exchange/s ... 2006/types" xmlns="http://schemas.microsoft.com/exchange/s ... 6/messages" MajorVersion="14" MinorVersion="3" MajorBuildNumber="158" MinorBuildNumber="11" Version="Exchange2010_SP2"/></soap:Header><soap:Body><GetItemResponse xmlns:ns2="http://schemas.microsoft.com/exchange/s ... 2006/types" xmlns="http://schemas.microsoft.com/exchange/s ... nseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></GetItemResponseMessage><GetItemResponseMessage ResponseClass="Error"><MessageText>ErrorGetItem: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null</MessageText></MessageText></GetItemResponseMessage></ResponseMessages></GetItemResponse></soap:Body></soap:Envelope>
```

It is throwing similar errors for other requests too - what do we do? Or what can we advise the user to do?
melbel
Posts: 9
Joined: Wed Oct 26, 2022 8:25 am

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by melbel »

Have you found a solution to this?

We recently bought a EWS license so that our MacOS users could use Zimbra with Outlook or the native Calendar client but were are seeing loads of exactly those errors and everybody who tried EWS is missing about half of their calendar entries.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2796
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.6 Network Edition
Contact:

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by L. Mark Stone »

melbel wrote:Have you found a solution to this?

We recently bought a EWS license so that our MacOS users could use Zimbra with Outlook or the native Calendar client but were are seeing loads of exactly those errors and everybody who tried EWS is missing about half of their calendar entries.
The "new" Outlook for Mac has become essentially a Microsoft-only email client unfortunately. If the interface allows you to switch to the "old" Outlook you should be OK.
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
busymac
Posts: 6
Joined: Wed Oct 05, 2022 9:41 am

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by busymac »

No we did not find a solution. This has nothing to do with new / old Outlook; the errors are coming from server-side Java and are implementation bugs / programmer errors. The error suggests they've got nullability checks failing internally and need to be patched within Zimbra.

It's not just Outlook failing - every other Calendar app we've tried to use on the mac is failing with dozens of events missing because of these errors.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2796
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.6 Network Edition
Contact:

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by L. Mark Stone »

busymac wrote:No we did not find a solution. This has nothing to do with new / old Outlook; the errors are coming from server-side Java and are implementation bugs / programmer errors. The error suggests they've got nullability checks failing internally and need to be patched within Zimbra.

It's not just Outlook failing - every other Calendar app we've tried to use on the mac is failing with dozens of events missing because of these errors.
Understood. Presumably you've already opened a Support Case?

If you post the Case# here, when others experience the same problem, they can reference your Case# and this forum thread in their own Support Case, which will help.
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
busymac
Posts: 6
Joined: Wed Oct 05, 2022 9:41 am

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by busymac »

I tried using the contact us link and the page failed with a 5XX error of some sort. I've been unable to open a case and assumed this is perhaps the only way to get through :cry:
busymac
Posts: 6
Joined: Wed Oct 05, 2022 9:41 am

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by busymac »

We are not Zimbra clients and so cannot seem to open a support ticket here: https://support.zimbra.com/s/login/?ec= ... management

Can someone help? Our customs are (we're developers of a calendaring client on macOS) however one of our customers reported back recently and said Zimbra Support is saying "This must be a client side bug, please use Apple Calendar instead" :o

Shocking.
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2796
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.6 Network Edition
Contact:

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by L. Mark Stone »

busymac wrote:We are not Zimbra clients and so cannot seem to open a support ticket here: https://support.zimbra.com/s/login/?ec= ... management

Can someone help? Our customs are (we're developers of a calendaring client on macOS) however one of our customers reported back recently and said Zimbra Support is saying "This must be a client side bug, please use Apple Calendar instead" :o

Shocking.
Not sure I've got this right...

You develop an Exchange Calendaring application that in Zimbra, relies on Exchange Web Services. Zimbra's EWS service is Network Edition only, so not available in the Open Source product. You don't have a Network Edition license.

How then do you test your application with Zimbra's EWS if you don't have a Zimbra server internally that actually does EWS? Do you at least have an account with a Zimbra Hosting Provider so you have access to an EWS-enabled mailbox?

Maybe I'm misunderstanding something.
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
busymac
Posts: 6
Joined: Wed Oct 05, 2022 9:41 am

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by busymac »

Not quite - we're developers of BusyCal https://busymac.com/busycal/index.html. This is a "Calendar" app for macOS and supports EWS, CalDAV, WebDAV and so on. Users using our app can add an existing EWS account to manage their calendars.

Existing clients that have a valid Zimbra license use our app to manage their calendars, except they're unable to sync correctly. After inspecting their client side logs, we discovered their Zimbra installation is throwing these server side errors.

We then asked them to test their account on other popular 3rd party calendaring apps on the mac (including Outlook) and it turns out every single app fails with similar errors, so it's not just us.

As a developer I understand the errors coming from Zimbra are server side errors - possibly bugs in Zimbra or a configuration issue of some sort that the client is unaware of.
melbel
Posts: 9
Joined: Wed Oct 26, 2022 8:25 am

Re: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

Post by melbel »

L. Mark Stone wrote:
busymac wrote:No we did not find a solution. This has nothing to do with new / old Outlook; the errors are coming from server-side Java and are implementation bugs / programmer errors. The error suggests they've got nullability checks failing internally and need to be patched within Zimbra.

It's not just Outlook failing - every other Calendar app we've tried to use on the mac is failing with dozens of events missing because of these errors.
Understood. Presumably you've already opened a Support Case?

If you post the Case# here, when others experience the same problem, they can reference your Case# and this forum thread in their own Support Case, which will help.
Yes, we have a support case: 01417225-EWS , so maybe others can chip in, since for us it's been sitting at "We have forwarded all the logs you shared with us to development team." for quite some while now. So maybe others can reference that and push the priority up a bit this way.

Turning EWS debugging on gives a complete stack trace in addition to the original error so IMO it should be quite easy for someone with access to the source to exactly see what's going wrong where.

Cheers
Michael
Post Reply