Support Questions
Find answers, ask questions, and share your expertise

Hive does not throw any exception for non exist database

Rising Star

I am trying to connect hive non exist database using jdbc url . It does not throw any error and it is connecting with default database which should not be. This issue is occurring for hive-jdbc-1.2.1. if we use version hive-jdbc-0.12.0-cdh5.1.2 then we are getting proper exception showing Database does not exist. I am using HDP 2.4.2 and Hive . I do not want to use cloudera jar. My code snapshot is given below where "acb" is unknown database.

conn = DriverManager.getConnection("jdbc:hive2://*****.***.***:10000/acb");

Is it bug for hive jdbc driver ? Please help to fix this issue asap.


Super Guru
@Arkaprova Saha

Can you try connecting to another database which actually exists. Does that work? There was a known issue in Hive JDBC which was fixed in hive 0.13 but it was ignoring any database regardless. Check the following if this applies to you.

Rising Star


Thanks for your reply . This is working for existing database. But we are facing this issue for non existing database . Looks like issue is not resolved yet.

; ;