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

时间:2022-10-15 04:08:53

报错信息:

-- ::, INFO [main] org.apache.hadoop.mapred.MapTask: Ignoring exception during close for org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader@7555b920
java.io.IOException: java.sql.SQLException: Protocol violation
at org.apache.sqoop.mapreduce.db.DBRecordReader.close(DBRecordReader.java:)
at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.close(MapTask.java:)
at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:)
at org.apache.hadoop.mapred.YarnChild$.run(YarnChild.java:)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:)
Caused by: java.sql.SQLException: Protocol violation
at oracle.jdbc.driver.T4CTTIfun.readRXH(T4CTTIfun.java:)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:)
at oracle.jdbc.driver.T4C7Ocommoncall.doOCOMMIT(T4C7Ocommoncall.java:)
at oracle.jdbc.driver.T4CConnection.doCommit(T4CConnection.java:)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:)
at org.apache.sqoop.mapreduce.db.DBRecordReader.close(DBRecordReader.java:)
... more
-- ::, 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:)
at oracle.jdbc.driver.BufferCache.get(BufferCache.java:)
at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:)
at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:)
at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:)
at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:)
at oracle.jdbc.driver.T4C8Oall.readDCB(T4C8Oall.java:)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:)
at org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:)
at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:)
at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:)
at org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:)
at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:)
at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:)
at org.apache.hadoop.mapred.YarnChild$.run(YarnChild.java:)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:)can
解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation