Contribute in GitHub:
Edit online
Db2 Extraction Fails with Insufficient data. ERRORCODE=-4499, SQLSTATE=08001)
Problem
The database extraction reports errors as follows:
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory ([jcc][t4][2030][11211][4.33.31] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001)
The database extraction reports errors about character conversion
Insufficient data. ERRORCODE=-4499, SQLSTATE=08001)
. The complete error message is as follows.
java.lang.IllegalStateException: Failed to read from source database
at eu.profinit.manta.connector.db2.extractor.dao.Db2DaoImpl.checkPreconditions(Db2DaoImpl.java:86) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.Db2ExtractorImpl.checkPreconditions(Db2ExtractorImpl.java:102) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.Db2ExtractorWithZosFallback.extract(Db2ExtractorWithZosFallback.java:35) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.scenario.Db2ExtractorReader.read(Db2ExtractorReader.java:44) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.scenario.Db2ExtractorReader.read(Db2ExtractorReader.java:21) ~[?:?]
at eu.profinit.manta.connector.common.extractor.scenario.ExtractorScenario.doExecute(ExtractorScenario.java:63) ~[?:?]
at eu.profinit.manta.platform.automation.AbstractScenario.execute(AbstractScenario.java:107) ~[manta-lib-automation-4.0.0.jar:?]
at eu.profinit.manta.platform.cli.CliImpl.execute(CliImpl.java:266) ~[manta-platform-cli-42.4.0-SNAPSHOT.jar:?]
at eu.profinit.manta.platform.cli.launcher.Main.lambda$main$1(Main.java:66) ~[manta-platform-cli-launcher-42.4.0-SNAPSHOT.jar:42.4.0-SNAPSHOT]
at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: org.mybatis.spring.MyBatisSystemException
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439) ~[?:?]
at jdk.proxy3.$Proxy53.selectOne(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) ~[?:?]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[?:?]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[?:?]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[?:?]
at jdk.proxy3.$Proxy68.testDb2Look(Unknown Source) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.dao.Db2DaoImpl.checkPreconditions(Db2DaoImpl.java:71) ~[?:?]
... 9 more
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection
### The error may exist in URL [jar:file:/C:/manta/mantaflow-r42.3s/cli/scenarios/manta-dataflow-cli/lib/manta-connector-db2-dictionary-extractor-42.4.0-20240124.123923-19.jar!/eu/profinit/manta/connector/db2/extractor/mappers/db2/Db2lkMapper.xml]
### The error may involve eu.profinit.manta.connector.db2.extractor.mappers.Db2lkMapper.testDb2Look
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425) ~[?:?]
at jdk.proxy3.$Proxy53.selectOne(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) ~[?:?]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[?:?]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[?:?]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[?:?]
at jdk.proxy3.$Proxy68.testDb2Look(Unknown Source) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.dao.Db2DaoImpl.checkPreconditions(Db2DaoImpl.java:71) ~[?:?]
... 9 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:84) ~[?:?]
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80) ~[?:?]
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337) ~[?:?]
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86) ~[?:?]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[?:?]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[?:?]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425) ~[?:?]
at jdk.proxy3.$Proxy53.selectOne(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) ~[?:?]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[?:?]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[?:?]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[?:?]
at jdk.proxy3.$Proxy68.testDb2Look(Unknown Source) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.dao.Db2DaoImpl.checkPreconditions(Db2DaoImpl.java:71) ~[?:?]
... 9 more
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory ([jcc][t4][2030][11211][4.33.31] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:669) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:544) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) ~[?:?]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) ~[?:?]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[?:?]
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80) ~[?:?]
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337) ~[?:?]
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86) ~[?:?]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[?:?]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[?:?]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425) ~[?:?]
at jdk.proxy3.$Proxy53.selectOne(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) ~[?:?]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[?:?]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[?:?]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[?:?]
at jdk.proxy3.$Proxy68.testDb2Look(Unknown Source) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.dao.Db2DaoImpl.checkPreconditions(Db2DaoImpl.java:71) ~[?:?]
... 9 more
Caused by: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][4.33.31] A communication error occurred during operations on the connection's underlying socket, socket input stream,
or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001
at com.ibm.db2.jcc.am.b4.a(b4.java:338) ~[?:?]
at com.ibm.db2.jcc.t4.a.a(a.java:580) ~[?:?]
at com.ibm.db2.jcc.t4.a.a(a.java:564) ~[?:?]
at com.ibm.db2.jcc.t4.a.a(a.java:559) ~[?:?]
at com.ibm.db2.jcc.t4.x.b(x.java:315) ~[?:?]
at com.ibm.db2.jcc.t4.x.c(x.java:342) ~[?:?]
at com.ibm.db2.jcc.t4.x.c(x.java:455) ~[?:?]
at com.ibm.db2.jcc.t4.x.v(x.java:1230) ~[?:?]
at com.ibm.db2.jcc.t4.y.a(y.java:53) ~[?:?]
at com.ibm.db2.jcc.t4.b.c(b.java:1523) ~[?:?]
at com.ibm.db2.jcc.t4.b.b(b.java:1391) ~[?:?]
at com.ibm.db2.jcc.t4.b.b(b.java:938) ~[?:?]
at com.ibm.db2.jcc.t4.b.a(b.java:890) ~[?:?]
at com.ibm.db2.jcc.t4.b.a(b.java:458) ~[?:?]
at com.ibm.db2.jcc.t4.b.a(b.java:431) ~[?:?]
at com.ibm.db2.jcc.t4.b.<init>(b.java:369) ~[?:?]
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:259) ~[?:?]
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:215) ~[?:?]
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:491) ~[?:?]
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:117) ~[?:?]
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:55) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:355) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:115) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:665) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:544) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753) ~[commons-dbcp2-2.7.0.jar:2.7.0]
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) ~[?:?]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) ~[?:?]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[?:?]
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:80) ~[?:?]
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:337) ~[?:?]
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:86) ~[?:?]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[?:?]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[?:?]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[?:?]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[?:?]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425) ~[?:?]
at jdk.proxy3.$Proxy53.selectOne(Unknown Source) ~[?:?]
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) ~[?:?]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[?:?]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[?:?]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[?:?]
at jdk.proxy3.$Proxy68.testDb2Look(Unknown Source) ~[?:?]
at eu.profinit.manta.connector.db2.extractor.dao.Db2DaoImpl.checkPreconditions(Db2DaoImpl.java:71) ~[?:?]
... 9 more
Solution
This occurs when JDBC connection string reference database that does not exist or is not accessible.
-
Review your JDBC connection URL and validate that the database specified does exist
-
Rerun the Db2 extraction.