Connection to HDP 2.6 Hiveserver2 is failing with java.lang.ClassNotFoundException

Shyam Shaw shared this problem 7 years ago
Resolved

I am trying to connect Yellowfin with HDP2.6 Hiverserver2 getting exception

java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils

Below are the jar files:

root@Yellowfin73plus:/opt/yellowfin/appserver/webapps/ROOT/WEB-INF/lib# ll

total 133776

drwxr-x--- 2 root root 4096 Nov 9 14:13 ./

drwxr-x--- 3 root root 4096 Nov 9 13:32 ../

-rw-r----- 1 root root 54705 Jun 8 15:56 activation.jar

-rw-r----- 1 root root 105752 Jun 8 15:56 aqljdbc.jar

-rw-r----- 1 root root 15738 Jun 8 15:56 auth0.jar

-rw-r----- 1 root root 1599986 Jun 8 15:56 axis.jar

-rw-r----- 1 root root 3313563 Jun 8 15:56 batik-all.jar

-rw-r----- 1 root root 1815677 Jun 8 15:56 bcprov-jdk15-1.46.jar

-rw-r----- 1 root root 1961412 Jun 8 15:56 cachedb.jar

-rw-r----- 1 root root 284243 Jun 8 15:56 ccjdbc4.jar

-rw-r----- 1 root root 228136 Jun 8 15:56 columnar.jar

-rw-r----- 1 root root 168760 Jun 8 15:56 commons-beanutils-core.jar

-rw-r----- 1 root root 91699 Jun 8 15:56 commons-chain-1.2.jar

-rw-r--r-- 1 root root 58160 Nov 9 12:43 commons-codec-1.4.jar

-rw-r----- 1 root root 232718 Jun 8 15:56 commons-codec-1.6.jar

-rw-r----- 1 root root 588337 Jun 8 15:56 commons-collections-3.2.2.jar

-rw-r----- 1 root root 751238 Jun 8 15:56 commons-collections4-4.1.jar

-rw-r----- 1 root root 196768 Jun 8 15:56 commons-digester-2.1.jar

-rw-r----- 1 root root 71372 Jun 8 15:56 commons-discovery.jar

-rw-r----- 1 root root 70282 Jun 8 15:56 commons-fileupload-1.3.2.jar

-rw-r----- 1 root root 173587 Jun 8 15:56 commons-io-2.2.jar

-rw-r----- 1 root root 315805 Jun 8 15:56 commons-lang3-3.1.jar

-rw-r----- 1 root root 37946 Jun 8 15:56 commons-logging-1.0.4.jar

-rw-r--r-- 1 root root 62050 Nov 9 12:43 commons-logging-1.1.3.jar

-rw-r----- 1 root root 2038489 Jun 8 15:56 commons-math3-3.5.jar

-rw-r----- 1 root root 280983 Jun 8 15:56 commons-net-3.3.jar

-rw-r----- 1 root root 46796 Jun 8 15:56 commons-validator.jar

-rw-r----- 1 root root 415578 Jun 8 15:56 commons-vfs2-2.0.jar

-rw-r----- 1 root root 19051 Jun 8 15:56 com.noelios.restlet.ext.servlet_2.5.jar

-rw-r----- 1 root root 205159 Jun 8 15:56 com.noelios.restlet.jar

-rw-r----- 1 root root 372937 Jun 8 15:56 cssparser-0.9.18.jar

-rw-r----- 1 root root 3146632 Jun 8 15:56 db2jcc.jar

-rw-r----- 1 root root 927 Jun 8 15:56 db2jcc_license_cu.jar

-rw-r----- 1 root root 3224708 Jun 8 15:56 derby.jar

-rw-r----- 1 root root 4276937 Jun 8 15:56 docx4j-3.2.3-yf.jar

-rw-r----- 1 root root 105703 Jun 8 15:56 docx4j-ImportXHTML-3.2.3-yf.jar

-rw-r----- 1 root root 24432 Jun 8 15:56 el-api-1.0.jar

