<?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 spark's HikariCP-2.5.1.jar is eclipsing the desired HikariCP jar in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/342772#M233805</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There are two&amp;nbsp;&lt;FONT face="courier new,courier"&gt;HikariCP&lt;/FONT&gt; jars in the class path:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;/data/perftools/spark-prod-reports-3.0.0/jars/HikariCP-2.5.1.jar&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;/data/perftools/collector-spark-sandbox/lib/HikariCP-3.2.0.jar&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The 1st is pre-packaged with spark, the 2nd is included by me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/data/perftools/spark-prod-reports-3.0.0/bin/spark-submit&lt;/FONT&gt;'s list of jars is checked first before checking my jar list, the classloader is loading&amp;nbsp;&lt;FONT face="courier new,courier"&gt;HikariCP-2.5.1.jar&lt;/FONT&gt; instead of the desired one,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;HikariCP-3.2.0.jar&lt;/FONT&gt;&amp;nbsp;that is provided via the flag&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;--jars&lt;/FONT&gt; .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is shown below. Notice the 4th and 5th lines are loading &lt;FONT face="courier new,courier"&gt;Hikari&lt;/FONT&gt; from the default spark package jar folder, not from my jar list located at&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/data/perftools/collector-spark-sandbox/lib/&lt;/FONT&gt;.&lt;/P&gt;&lt;PRE&gt;[Loaded slick.util.ConfigExtensionMethods$ from file:/data/perftools/collector-spark-sandbox/lib/slick_2.12-3.3.3.jar]&lt;BR /&gt;[Loaded slick.jdbc.JdbcDataSource$$$Lambda$1478/767152605 from slick.jdbc.JdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$ from file:/data/perftools/collector-spark-sandbox/lib/slick-hikaricp_2.12-3.3.3.jar]&lt;BR /&gt;[Loaded com.zaxxer.hikari.HikariConfigMXBean from file:/data/perftools/spark-prod-reports-3.0.0/jars/HikariCP-2.5.1.jar]&lt;BR /&gt;[Loaded com.zaxxer.hikari.HikariConfig from file:/data/perftools/spark-prod-reports-3.0.0/jars/HikariCP-2.5.1.jar]&lt;BR /&gt;[Loaded slick.util.ConfigExtensionMethods$$$Lambda$1479/1522068461 from slick.util.ConfigExtensionMethods$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1480/60429889 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1481/788726348 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1482/945329680 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1483/1797498692 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1484/1543887118 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1485/1847812322 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.util.ConfigExtensionMethods$$$Lambda$1486/305632032 from slick.util.ConfigExtensionMethods$]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get spark-submit to load my &lt;FONT face="courier new,courier"&gt;HikariCP-3.2.0.jar&lt;/FONT&gt; instead of the prepackaged one???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 30 Apr 2022 05:08:11 GMT</pubDate>
    <dc:creator>sparkdeveloper</dc:creator>
    <dc:date>2022-04-30T05:08:11Z</dc:date>
    <item>
      <title>spark's HikariCP-2.5.1.jar is eclipsing the desired HikariCP jar</title>
      <link>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/342772#M233805</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There are two&amp;nbsp;&lt;FONT face="courier new,courier"&gt;HikariCP&lt;/FONT&gt; jars in the class path:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;/data/perftools/spark-prod-reports-3.0.0/jars/HikariCP-2.5.1.jar&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;/data/perftools/collector-spark-sandbox/lib/HikariCP-3.2.0.jar&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The 1st is pre-packaged with spark, the 2nd is included by me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/data/perftools/spark-prod-reports-3.0.0/bin/spark-submit&lt;/FONT&gt;'s list of jars is checked first before checking my jar list, the classloader is loading&amp;nbsp;&lt;FONT face="courier new,courier"&gt;HikariCP-2.5.1.jar&lt;/FONT&gt; instead of the desired one,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;HikariCP-3.2.0.jar&lt;/FONT&gt;&amp;nbsp;that is provided via the flag&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;--jars&lt;/FONT&gt; .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is shown below. Notice the 4th and 5th lines are loading &lt;FONT face="courier new,courier"&gt;Hikari&lt;/FONT&gt; from the default spark package jar folder, not from my jar list located at&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/data/perftools/collector-spark-sandbox/lib/&lt;/FONT&gt;.&lt;/P&gt;&lt;PRE&gt;[Loaded slick.util.ConfigExtensionMethods$ from file:/data/perftools/collector-spark-sandbox/lib/slick_2.12-3.3.3.jar]&lt;BR /&gt;[Loaded slick.jdbc.JdbcDataSource$$$Lambda$1478/767152605 from slick.jdbc.JdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$ from file:/data/perftools/collector-spark-sandbox/lib/slick-hikaricp_2.12-3.3.3.jar]&lt;BR /&gt;[Loaded com.zaxxer.hikari.HikariConfigMXBean from file:/data/perftools/spark-prod-reports-3.0.0/jars/HikariCP-2.5.1.jar]&lt;BR /&gt;[Loaded com.zaxxer.hikari.HikariConfig from file:/data/perftools/spark-prod-reports-3.0.0/jars/HikariCP-2.5.1.jar]&lt;BR /&gt;[Loaded slick.util.ConfigExtensionMethods$$$Lambda$1479/1522068461 from slick.util.ConfigExtensionMethods$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1480/60429889 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1481/788726348 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1482/945329680 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1483/1797498692 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1484/1543887118 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.jdbc.hikaricp.HikariCPJdbcDataSource$$$Lambda$1485/1847812322 from slick.jdbc.hikaricp.HikariCPJdbcDataSource$]&lt;BR /&gt;[Loaded slick.util.ConfigExtensionMethods$$$Lambda$1486/305632032 from slick.util.ConfigExtensionMethods$]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get spark-submit to load my &lt;FONT face="courier new,courier"&gt;HikariCP-3.2.0.jar&lt;/FONT&gt; instead of the prepackaged one???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 05:08:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/342772#M233805</guid>
      <dc:creator>sparkdeveloper</dc:creator>
      <dc:date>2022-04-30T05:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: spark's HikariCP-2.5.1.jar is eclipsing the desired HikariCP jar</title>
      <link>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/343305#M233895</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97645"&gt;@sparkdeveloper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are encountering the well-known phenomenon of Java Class shadowing, and it really doesn't have all that much to do with Spark, or the spark-submit utility. One direct solution is to employ a technique called "shading" the dependencies, which usually winds up being a lot of work, and I personally avoid doing it. If you want to go that route, you can read all about that technique on any number of websites that cover Java software development or in books on the same topic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously, I don't know what the code you're running that uses this library does, but if you're looking for some way to resolve this quickly, I think you are better off rewriting your code that uses the 3.2.0 version of this library to use the APIs in the version that comes pre-packaged with your spark installation and just omit adding your &lt;FONT face="terminal,monaco,monospace"&gt;.jar&lt;/FONT&gt; file to the CLASSPATH. You'll probably need to download the &lt;FONT face="terminal,monaco,monospace"&gt;HikariCP-2.5.1.jar&lt;/FONT&gt; file and install it where you're doing your development work. I realize that is a lazy kind of answer, but you should consider it unless you really have a compelling need to use the later version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 07:57:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/343305#M233895</guid>
      <dc:creator>ask_bill_brooks</dc:creator>
      <dc:date>2022-05-06T07:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: spark's HikariCP-2.5.1.jar is eclipsing the desired HikariCP jar</title>
      <link>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/343407#M233930</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35418"&gt;@ask_bill_brooks&lt;/a&gt;&amp;nbsp;. Much appreciate the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did solve the problem using an uber/fat jar. However, I was hoping for an elegant solution.&amp;nbsp; I did look into shading on gradle but it was too confusing and difficult to explain and maintain. sbt didn't seem to have shading (or an easier approaching to shading).&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment, we are stuck with a fat jar. Hope there is an easier deployment method in the future via the dependencies.scala file.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 02:05:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/spark-s-HikariCP-2-5-1-jar-is-eclipsing-the-desired-HikariCP/m-p/343407#M233930</guid>
      <dc:creator>sparkdeveloper</dc:creator>
      <dc:date>2022-05-09T02:05:39Z</dc:date>
    </item>
  </channel>
</rss>

