EWS Managed API-Null pointer exception when binding to an appointment
-
Friday, February 17, 2012 9:30 PM
Hi all, I am uisng Java EWS Managed API 1.1.3 with Exchange 2007 SP 1 and I am trying to delete a recurring meeting by binding to the master id as follows:
Appointment meeting = Appointment.bind(service, new ItemId(masterIDstr));
I get the following null pointer exception:
false
java.lang.NullPointerException
at microsoft.exchange.webservices.data.Strings.<clinit>(Strings.java:221)
at microsoft.exchange.webservices.data.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:51)
at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:140)
at microsoft.exchange.webservices.data.ExchangeService.internalBindToItems(ExchangeService.java:1390)
at microsoft.exchange.webservices.data.ExchangeService.bindToItem(ExchangeService.java:1433)
at microsoft.exchange.webservices.data.ExchangeService.bindToItem(ExchangeService.java:1457)
at microsoft.exchange.webservices.data.Appointment.bind(Appointment.java:70)
at microsoft.exchange.webservices.data.Appointment.bind(Appointment.java:88)I double checked that the masterIDstr is valid. Any ideas?
- Edited by PythonCoder5 Friday, February 17, 2012 9:31 PM
All Replies
-
Sunday, February 19, 2012 5:49 AMI also tried with the EWS Java API 1.1.5 and I still get the null pointer exception. The only change I made to that API's jar is in Appointment.java, where I commented out lines 249, 250, and 256.
-
Wednesday, February 22, 2012 12:02 AMSeriously?! Noone has encountered this problem?
-
Monday, February 27, 2012 7:26 AM
Hi,
I also had a similar issue. http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/484bb22d-1c40-4a5d-ad8e-564fdf8f568e/.
But this is solved in the release 1.1.3. Now everything works fine for me.
Are you getting this exception in a stand alone application or is it happening in a web application?
From the code, it seems to me that Thread.currentThread().getContextClassLoader().getResource("microsoft/exchange/webservices/data/Strings.properties") is returning null.
You could actually verify that Strings.properties file is present in the EWSAPI-1.1.5.jar in the package "microsoft/exchange/webservices/data".
Regards,
Paul
-
Tuesday, February 28, 2012 6:42 AMThank you so much for replying Paul. I am getting this error in a standalone application. I checked my jar and I have StringPropertyDefinition.java and Strings.java but no String.properties.
-
Saturday, June 09, 2012 12:44 AM
Just an FYI - I found the Strings.properties is in the root folder of the extracted EWS toolkit.
I added the properties file to the microsoft.exchange.webservices.data package and the NullPointerException went away
- Edited by Cary Bran Saturday, June 09, 2012 1:33 AM

