Q:

NPE while receiving messages from Azure Service bus Queue

NPE while receving messages from Queue. ( Only when messages are present in Queue). I feel like there is an issue with de-serializing the messages.  
java.lang.NullPointerException
        at com.sun.jersey.api.client.ClientResponse.getResponseDate(ClientResponse.java:738)
        at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusRestProxy.receiveMessage(ServiceBusRestProxy.java:288)
        at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusRestProxy.receiveQueueMessage(ServiceBusRestProxy.java:225)
        at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusExceptionProcessor.receiveQueueMessage(ServiceBusExceptionProcessor.java:142)
RECEIVE_AND_DELETE option deletes the messages and throws NPE. 
All other operations like create queue , send messages etc working fine. Any thoughts one this ?
Code to receive message
public void receiveMessage(String queueName) {
        try {
            ReceiveMessageOptions opts = ReceiveMessageOptions.DEFAULT;
            opts.setReceiveMode(ReceiveMode.PEEK_LOCK);

            while (true) {
                ReceiveQueueMessageResult resultQM
                        = service.receiveQueueMessage(queueName, opts);
                BrokeredMessage message = resultQM.getValue();
                if (message != null && message.getMessageId() != null) {
                    log.println("MessageID: " + message.getMessageId());
                    // Display the queue message.
                    log.print("From queue: ");
                    byte[] b = new byte[200];
                    String s = null;
                    int numRead = message.getBody().read(b);
                    while (-1 != numRead) {
                        s = new String(b);
                        s = s.trim();
                        System.out.print(s);
                        numRead = message.getBody().read(b);
                    }
                    log.println("");
                    log.println("Custom Property: "
                            + message.getProperty("MyProperty"));
                    // Remove message from queue.
                    log.println("Deleting this message.");
                    //service.deleteMessage(message);
                } else {
                    log.println("Finishing up - no more messages.");
                    break;
                    // Added to handle no more messages.
                    // Could instead wait for more messages to be added.
                }
            }
        } catch (Exception e) {
            log.print(e);
        }
    }

A:

Even though it was throwing NPE the actual issue was with the missing jar files. Here is the list of jar files 
          <dependencies>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt-compute</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt-network</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt-sql</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt-storage</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt-websites</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-svc-mgmt-media</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-servicebus</artifactId>
                        <version>0.9.7</version>
                </dependency>
                <dependency>
                        <groupId>com.microsoft.azure</groupId>
                        <artifactId>azure-serviceruntime</artifactId>
                        <version>0.9.7</version>
                </dependency>
        </dependencies>

