title: HIVE not working, No suitable driver found for jdbc:derby://localhost:1527
body: <p>I followed the tutorial here <a href="http://www.tutorialspoint.com/hive/hive_installation.htm" rel="nofollow">http://www.tutorialspoint.com/hive/hive_installation.htm</a> to install HIVE but I am getting this error when running <code>bin/hive</code>.      </p>
  
  <p>Hadoop is running as I am able to access <code>http://localhost:50070/dfshealth.html#tab-overview</code></p>
  
  <pre><code>hduser@nikhil-Lenovo-IdeaPad-Y500:/usr/local/hive$ bin/hive
  SLF4J: Class path contains multiple SLF4J bindings.
  SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
  
  Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async: true
  Tue Jun 28 00:08:38 IST 2016 Thread[main,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
  Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
      at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:578)
      at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
      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.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
      at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:226)
      at org.apache.hadoop.hive.ql.metadata.Hive.&lt;init&gt;(Hive.java:366)
      at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
      at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
      at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
      at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
      ... 9 more
  Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1627)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.&lt;init&gt;(RetryingMetaStoreClient.java:80)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101)
      at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3317)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3356)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)
      at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)
      at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)
      at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)
      ... 14 more
  Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1625)
      ... 23 more
  Caused by: javax.jdo.JDOFatalDataStoreException: Unable to open a test connection to the given database. JDBC url = jdbc:derby://localhost:1527/metastore_db;create=true , username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
  java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/metastore_db;create=true
      at java.sql.DriverManager.getConnection(DriverManager.java:689)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)
      at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
      at com.jolbox.bonecp.BoneCP.&lt;init&gt;(BoneCP.java:416)
      at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
      at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:483)
      at org.datanucleus.store.rdbms.RDBMSStoreManager.&lt;init&gt;(RDBMSStoreManager.java:296)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:606)
      at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
      at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHelper.java:133)
      at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl.java:420)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:821)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:338)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:217)
      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 javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
      at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:424)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:453)
      at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:327)
      at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:294)
      at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
      at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.&lt;init&gt;(RawStoreProxy.java:58)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:581)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:546)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:612)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:398)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.&lt;init&gt;(RetryingHMSHandler.java:78)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6396)
      at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.&lt;init&gt;(HiveMetaStoreClient.java:236)
      at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.&lt;init&gt;(SessionHiveMetaStoreClient.java:70)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1625)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.&lt;init&gt;(RetryingMetaStoreClient.java:80)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101)
      at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3317)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3356)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)
      at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)
      at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)
      at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)
      at org.apache.hadoop.hive.ql.metadata.Hive.&lt;init&gt;(Hive.java:366)
      at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
      at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
      at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
      at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
      at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
      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.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  ------
  
  NestedThrowables:
  java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby://localhost:1527/metastore_db;create=true , username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
  java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/metastore_db;create=true
      at java.sql.DriverManager.getConnection(DriverManager.java:689)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)
      at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
      at com.jolbox.bonecp.BoneCP.&lt;init&gt;(BoneCP.java:416)
      at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
      at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:483)
      at org.datanucleus.store.rdbms.RDBMSStoreManager.&lt;init&gt;(RDBMSStoreManager.java:296)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:606)
      at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
      at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHelper.java:133)
      at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl.java:420)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:821)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:338)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:217)
      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 javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
      at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:424)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:453)
      at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:327)
      at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:294)
      at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
      at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.&lt;init&gt;(RawStoreProxy.java:58)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:581)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:546)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:612)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:398)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.&lt;init&gt;(RetryingHMSHandler.java:78)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6396)
      at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.&lt;init&gt;(HiveMetaStoreClient.java:236)
      at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.&lt;init&gt;(SessionHiveMetaStoreClient.java:70)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1625)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.&lt;init&gt;(RetryingMetaStoreClient.java:80)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101)
      at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3317)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3356)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)
      at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)
      at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)
      at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)
      at org.apache.hadoop.hive.ql.metadata.Hive.&lt;init&gt;(Hive.java:366)
      at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
      at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
      at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
      at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
      at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
      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.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  ------
  
      at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:529)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:834)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:338)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:217)
      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 javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
      at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:424)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:453)
      at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:327)
      at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:294)
      at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
      at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.&lt;init&gt;(RawStoreProxy.java:58)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:581)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:546)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:612)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:398)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.&lt;init&gt;(RetryingHMSHandler.java:78)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6396)
      at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.&lt;init&gt;(HiveMetaStoreClient.java:236)
      at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.&lt;init&gt;(SessionHiveMetaStoreClient.java:70)
      ... 28 more
  Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby://localhost:1527/metastore_db;create=true , username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
  java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/metastore_db;create=true
      at java.sql.DriverManager.getConnection(DriverManager.java:689)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)
      at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
      at com.jolbox.bonecp.BoneCP.&lt;init&gt;(BoneCP.java:416)
      at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
      at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:483)
      at org.datanucleus.store.rdbms.RDBMSStoreManager.&lt;init&gt;(RDBMSStoreManager.java:296)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:606)
      at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
      at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHelper.java:133)
      at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl.java:420)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:821)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:338)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:217)
      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 javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
      at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
      at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:424)
      at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:453)
      at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:327)
      at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:294)
      at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
      at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.&lt;init&gt;(RawStoreProxy.java:58)
      at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:581)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:546)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:612)
      at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:398)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.&lt;init&gt;(RetryingHMSHandler.java:78)
      at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84)
      at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6396)
      at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.&lt;init&gt;(HiveMetaStoreClient.java:236)
      at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.&lt;init&gt;(SessionHiveMetaStoreClient.java:70)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1625)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.&lt;init&gt;(RetryingMetaStoreClient.java:80)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130)
      at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101)
      at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3317)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3356)
      at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)
      at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)
      at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)
      at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)
      at org.apache.hadoop.hive.ql.metadata.Hive.&lt;init&gt;(Hive.java:366)
      at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
      at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
      at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
      at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
      at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
      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.apache.hadoop.util.RunJar.run(RunJar.java:221)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
  ------
  
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at com.jolbox.bonecp.PoolUtil.generateSQLException(PoolUtil.java:192)
      at com.jolbox.bonecp.BoneCP.&lt;init&gt;(BoneCP.java:422)
      at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
      at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:483)
      at org.datanucleus.store.rdbms.RDBMSStoreManager.&lt;init&gt;(RDBMSStoreManager.java:296)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:606)
      at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
      at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHelper.java:133)
      at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl.java:420)
      at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:821)
      ... 57 more
  Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/metastore_db;create=true
      at java.sql.DriverManager.getConnection(DriverManager.java:689)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)
      at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
      at com.jolbox.bonecp.BoneCP.&lt;init&gt;(BoneCP.java:416)
      ... 69 more
  </code></pre>
  
  <p><code>bashrc file</code></p>
  
  <pre><code>.... 
   #HADOOP VARIABLES START
  export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
  export HADOOP_INSTALL=/usr/local/hadoop
  export PATH=$PATH:$HADOOP_INSTALL/bin
  export PATH=$PATH:$HADOOP_INSTALL/sbin
  export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
  export HADOOP_COMMON_HOME=$HADOOP_INSTALL
  export HADOOP_HDFS_HOME=$HADOOP_INSTALL
  export YARN_HOME=$HADOOP_INSTALL
  export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
  export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
  
  #HADOOP VARIABLES END
  export SQOOP_HOME=/usr/lib/sqoop export PATH=$PATH:$SQOOP_HOME/bin
  
  export PATH=$PATH:/usr/local/spark/bin
  
  
  export HIVE_HOME=/usr/local/hive 
  export PATH=$PATH:$HIVE_HOME/bin
  export CLASSPATH=$CLASSPATH:/usr/local/Hadoop/lib/*:.  
  export CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:.
  
  export DERBY_HOME=/usr/local/derby  
  export PATH=$PATH:$DERBY_HOME/bin  
  export CLASSPATH=$CLASSPATH:$DERBY_HOME/lib/derby.jar:$DERBY_HOME/lib/derbytools.jar:$DERBY_HOME/lib/derbyclient.jar 
  </code></pre>