title: A null pointer exception of connecting hybris database using flexiblesearch service because of getJaloResult() error
body: <p>A <code>null</code> pointer exception occurred when trying to connect to <code>hybris</code> database using <code>hybris</code> flexible search service seemingly due to <code>getJaloResult()</code> method.</p>
  
  <p>I need to retrieve certain data from <code>hybris</code> commerce database. I tried to use <code>hybris</code> flexible service to do that by using <code>defaultFlexibleSearchService.search()</code> method, but I got a <code>null</code> pointer exception. It seems that the exception occurred when <code>search()</code> method tries to call <code>getJaloResult()</code> method. I have no clue about the solution - thanks for any hints. </p>
  
  <p>My class definition code is here</p>
  
  <pre><code>package de.hybris.platform.integrationservices.audit;
  import java.util.stream.Stream;
  import com.sun.tools.javac.util.List;
  import de.hybris.platform.audit.TypeAuditReportConfig;
  import de.hybris.platform.audit.view.AuditViewService;
  import de.hybris.platform.audit.view.impl.ReportView;
  import de.hybris.platform.servicelayer.search.FlexibleSearchQuery;
  import de.hybris.platform.servicelayer.search.FlexibleSearchService;
  import de.hybris.platform.servicelayer.search.RelationQuery;
  import de.hybris.platform.servicelayer.search.SearchResult;
  import de.hybris.platform.servicelayer.search.impl.DefaultFlexibleSearchService;
  import de.hybris.platform.integrationservices.model.IntegrationObjectModel;  
  
  public class IntegrationObjectAudit implements AuditViewService
  {
      private DefaultFlexibleSearchService defaultFlexibleSearchService;
  
      public IntegrationObjectAudit() {
          defaultFlexibleSearchService = new DefaultFlexibleSearchService();
      }
  
      public List&lt;IntegrationObjectModel&gt; searchModel(){
          String query = "SELECT {PK} FROM {IntegrationObject}";
          FlexibleSearchQuery flexibleSearchQuery = new FlexibleSearchQuery(query);
          flexibleSearchQuery.setCount(1);
  
          de.hybris.platform.servicelayer.search.SearchResult&lt;IntegrationObjectModel&gt; resListIntegrationModel = this.defaultFlexibleSearchService.search(query);
          List&lt;IntegrationObjectModel&gt; resList = (List&lt;IntegrationObjectModel&gt;) resListIntegrationModel.getResult();
          return resList;
      }
  }
  </code></pre>