-rw-r----- 1 root root 1209490 Jun 8 15:56 flying-saucer-core-9.0.9-yf.jar

-rw-r----- 1 root root 59261 Jun 8 15:56 flying-saucer-docx-9.0.9-yf.jar

-rw-r----- 1 root root 149165 Jun 8 15:56 flying-saucer-pdf-9.0.9-yf.jar

-rw-r----- 1 root root 53920 Jun 8 15:56 getopt-1.0.9.jar

-rw-r----- 1 root root 19484 Jun 8 15:56 gif-plugin.jar

-rw-r----- 1 root root 21835 Jun 8 15:56 gmbal-api-only.jar

-rw-r----- 1 root root 5482237 Jun 8 15:56 groovy-all-1.7.5.jar

-rw-r----- 1 root root 190362 Jun 8 15:56 gson-2.2.4.jar

-rw-r--r-- 1 root root 2189117 Nov 9 12:43 guava-14.0.1.jar

-rw-r----- 1 root root 1068835 Jun 8 15:56 h2.jar

-rw-r----- 1 root root 36036 Jun 8 15:56 ha-api.jar

-rw-r--r-- 1 root root 3659983 Nov 9 12:43 hadoop-common-2.7.3.2.6.2.0-205.jar

-rw-r--r-- 1 root root 359936 Nov 9 12:43 hive-common-1.2.1000.2.6.2.0-205.jar

-rw-r--r-- 1 root root 111628 Nov 9 12:43 hive-jdbc-1.2.1000.2.6.2.0-205.jar

-rw-r--r-- 1 root root 1999980 Nov 9 12:43 hive-service-1.2.1000.2.6.2.0-205.jar

-rw-r----- 1 root root 1515894 Jun 8 15:56 hsqldb.jar

-rw-r--r-- 1 root root 719304 Nov 9 12:43 httpclient-4.4.jar

-rw-r--r-- 1 root root 321639 Nov 9 12:43 httpcore-4.4.jar

-rw-r----- 1 root root 26548 Jun 8 15:56 httpmime-4.2.1.jar

-rw-r----- 1 root root 100344 Jun 8 15:56 i4-adapter.jar

-rw-r----- 1 root root 96158 Jun 8 15:56 i4-content.jar

-rw-r----- 1 root root 18885108 Jun 8 15:56 i4-core.jar

-rw-r----- 1 root root 168079 Jun 8 15:56 i4-ip.jar

-rw-r----- 1 root root 3781324 Jun 8 15:56 i4-jsps.jar

-rw-r----- 1 root root 10126472 Jun 8 15:56 i4-mi.jar

-rw-r----- 1 root root 325533 Jun 8 15:56 iijdbc.jar

-rw-r----- 1 root root 1130013 Jun 8 15:56 iText-2.1.7.jar

-rw-r----- 1 root root 1673340 Jun 8 15:56 iTextAsianCmaps.jar

-rw-r----- 1 root root 328010 Jun 8 15:56 iTextAsian.jar

-rw-r----- 1 root root 145344 Jun 8 15:56 iText-rtf-2.1.0.jar

-rw-r----- 1 root root 46968 Jun 8 15:56 jackson-annotations-2.6.0.jar

-rw-r----- 1 root root 258833 Jun 8 15:56 jackson-core-2.6.1.jar

-rw-r----- 1 root root 1166488 Jun 8 15:56 jackson-databind-2.6.1.jar

-rw-r----- 1 root root 65368 Jun 8 15:56 jakarta-oro.jar

-rw-r----- 1 root root 29806 Jun 8 15:56 jakarta-regexp-1.2.jar

-rw-r----- 1 root root 4662562 Jun 8 15:56 jasperreports-5.5.0.jar

-rw-r----- 1 root root 238189 Jun 8 15:56 javacup.jar

-rw-r----- 1 root root 571048 Jun 8 15:56 javamail-1.5.2.jar

-rw-r----- 1 root root 22331 Jun 8 15:56 javax.annotation.jar

