<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Hive fails to start with &amp;quot;Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation&amp;quot; in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387936#M246496</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110638"&gt;@ldylag&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The stacktrace shows that the "org.postgresql.core.v3.ConnectionFactoryImpl" class depends on the&amp;nbsp;"com/ongres/scram/common/stringprep/StringPreparation.class" - and that is not available on the classpath.&lt;/P&gt;&lt;P&gt;By default HMS searches for the JDBC driver under the /usr/share/java. Please compare if the same JDBC driver is available on both HMS hosts. Probably the best would be to use the latest drivers from:&lt;/P&gt;&lt;P&gt;&lt;A href="https://jdbc.postgresql.org/download/" target="_blank"&gt;https://jdbc.postgresql.org/download/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;Miklos&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 10:10:33 GMT</pubDate>
    <dc:creator>mszurap</dc:creator>
    <dc:date>2024-05-16T10:10:33Z</dc:date>
    <item>
      <title>Hive fails to start with "Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387905#M246481</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we installed a CDP Private Cloud 7.1.9 cluster (CM 7.11.3) on AWS ec2 machines with Postgres RDS as backend database.&lt;/P&gt;&lt;P&gt;Hive Metastore Server is on two machines:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ap-cdpclusteru1c (role group: Hive Metastore Server Default Group)&lt;/LI&gt;&lt;LI&gt;ap-cdpclusteru2c. (role group:&amp;nbsp;hive-HIVEMETASTORE)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Configuration in CM looks identical for both Roles&lt;/P&gt;&lt;P&gt;ap-cdpclusteru1c starts successfully but&amp;nbsp;ap-cdpclusteru2c fails to start with following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;+ exec /cdh/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p6.51045883/lib/hive/bin/hive --config /var/run/cloudera-scm-agent/process/1546344708-hive-HIVEMETASTORE --service metastore -p 9083
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/cdh/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p6.51045883/jars/log4j-slf4j-impl-2.18.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/cdh/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p6.51045883/jars/slf4j-reload4j-1.7.36.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]
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/cdh/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p6.51045883/jars/log4j-slf4j-impl-2.18.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/cdh/opt/cloudera/parcels/CDH-7.1.9-1.cdh7.1.9.p6.51045883/jars/slf4j-reload4j-1.7.36.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]
org.apache.thrift.transport.TTransportException: Failed to start token manager
	at org.apache.hadoop.hive.metastore.AuthFactory.&amp;lt;init&amp;gt;(AuthFactory.java:116)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:10853)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:10793)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Caused by: java.io.IOException: Failed to initialize master key
	at org.apache.hadoop.hive.metastore.security.TokenStoreDelegationTokenSecretManager.startThreads(TokenStoreDelegationTokenSecretManager.java:215)
	at org.apache.hadoop.hive.metastore.security.MetastoreDelegationTokenManager.startDelegationTokenSecretManager(MetastoreDelegationTokenManager.java:90)
	at org.apache.hadoop.hive.metastore.AuthFactory.&amp;lt;init&amp;gt;(AuthFactory.java:112)
	... 8 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.hive.metastore.security.TokenStoreDelegationTokenSecretManager.startThreads(TokenStoreDelegationTokenSecretManager.java:213)
	... 10 more
Caused by: org.apache.hadoop.hive.metastore.security.DelegationTokenStore$TokenStoreException: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation
	at org.apache.hadoop.hive.metastore.security.DBTokenStore.invokeOnTokenStore(DBTokenStore.java:159)
	at org.apache.hadoop.hive.metastore.security.DBTokenStore.addMasterKey(DBTokenStore.java:42)
	at org.apache.hadoop.hive.metastore.security.TokenStoreDelegationTokenSecretManager.logUpdateMasterKey(TokenStoreDelegationTokenSecretManager.java:195)
	at org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.updateCurrentKey(AbstractDelegationTokenSecretManager.java:357)
	... 15 more
Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation
	at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:671)
	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:146)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:197)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
	at org.postgresql.jdbc.PgConnection.&amp;lt;init&amp;gt;(PgConnection.java:217)
	at org.postgresql.Driver.makeConnection(Driver.java:458)
	at org.postgresql.Driver.connect(Driver.java:260)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:356)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:199)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:444)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:515)
	at com.zaxxer.hikari.pool.HikariPool.&amp;lt;init&amp;gt;(HikariPool.java:112)
	at com.zaxxer.hikari.HikariDataSource.&amp;lt;init&amp;gt;(HikariDataSource.java:72)
	at org.apache.hadoop.hive.metastore.datasource.HikariCPDataSourceProvider.create(HikariCPDataSourceProvider.java:90)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.initPMF(PersistenceManagerProvider.java:277)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.lambda$updatePmfProperties$0(PersistenceManagerProvider.java:253)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.retry(PersistenceManagerProvider.java:563)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.updatePmfProperties(PersistenceManagerProvider.java:253)
	at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:355)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:77)
	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:137)
	at org.apache.hadoop.hive.metastore.RawStoreProxy.&amp;lt;init&amp;gt;(RawStoreProxy.java:59)
	at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStoreForConf(HiveMetaStore.java:850)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.java:818)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:812)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.hive.metastore.security.DBTokenStore.invokeOnTokenStore(DBTokenStore.java:142)
	... 18 more
