When I execute this line
create or replace library public.VHCatalogLib as
'/opt/vertica/packages/hcat/lib2/vertica-hcatalogudl.jar'
DEPENDS '/opt/vertica/packages/hcat/lib/*.*' language 'java';
I can see that the library file creates the following objects in vertica
SELECT * FROM USER_LIBRARY_MANIFEST WHERE lib_name = 'VHCatalogLib';
schema_name | lib_name | lib_oid | obj_name | obj_type | arg_types | return_type
-------------+--------------+-------------------+--------------------------------------------------+-----------------+-----------+-------------
public | VHCatalogLib | 45035996371219906 | com.vertica.hcatalogudl.WebHCatConfLoaderFactory | Scalar Function | | Varchar
(1 row)
But when you look at the code of the VERTICA HCATALOG CONNECTION install.sql it tries 3 objects
CREATE SOURCE public.VHCatSource as LANGUAGE 'java' name 'com.vertica.hcatalogudl.HCatalogSplitsNoOpSourceFactory' library public.VHCatalogLib;
GRANT EXECUTE ON SOURCE public.VHCatSource() TO PUBLIC;
CREATE PARSER public.VHCatParser as LANGUAGE 'java' name 'com.vertica.hcatalogudl.HCatalogSplitsParserFactory' library public.VHCatalogLib;
GRANT EXECUTE ON PARSER public.VHCatParser() TO PUBLIC;
CREATE FUNCTION get_webhcat_host as LANGUAGE 'java' name 'com.vertica.hcatalogudl.WebHCatConfLoaderFactory' library public.VHCatalogLib;
But as you can see clearly.... that the library file never installed the 2 objects this script is looking for
- com.vertica.hcatalogudl.HCatalogSplitsNoOpSourceFactory
- com.vertica.hcatalogudl.HCatalogSplitsParserFactory
This is why the internet is filled with error message
1. Couldn't instantiate class com.vertica.hcatalogudl.HCatalogSplitsNoOpSourceFactory
2. Couldn't instantiate class com.vertica.hcatalogudl.HCatalogSplitsParserFactory
The reason is that these objects are not installed by the library but the create source and create parser commands depend on it.
The reason why the library doesn't contain it is because we have the wrong vertica-hcatalogudl.jar