-rw-r----- 1 root root 100092 Jun 8 15:56 jaxb-api.jar

-rw-r----- 1 root root 1112601 Jun 8 15:56 jaxb-impl.jar

-rw-r----- 1 root root 2078317 Jun 8 15:56 jaxb-xjc.jar

-rw-r----- 1 root root 31999 Jun 8 15:56 jaxrpc.jar

-rw-r----- 1 root root 46291 Jun 8 15:56 jaxws-api.jar

-rw-r----- 1 root root 2296593 Jun 8 15:56 jaxws-rt.jar

-rw-r----- 1 root root 847127 Jun 8 15:56 jaybird-full-2.2.3.jar

-rw-r----- 1 root root 396172 Jun 8 15:56 jcifs-1.3.17.jar

-rw-r----- 1 root root 310890 Jun 8 15:56 jcommon.jar

-rw-r----- 1 root root 515561 Jun 8 15:56 jconn3.jar

-rw-r----- 1 root root 1439719 Jun 8 15:56 jconn4.jar

-rw-r----- 1 root root 12577 Jun 8 15:56 jdbf-1.2.jar

-rw-r----- 1 root root 12321 Jun 8 15:56 jfreechart-experimental.jar

-rw-r----- 1 root root 1425691 Jun 8 15:56 jfreechart.jar

-rw-r----- 1 root root 2473076 Jun 8 15:56 jgroups-3.6.11.Final.jar

-rw-r----- 1 root root 19428 Jun 8 15:56 jpscs.jar

-rw-r----- 1 root root 278297 Jun 8 15:56 jsch-0.1.53.jar

-rw-r----- 1 root root 43623 Jun 8 15:56 json.jar

-rw-r----- 1 root root 314991 Jun 8 15:56 jsoup-1.8.2.jar

-rw-r----- 1 root root 135369 Jun 8 15:56 jsqlparser.jar

-rw-r----- 1 root root 7989 Jun 8 15:56 jsr181-api.jar

-rw-r----- 1 root root 4250685 Jun 8 15:56 jt400.jar

-rw-r----- 1 root root 304581 Jun 8 15:56 jtds-1.2.8_svn.jar

-rw-r----- 1 root root 697509 Jun 8 15:56 jxl.jar

-rw-r----- 1 root root 439100 Jun 8 15:56 ldap.jar

-rw-r--r-- 1 root root 234201 Nov 9 12:43 libthrift-0.9.3.jar

-rw-r----- 1 root root 489898 Jun 8 15:56 log4j-1.2.17.jar

-rw-r----- 1 root root 42224 Jun 8 15:56 management-api.jar

-rw-r----- 1 root root 848401 Jun 8 15:56 mysql-connector-java-5.1.25-bin.jar

-rw-r----- 1 root root 2095867 Jun 8 15:56 ojdbc5.jar

-rw-r----- 1 root root 350434 Jun 8 15:56 olap4j-1.1.1-yf.jar

-rw-r----- 1 root root 218289 Jun 8 15:56 olap4j-xmla-1.1.1-yf.jar

-rw-r----- 1 root root 55550 Jun 8 15:56 OpenForecast.jar

-rw-r----- 1 root root 248637 Jun 8 15:56 org.restlet.jar

-rw-r----- 1 root root 2497380 Jun 8 15:56 poi-3.13-20150929.jar

-rw-r----- 1 root root 1142386 Jun 8 15:56 poi-ooxml-3.13-20150929.jar

-rw-r----- 1 root root 5641539 Jun 8 15:56 poi-ooxml-schemas-3.13-20150929.jar

-rw-r----- 1 root root 158444 Jun 8 15:56 policy.jar

-rw-r----- 1 root root 676535 Jun 8 15:56 postgresql-9.4.1212.jre7.jar

-rw-r----- 1 root root 165139 Jun 8 15:56 pvjdbc2.jar

-rw-r----- 1 root root 8073 Jun 8 15:56 pvjdbc2x.jar

-rw-r----- 1 root root 19357 Jun 8 15:56 saaj.jar

