diff --git a/src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java b/src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java
--- a/src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java
+++ b/src/org/openbravo/retail/posterminal/importprocess/POSImportEntryProcessor.java
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2015 Openbravo S.L.U.
+ * Copyright (C) 2015-2016 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -13,6 +13,7 @@
 
 import javax.enterprise.event.Observes;
 
+import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
@@ -33,8 +34,20 @@
  */
 public class POSImportEntryProcessor extends EntityPersistenceEventObserver {
 
-  private static Entity[] ENTITIES = { ModelProvider.getInstance().getEntity(
-      ImportEntry.ENTITY_NAME) };
+  private static final Logger log = Logger.getLogger(POSImportEntryProcessor.class);
+
+  private static final Entity IMPORT_ENTRY_ENTITY = ModelProvider.getInstance().getEntity(
+      ImportEntry.ENTITY_NAME);
+
+  private static final Entity[] ENTITIES = { IMPORT_ENTRY_ENTITY };
+  private static final Property STATUSPROPERTY = IMPORT_ENTRY_ENTITY
+      .getProperty(ImportEntry.PROPERTY_IMPORTSTATUS);
+  private static final Property ERRORINFO_PROPERTY = IMPORT_ENTRY_ENTITY
+      .getProperty(ImportEntry.PROPERTY_ERRORINFO);
+  private static final Property POSTERMINAL_PROPERTY = IMPORT_ENTRY_ENTITY
+      .getProperty(ImportEntry.PROPERTY_OBPOSPOSTERMINAL);
+  private static final Property ORGANIZATION_PROPERTY = IMPORT_ENTRY_ENTITY
+      .getProperty(ImportEntry.PROPERTY_ORGANIZATION);
 
   private static List<String> POSTTYPEOFDATA = Arrays.asList("Order", "BusinessPartner",
       "BusinessPartnerLocation", "OBPOS_App_Cashup", "FIN_Finacc_Transaction",
@@ -53,34 +66,35 @@
     final ImportEntry importEntry = (ImportEntry) event.getTargetInstance();
 
     try {
-      if (POSTTYPEOFDATA.contains(importEntry.getTypeofdata())) {
-        JSONObject jsonObject = new JSONObject(importEntry.getJsonInfo());
+      if (!POSTTYPEOFDATA.contains(importEntry.getTypeofdata())) {
+        return;
+      }
+      JSONObject jsonObject = new JSONObject(importEntry.getJsonInfo());
 
-        // TODO: using 2 different ways of writing posTerminal is just not nice...
-        String posTerminalId = ImportProcessUtils.getJSONProperty(jsonObject, "posterminal");
-        if (posTerminalId == null) {
-          posTerminalId = ImportProcessUtils.getJSONProperty(jsonObject, "posTerminal");
-        }
-        if (posTerminalId == null) {
-          posTerminalId = ImportProcessUtils.getJSONProperty(jsonObject, "pos");
-        }
-        if (posTerminalId != null) {
-          OBPOSApplications posTerminal = OBDal.getInstance().get(OBPOSApplications.class,
-              posTerminalId);
-          final Entity importEntryEntity = ModelProvider.getInstance().getEntity(
-              ImportEntry.ENTITY_NAME);
+      // TODO: using 2 different ways of writing posTerminal is just not nice...
+      String posTerminalId = ImportProcessUtils.getJSONProperty(jsonObject, "posterminal");
+      if (posTerminalId == null) {
+        posTerminalId = ImportProcessUtils.getJSONProperty(jsonObject, "posTerminal");
+      }
+      if (posTerminalId == null) {
+        posTerminalId = ImportProcessUtils.getJSONProperty(jsonObject, "pos");
+      }
+      // handle special case that webpos can send "null" in case of coding error
+      // in webpos
+      // handle it here
+      if (posTerminalId == null || "null".equals(posTerminalId)) {
+        log.warn("No posterminal can be determined from json " + jsonObject);
+        event.setCurrentState(STATUSPROPERTY, "Error");
+        event.setCurrentState(ERRORINFO_PROPERTY, "No posterminal can be determined from the json");
+        return;
+      }
 
-          final Property posTerminalProperty = importEntryEntity
-              .getProperty(ImportEntry.PROPERTY_OBPOSPOSTERMINAL);
-          event.setCurrentState(posTerminalProperty, posTerminal);
-
-          final Property orgProperty = importEntryEntity
-              .getProperty(ImportEntry.PROPERTY_ORGANIZATION);
-          event.setCurrentState(orgProperty, posTerminal.getOrganization());
-        }
-      }
+      final OBPOSApplications posTerminal = OBDal.getInstance().get(OBPOSApplications.class,
+          posTerminalId);
+      event.setCurrentState(POSTERMINAL_PROPERTY, posTerminal);
+      event.setCurrentState(ORGANIZATION_PROPERTY, posTerminal.getOrganization());
     } catch (JSONException e) {
-      throw new OBException(e);
+      throw new OBException("Exception occurred " + importEntry.getJsonInfo(), e);
     }
   }
-}
+}
\ No newline at end of file