Caused by: java.lang.ClassNotFoundException: com.ongres.scram.common.stringprep.StringPreparation
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
	... 51 more
24/05/14 17:16:00 ERROR metastore.HiveMetaStore: [main]: org.apache.thrift.transport.TTransportException: Failed to start token manager
	at org.apache.hadoop.hive.metastore.AuthFactory.&amp;lt;init&amp;gt;(AuthFactory.java:116)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:10853)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:10793)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Caused by: java.io.IOException: Failed to initialize master key
	at org.apache.hadoop.hive.metastore.security.TokenStoreDelegationTokenSecretManager.startThreads(TokenStoreDelegationTokenSecretManager.java:215)
	at org.apache.hadoop.hive.metastore.security.MetastoreDelegationTokenManager.startDelegationTokenSecretManager(MetastoreDelegationTokenManager.java:90)
	at org.apache.hadoop.hive.metastore.AuthFactory.&amp;lt;init&amp;gt;(AuthFactory.java:112)
	... 8 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.hive.metastore.security.TokenStoreDelegationTokenSecretManager.startThreads(TokenStoreDelegationTokenSecretManager.java:213)
	... 10 more
Caused by: org.apache.hadoop.hive.metastore.security.DelegationTokenStore$TokenStoreException: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation
	at org.apache.hadoop.hive.metastore.security.DBTokenStore.invokeOnTokenStore(DBTokenStore.java:159)
	at org.apache.hadoop.hive.metastore.security.DBTokenStore.addMasterKey(DBTokenStore.java:42)
	at org.apache.hadoop.hive.metastore.security.TokenStoreDelegationTokenSecretManager.logUpdateMasterKey(TokenStoreDelegationTokenSecretManager.java:195)
	at org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.updateCurrentKey(AbstractDelegationTokenSecretManager.java:357)
	... 15 more
Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation
	at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:671)
	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:146)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:197)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
	at org.postgresql.jdbc.PgConnection.&amp;lt;init&amp;gt;(PgConnection.java:217)
	at org.postgresql.Driver.makeConnection(Driver.java:458)
	at org.postgresql.Driver.connect(Driver.java:260)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:356)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:199)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:444)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:515)
	at com.zaxxer.hikari.pool.HikariPool.&amp;lt;init&amp;gt;(HikariPool.java:112)
	at com.zaxxer.hikari.HikariDataSource.&amp;lt;init&amp;gt;(HikariDataSource.java:72)
	at org.apache.hadoop.hive.metastore.datasource.HikariCPDataSourceProvider.create(HikariCPDataSourceProvider.java:90)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.initPMF(PersistenceManagerProvider.java:277)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.lambda$updatePmfProperties$0(PersistenceManagerProvider.java:253)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.retry(PersistenceManagerProvider.java:563)
	at org.apache.hadoop.hive.metastore.PersistenceManagerProvider.updatePmfProperties(PersistenceManagerProvider.java:253)
	at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:355)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:77)
	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:137)
	at org.apache.hadoop.hive.metastore.RawStoreProxy.&amp;lt;init&amp;gt;(RawStoreProxy.java:59)
	at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStoreForConf(HiveMetaStore.java:850)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.java:818)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:812)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.hadoop.hive.metastore.security.DBTokenStore.invokeOnTokenStore(DBTokenStore.java:142)
	... 18 more
Caused by: java.lang.ClassNotFoundException: com.ongres.scram.common.stringprep.StringPreparation
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
	... 51 more&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Full log attached.&lt;/P&gt;&lt;P&gt;I scanned the jars to search for StringPreparation.class and it has the same results on both machines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;jars$ ls *.jar | while read jar ; do unzip -l $jar | sed -e 's@^@'$jar' @' | grep '\.class$' ; done | awk '/StringPreparation.class/ { print $1, $NF }'
config-service-1.0.0.7.1.9.6-3.jar org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class
config-service.jar org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class
postgresql-42.5.1.jar org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class
storage-tool-0.10.0.7.1.9.6-3.jar org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class
storage-tool-2.3.0.7.1.9.6-3.jar org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks like "com/ongres/scram/common/stringprep/StringPreparation.class" is not present anywhere, only the "org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class" is present.&lt;/P&gt;&lt;P&gt;There is RH8 and Java 11 on both machines:&lt;/P&gt;&lt;P&gt;ap-cdpclusteru2c ~$ java --version&lt;BR /&gt;openjdk 11.0.22 2024-01-16 LTS&lt;BR /&gt;OpenJDK Runtime Environment (Red_Hat-11.0.22.0.7-1) (build 11.0.22+7-LTS)&lt;BR /&gt;OpenJDK 64-Bit Server VM (Red_Hat-11.0.22.0.7-1) (build 11.0.22+7-LTS, mixed mode)&lt;/P&gt;&lt;P&gt;How can I fix the issue causing this error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 06:30:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387905#M246481</guid>
      <dc:creator>ldylag</dc:creator>
      <dc:date>2026-04-21T06:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails to start with "Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387914#M246485</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110638"&gt;@ldylag&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our Hive experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38161"&gt;@cravani&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/12885"&gt;@mszurap&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/45798"&gt;@james_jones&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 19:49:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387914#M246485</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-05-15T19:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails to start with "Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387936#M246496</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110638"&gt;@ldylag&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The stacktrace shows that the "org.postgresql.core.v3.ConnectionFactoryImpl" class depends on the&amp;nbsp;"com/ongres/scram/common/stringprep/StringPreparation.class" - and that is not available on the classpath.&lt;/P&gt;&lt;P&gt;By default HMS searches for the JDBC driver under the /usr/share/java. Please compare if the same JDBC driver is available on both HMS hosts. Probably the best would be to use the latest drivers from:&lt;/P&gt;&lt;P&gt;&lt;A href="https://jdbc.postgresql.org/download/" target="_blank"&gt;https://jdbc.postgresql.org/download/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;Miklos&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 10:10:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/387936#M246496</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2024-05-16T10:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails to start with "Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/388103#M246526</link>
      <description>&lt;P&gt;During cluster installation we followed the postgresql jdbc instruction:&lt;BR /&gt;&lt;A href="https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/installation/topics/cm_postgres_jdbc_installation.html" target="_blank"&gt;https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/installation/topics/cm_postgres_jdbc_installation.html&lt;/A&gt;&lt;BR /&gt;later, when fixing some issues, we removed the /usr/share/java/postgresql-connector-java.jar on u1c.&lt;BR /&gt;It stayed on u2c and turned to be problem.&lt;BR /&gt;It is default name, so hive process was picking it up:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;+ JDBC_JARS=/usr/share/java/mysql-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/usr/share/java/oracle-connector-java.jar&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and trying to use.&lt;BR /&gt;When we removed it on u2c, hive process started to to take 'cloudera delivered' jar:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;+ JDBC_JARS=/usr/share/java/mysql-connector-java.jar:/opt/cloudera/cm/lib/postgresql-42.5.1.jar:/usr/share/java/oracle-connector-java.jar&lt;/LI-CODE&gt;&lt;P&gt;and hive could start successfully.&lt;/P&gt;&lt;P&gt;We compared the jars, and seems that 'bad' jar was in version 42.2, good one was 42.5:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ unzip _postgresql-connector-java.jar -d bad
$ cat bad/META-INF/MANIFEST.MF | grep -i Version
Manifest-Version: 1.0
Implementation-Version: 42.2.14
JavaPackages-Version: 42.2.14
Specification-Version: 4.2

$ unzip postgresql-42.5.1.jar -d good
$ cat good/META-INF/MANIFEST.MF | grep -i Version
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Version: 42.5.1
...
Specification-Version: 4.2
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Listing of jar contents confirms that the class was missing in jar that we used.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ unzip -l _postgresql-connector-java.jar | grep com/ongres/scram/common/stringprep/StringPreparation.class
$ unzip -l postgresql-42.5.1.jar | grep com/ongres/scram/common/stringprep/StringPreparation.class
296 02-01-1980 00:00 org/postgresql/shaded/com/ongres/scram/common/stringprep/StringPreparation.class
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is this needed on CM host:&lt;BR /&gt;&lt;A href="https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/installation/topics/cm_postgres_jdbc_installation.html" target="_blank"&gt;https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/installation/topics/cm_postgres_jdbc_installation.html&lt;/A&gt;&lt;BR /&gt;if we removed it and all works as expected on CM host?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2024 10:23:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/388103#M246526</guid>
      <dc:creator>ldylag</dc:creator>
      <dc:date>2024-05-20T10:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails to start with "Caused by: java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/388137#M246548</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110638"&gt;@ldylag&lt;/a&gt;&amp;nbsp;for sharing the details, that makes sense.&lt;/P&gt;&lt;P&gt;The CM does not necessarily need the PostgreSQL driver to be installed, of course it's needed only when that database type is configured for CM. The one under the "/opt/cloudera/cm/lib" might be shipped to support the "embedded" database, that might have caused a confusion here (if one HMS is on the CM host), but in general the DB drivers are expected to be under the "/usr/share/java".&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;Miklos&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 08:12:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-to-start-with-quot-Caused-by-java-lang/m-p/388137#M246548</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2024-05-21T08:12:09Z</dc:date>
    </item>
  </channel>
</rss>

