ora-hive配置oarcle为metastore报错ORA-01754

问题描述

hive配置oarcle为metastore报错ORA-01754

在hive配置远程模式metastore为Oracle,启动正常,创建表时报错

 hive> create table dht_tab(name1 int,name45 varchar(50))row format delimited fields terminated by 't';
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(es) : ORA-01754: a table may contain only one column of type LONG
java.sql.SQLSyntaxErrorException: ORA-01754: a table may contain only one column of type LONG

根据网上修改"hive/lib/hive-metastore-1.2.1.jar"包中package.jdo文件,将LONGVARCHAR类型修改为CLOB,操作如下:

 cd $HIVE_HOME/lib
mkdir temp
cp hive-metastore-1.2.1.jar temp
cd temp
jar -xvf hive-metastore-1.2.1.jar
sed -i -e 's/LONGVARCHAR/CLOB/g' package.jdo
jar cfm hive-metastore-1.2.1.jar META-INF/MANIFEST.MF *
cp hive-metastore-1.2.1.jar $HIVE_HOME/lib

再通过 hive --service metastore 初始化hive 再进入hive创建表仍然报相同错误。
求解????
还有一个问题 就是hive --service hiveserver2 没有反应

感谢!

解决方案

这个问题我自己解决了 在/hive/scripts/metastore/upgrade下有各种类型的数据库的sql 如果创建不成功可直接在用sql在数据库上直接创建再运行就可以了

解决方案二:

这个错误是说表只能包含一个long类型的列,那最好别用long类型了

时间: 2024-08-30 08:03:52

ora-hive配置oarcle为metastore报错ORA-01754的相关文章

named-Linux下配置DNS服务器,报错“has no address records (A or AAAA)”,怎么解决,求大师指导

问题描述 Linux下配置DNS服务器,报错"has no address records (A or AAAA)",怎么解决,求大师指导 我搞不懂这段报错,怎么解决,您会吗?May 16 04:47:57 localhost named: test.zone:8: NS record '192.168.9.159' appears to be an addressMay 16 04:47:57 localhost named: zone test.com/IN: NS '192.16

spring配置xml文件classnotfound报错

问题描述 spring配置xml文件classnotfound报错 ApplicationContext ctx=new ClassPathXmlApplicationContext("WebContentWEB-INFspring.xml"); 也用了FileSystemXmlApplicationContext(),输入绝对路径, 但都是java.lang.ClassNotFoundException报错 解决方案 代码报错多贴一些,看看到底是哪个类找不到,这么贴看不出来啥 解决方

ssh事务-SSH配置事务tomcat启动报错问题

问题描述 SSH配置事务tomcat启动报错问题 tomcat启动报错: 严重: Exception sending context initialized event to listener instance of class org.apache.struts.plugin.PluginContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with

eclipse里配置tomcat后运行报错

问题描述 eclipse里配置tomcat后运行报错 eclipse里配置tomcat后,tomcat能启动,项目也部署到tomcat里了,但运行web项目报错404 解决方案 eclipse 配置并运行 Tomcateclipse远程调试tomcat运行的web项目--配置 解决方案二: http://www.mamicode.com/info-detail-492134.html

application xml- 关于在配置Application.xml文件报错

问题描述 关于在配置Application.xml文件报错 Application.xml文件报错 在网上搜了很多种解决方式,但是就是不管用. 错误如下: Class 'org.springframework.orm.hibernate4.LocalSessionFactoryBean' not found

jxl读取excel文件时报内存溢出,修改内存配置后,还是报错

问题描述 jxl读取excel文件时报内存溢出,修改内存配置后,还是报错 解决方案 解决方案二:贴码解决方案三:请楼主贴代码,这个你不贴代码,我们难道去猜吗

初接触云计算,在实验配置Auto-Scale时候,报错You must specify a region. You can also configure you

问题描述 初接触云计算,在实验配置Auto-Scale时候,报错Youmustspecifyaregion.Youcanalsoconfigureyourregionbyrunning"awsconfigure".这个怎么解决?

windows8.1 iis配置 网站 打开网站报错

问题描述 windows8.1iis配置网站打开网站报错如下图: 解决方案 解决方案二:没有描述只有异常没见过无法目测解决方案三:尝试分配独立的线程池.解决方案四:会不会是网站目录的权限问题解决方案五:引用2楼insus的回复: 尝试分配独立的线程池. 怎么分配?解决方案六:直接给最高权限试试解决方案七:看看权限!很可能是权限问题,everyone权限和user权限!

数据源配置-GlassFish 添加数据源 报错,求解脱

问题描述 GlassFish 添加数据源 报错,求解脱