解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation

报错信息:

2017-06-15 15:02:15,374 INFO [main] org.apache.hadoop.mapred.MapTask: Ignoring exception during close for [email protected]0
java.io.IOException: java.sql.SQLException: Protocol violation
    at org.apache.sqoop.mapreduce.db.DBRecordReader.close(DBRecordReader.java:173)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.close(MapTask.java:523)
    at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:2004)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:796)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.sql.SQLException: Protocol violation
    at oracle.jdbc.driver.T4CTTIfun.readRXH(T4CTTIfun.java:631)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:391)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
    at oracle.jdbc.driver.T4C7Ocommoncall.doOCOMMIT(T4C7Ocommoncall.java:75)
    at oracle.jdbc.driver.T4CConnection.doCommit(T4CConnection.java:641)
    at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3928)
    at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3934)
    at org.apache.sqoop.mapreduce.db.DBRecordReader.close(DBRecordReader.java:169)
    ... 9 more
2017-06-15 15:02:15,384 FATAL [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.OutOfMemoryError: Java heap space
    at java.lang.reflect.Array.newArray(Native Method)
    at java.lang.reflect.Array.newInstance(Array.java:75)
    at oracle.jdbc.driver.BufferCache.get(BufferCache.java:226)
    at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:7698)
    at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:1013)
    at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:277)
    at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:146)
    at oracle.jdbc.driver.T4C8Oall.readDCB(T4C8Oall.java:916)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:421)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
    at org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:111)
    at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:235)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:556)
    at org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:80)
    at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:91)
    at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
    at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)can

参考:http://blog.csdn.net/wsm6591289/article/details/34425919

时间: 2024-10-25 19:10:22

解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation的相关文章

MySQL报错:Cause: java.sql.SQLException: Incorrect string value: '\xE6\x9D\xA8","...' for column 'obj_value' at row 1

1.插入MySQL表时,报错:Cause: java.sql.SQLException: Incorrect string value: '\xE6\x9D\xA8","...' for column 'obj_value' at row 1 错误原因:参数中带有emoji表情,插入数据库时,一些特殊字符如“繁星拜月??”,插入报异常 解决思路:因为字符编码集为utf8,不支持一些basic multilingual plane和补充字符,那么如何让mysql存储emoji表情,所以需

ODI接口运行报错 911 : 42000 :java.sql.SQLException: ORA-00911:无效字符

参见博客http://blog.csdn.net/lzflydream/article/details/20570813 这上面这么说的,但是大神们说的太高端了我不知道怎么解决   911 : 42000 :java.sql.SQLException: ORA-00911: invalid character KM中多了一个分号,KM每一句不需要分号. 最终,在Operator监视器界面点击错误所在,勾选忽略错误,重新启动此会话.问题解决了. 错误根源:源数据库与目标数据库表对应时字段类型对应不

多线程AsyncTask中使用Jsoup 报错Caused by: java.lang.NoClassDefFoundError: org.jsoup.Jsoup

代码如下,在多线程AsyncTask类中的doInBackground调用Jsoup protected String doInBackground(String... params) { // TODO Auto-generated method stub Log.i(TAG, "doInBackground(Params... params) called"); try { Document doc=Jsoup.connect(params[0]).get(); Elements

spring-framework-3.2.4.RELEASE 整合hibernate-release-4.3.5.Final报错Caused by: java.lang.NoClassDefFound

LZ今天整合spring-framework-3.2.4.RELEASE 整合hibernate-release-4.3.5.Final报错Caused by: java.lang.NoClassDefFound Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/jta/platform/spi/JtaPlatform. 最后从国外一篇文章找到解决办法:原文地址如下:点击打开链接 产生原因是: Hibernate4.

mysql 保存emoji时报,数据库报错:Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x82\xF0\x9F...' for column 'review' at row 1

错误原因:我们可以看到错误提示中的字符0xF0 0x9F 0x98 0x84 ,这对应UTF-8编码格式中的4字节编码(UTF-8编码规范).正常的汉字一般不会超过3个字节,为什么为出现4个字节呢?实际上是它对应的是智能手机输入法中的表情.那为什么会报错呢?因为mysql中的utf-8并不是真正意义上的utf-8,它只能存储1~3个字节长度的utf-8编码,如果想存储4个字节的必须用utf8mb4类型.不而要使用utf8mb4类型,首先要保证Mysql版本要不低于 MySQL 5.5.3. 常用

(解决--)Caused by: java.sql.SQLException: 无法转换为内部表示 .

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL Caused by: java.sql.SQLException: 无法转换为内部表示 在开发时遇到无法转换为内部表示的问题:犯错原因主要是 Hibernate的映射和pojo的数据类型和数据库的数据类型不匹配 varchar ===

Caused by: java.sql.SQLException: ResultSet is from UPDATE. No Data.

1.错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql

Hibernate中Caused by: java.sql.SQLException: Field 'address_id'doesn't have a default value

在学习Hibernate中,相信很多人都遇到过: Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statement Caused by: java.sql.SQLException: Field 'address_id' doesn't have a default value 很是纳闷,明明我的address_id是主键,为毛还提示我不存在默认值?主

Caused by: java.sql.SQLException: Field 'category_id' doesn't have a default value

### The error may involve com.qingmu.core.dao.ad.ContentDao.insertSelective-Inline ### The error occurred while setting parameters ### SQL: insert into tb_content ( title, url, pic, sort_order ) values ( ?, ?, ?, ? ) ### Cause: java.sql.SQLException: