Exchange 2003 check modifications

1
In the Exchange 2003 I am using the check modified java call to check if an object has been updated/changed or removed. If an object is removed from exchange i would expect it to return the enum value of 'Object not found' but instead it gives a null pointer. Is this the intended behaviour? If so what function should we use to check if the object still exists on the exchange server? Edit: java.lang.NullPointerException at ie.b(SourceFile:164) at com.mendix.core.Core.execute(SourceFile:187) at gT.a(SourceFile:70) at kH.a(SourceFile:66) at eF.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at ie.b(SourceFile:155) at com.mendix.core.Core.execute(SourceFile:187) at dp.execute(SourceFile:183) at jg.a(SourceFile:280) at jg.a(SourceFile:212) at jg.processRequest(SourceFile:168) at fr.a(SourceFile:75) at com.mendix.core.MxRuntime.processRequest(SourceFile:889) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:39) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1007) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:619) Caused by: null at jec.framework.a.d.try(Unknown Source) at jec.framework.a.d.char(Unknown Source) at jec.a.a.a.if(Unknown Source) at jec.ExchangeConnector.getContactByURL(Unknown Source) at exchangeclient.helpers.ObjectRetrievalHelper.getContactByUrl(ObjectRetrievalHelper.java:342) at exchangeclient.helpers.ObjectRetrievalHelper.getContact(ObjectRetrievalHelper.java:287) at exchangeclient.actions.ObjectCheckModified.checkModifiedJEC(ObjectCheckModified.java:101) at exchangeclient.actions.ObjectCheckModified.executeAction(ObjectCheckModified.java:60) at exchangeclient.actions.ObjectCheckModified.executeAction(ObjectCheckModified.java:34) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at ie.b(SourceFile:155) at com.mendix.core.Core.execute(SourceFile:187) at gT.a(SourceFile:70) at kH.a(SourceFile:66) at eF.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at ie.b(SourceFile:155) at com.mendix.core.Core.execute(SourceFile:187) at dp.execute(SourceFile:183) at jg.a(SourceFile:280) at jg.a(SourceFile:212) at jg.processRequest(SourceFile:168) at fr.a(SourceFile:75) at com.mendix.core.MxRuntime.processRequest(SourceFile:889) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:39) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1007) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:619)
asked
1 answers
2

Update: Ok, this module tries finding an oject in various ways on Exchange, by UniqueIdForUrl, Url and Uid. But it looks like the library is not very robust when it comes to handling null values when looking up objects. You can fix this by checking whether these properties are null before actually calling the Exchange library to look them up. You can fix this by adding guards in front of the connector calls, like:

if (genericObject.getUrl() != null)
    contactDTO = connector.getContactByURL(genericObject.getUrl());

instead of just

contactDTO = connector.getContactByURL(genericObject.getUrl());

You will have to do this for all 3 attributes and for each type of object (email, contact, calendar item, task)

Update: I just emailed you the updated code, had to do it anyway :)

answered