-rw-r----- 1 root root 14526 Jun 8 15:56 sac-1.3.jar

-rw-r----- 1 root root 45484 Jun 8 15:56 shapefilereader-1.0.jar

-rw-r--r-- 1 root root 32119 Nov 9 12:43 slf4j-api-1.7.10.jar

-rw-r----- 1 root root 26084 Jun 8 15:56 slf4j-api-1.7.5.jar

-rw-r----- 1 root root 3201083 Jun 8 15:56 sqlite-jdbc-3.7.2.jar

-rw-r----- 1 root root 585020 Jun 8 15:56 sqljdbc4.jar

-rw-r----- 1 root root 15705 Jun 8 15:56 stax-ex.jar

-rw-r----- 1 root root 64308 Jun 8 15:56 streambuffer.jar

-rw-r----- 1 root root 321348 Jun 8 15:56 struts-core-1.3.10.17fc.jar

-rw-r----- 1 root root 256597 Jun 8 15:56 struts-taglib-1.3.10.17fc.jar

-rw-r----- 1 root root 206430 Jun 8 15:56 taglibs-standard-impl-1.2.5.jar

-rw-r----- 1 root root 163271 Jun 8 15:56 taglibs-standard-jstlel-1.2.5.jar

-rw-r----- 1 root root 1442364 Jun 8 15:56 unboundid-ldapsdk-se.jar

-rw-r----- 1 root root 186700 Jun 8 15:56 wsdl4j-1.6.3.jar

-rw-r----- 1 root root 1367760 Jun 8 15:56 xercesImpl-2.11.0.jar

-rw-r----- 1 root root 85613 Jun 8 15:56 xml-apis-ext.jar

-rw-r----- 1 root root 2730866 Jun 8 15:56 xmlbeans-2.6.0.jar

-rw-r----- 1 root root 601866 Jun 8 15:56 xmlgraphics-commons-1.5.jar

-rw-r----- 1 root root 7188 Jun 8 15:56 xmlpull-1.1.3.1.jar

-rw-r----- 1 root root 24956 Jun 8 15:56 xpp3_min-1.1.4c.jar

-rw-r----- 1 root root 549133 Jun 8 15:56 xstream-1.4.9.jar

-rw-r----- 1 root root 17479 Jun 8 15:56 yfbirt431.jar

-rw-r----- 1 root root 891090 Jun 8 15:56 yuicompressor-2.4.7.jar

I used below link for reference:

https://www.yellowfinbi.com/resources/forum/yfforum-connecting-to-hiveserver2-thread-173126

Did search and found that issue is related to missing commons-lang.jar but commons-lang3-3.1.jar is already present under /opt/yellowfin/appserver/webapps/ROOT/WEB-INF/lib.

I tried with commons-lang-2.6.jar, commons-lang3-3.4.jar, commons-lang3.jar but none of them worked.

Please Suggest..

Replies (1)

photo
1

Hi Shyam,

I am not familiar with this specific database, but we do support connections through the Hive2 driver.

Looking at this error specifically, the plugin manager works a little differently than the rest of the libraries in Yellowfin. When you first load a plugin, Yellowfin will load all of the available jars and classes into the BinaryClassCache. Any further use of the plugin will reference this cache rather than the Yellowfin lib folder. One immediate fix might be to try and include the apache commons.lang library in with the rest of your driver:

8f39beeda5afb3e1d7cf5a2d50b158f9

click "edit" and then "add more" and point to this jar (you can take it straight out of the lib folder)

However, I cannot guarantee that after all of this, the driver will work., so it might be worth trying the more generic hive2 driver.

Regards,

Nathan

photo
1

Hi Nathan,

Sorry for the late response. I was able to fix the issue. Below is the link for details.

https://community.hortonworks.com/questions/146648/yellowfin-connection-to-hiveserver2-is-failing-jav.html

Regards,

Shyam

photo
1

Hi Shyam,

Glad to hear it!

Regards,

Nathan

photo
Leave a Comment
 
Attach a file