How to resolve the error "Could not initialize class org.apache.hive.jdbc.HiveConnection" in TIBCO Data Virtualization?
book
Article ID: KB0072193
calendar_today
Updated On:
Products
Versions
TIBCO Data Virtualization
8.4 and later
Description
After importing a CAR file containing a Hive 0.12 datasource from an older TDV instance to a newer instance, the following error might be encountered in TDV while testing the datasource connection: -------- "java.lang.NoClassDefFoundError: Could not initialize class org.apache.hive.jdbc.HiveConnection" --------
Issue/Introduction
This article describes the steps to resolve the "Could not initialize class org.apache.hive.jdbc.HiveConnection" error in TIBCO Data Virtualization.
Environment
All supported environments
Resolution
The error indicates that the class "org.apache.hive.jdbc.HiveConnection" could not be located in the location of the jar file.
Below are the steps that can be used in order to resolve the issue:
- Verify that all the required jar files are present in the <TDV_Install_Dir>/conf/adapters/system/hive_012_hiveserver2 by referring to the Hive adapter guide.
- If all the jar files are present and the error is still occurring, verify that the permissions on the jar files are correct. Most of the time, it is possible that all the required jar files are placed correctly but due to incorrect permission on the files, TDV is unable to read the contents of the jar files. Hence, verify that the read and write permissions are correctly present on the files.