JDBC连接失败“无法初始化类org.apache.hive.jdbc.HiveConnection”

时间:2017-08-02 13:35:23

标签: hive

我的WEBLOGIC_CLASSPATH:

${MW_HOME}/oracle_common/common/bin/CommExtEnv.sh  
WEBLOGIC_CLASSPATH="${JAVA_HOME}/lib/tools.jar${CLASSPATHSEP}${PROFILE_CLASSPATH}
${CLASSPATHSEP}${ANT_CONTRIB}/ant-contrib1.0b3.jar${CLASSPATHSEP}${CAM_NODEMANAGER_JAR_PATH}${CLASSPATHSEP}/scratch/hadoop-core-1.1.2.jar${CLASSPATHSEP}/scratch/hive-jdbc-1.2.0-standalone.jar"

Stacktrace:

  

由于无法建立连接   java.lang.ExceptionInInitializerError
weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:423)
weblogic.jdbc.common.internal.DataSourceUtil.access $ 000(DataSourceUtil.java:24)
weblogic.jdbc.common.internal.DataSourceUtil $ 1.run(DataSourceUtil.java:285)
java.security.AccessController.doPrivileged(母语   方法)
weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:282)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:937)<无线电通信/>com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:524)
sun.reflect.NativeMethodAccessorImpl.invoke0(母语   法)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method中。调用(Method.java:498)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward( FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController。的java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction。的java:52)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access $ 201(PageFlowReque stProcessor.java:97)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor $ ActionRunner.execute(PageFlowRequestProcessor.java:2044)
...

1 个答案:

答案 0 :(得分:0)

我已使用https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/2.2.0

上的最新驱动程序解决了问题

并由WEBLOGIC_CLASSPATH更新,以及以下jars

WEBLOGIC_CLASSPATH = $ {WEBLOGIC_CLASSPATH} $ {CLASSPATHSEP} /hadoop-common-2.2.0.jar$ {CLASSPATHSEP} /hive-jdbc-2.0.0.jar$ {CLASSPATHSEP} /hive-jdbc-2.0.0- standalone.jar“

我可以在弹出Weblogic后成功创建JDBC连接。