各位大神,今日写了个java组件,用于读取hive,在本地可以正常访问hive服务器,结果也正常,但是打包后,到linux下报错,提示信息如下:
java.lang.ClassNotFoundException: org.apache.hive.jdbc.HiveDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at com.eb.receng.javaalone.hive2hdfs.JDBCToHiveUtils.getConnnection(JDBCToHiveUtils.java:20)
at com.eb.receng.javaalone.hive2hdfs.Hive2Hdfs.main(Hive2Hdfs.java:31)