opened
j-coll
username_0
When adding the AzureBatch in #937 the guava version increased from v18 to v20. This produced an incompatibility with Apache Phoenix, which was using a method removed in v20: `com.google.common.collect.Iterators.emptyIterator()`

Related phoenix issue: [PHOENIX-3556](https://issues.apache.org/jira/browse/PHOENIX-3556)

```
java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyIterator()Lcom/google/common/collect/UnmodifiableIterator; from class org.apache.phoenix.schema.MetaDataClient

	at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1644)
	at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:872)
	at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:194)
	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:343)
	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:331)
	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:330)
	at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1421)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2385)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2333)
	at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2333)
	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:237)
	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
	at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:205)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:208)
	at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:333)
	at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:306)
	at org.opencb.opencga.storage.hadoop.variant.index.phoenix.PhoenixHelper.newJdbcConnection(PhoenixHelper.java:214)
	at org.opencb.opencga.storage.hadoop.variant.index.phoenix.PhoenixHelper.newJdbcConnection(PhoenixHelper.java:205)
	at org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageTest.deleteTable(HadoopVariantStorageTest.java:427)
	at org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageTest.clearDB(HadoopVariantStorageTest.java:420)
	at org.opencb.opencga.storage.hadoop.variant.VariantHadoopStoragePipelineTest.beforeClass(VariantHadoopStoragePipelineTest.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
```
IllegalAccessError when connecting to Phoenix
issue
created
j-coll
username_0
Options:

- Shade more guava classes
    - [ ] Including the affected classes to the shaded jar is not possible because of the number of libraries using guava. This change affects to a core class of guava.
- Downgrade to v19
   - [x] Downgrade guava to v19 seems to work fine with Azure Batch library. 
      Thanks @wbari for testing and confirming this possibility
- Create a new shaded jar with azure batch and guava20
  - [ ] This will definitely work, but will require a lot of work to prepare the shaded jar
comment