title: java.lang.IllegalAccessError: tried to access field
body: <p>I am getting the error:</p>
  
  <p>java.lang.IllegalAccessError: tried to access field com.google.gson.JsonNull.INSTANCE from a method in a class that is in a jar, Jest-0.0.2.jar. I also have the package com.google.gson loaded using the gradle artifact: compile 'com.google.code.gson:gson:2.2.1'</p>
  
  <p>All the projects compile fine, but at runtime, I get the following error:</p>
  
  <p>java.lang.IllegalAccessError: tried to access field com.google.gson.JsonNull.INSTANCE from class io.searchbox.client.http.JestHttpClient
      at io.searchbox.client.http.JestHttpClient.isJson(JestHttpClient.java:155)
      at io.searchbox.client.http.JestHttpClient.createJsonStringEntity(JestHttpClient.java:142)
      at io.searchbox.client.http.JestHttpClient.constructHttpMethod(JestHttpClient.java:117)
      at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:46)</p>
  
  <p>Not sure why this error shows up. I understand that this is possible if there are two separate class loaders. But I am not doing anything special to load multiple class loaders.</p>
  
  <p>Any help would be much appreciated.</p>