Hello,
Using version 3.1.1.0, I get a lot of exception errors in monitor.0 when the monitoring process tries to insert into IBM_RTMON_DATA.STOREDPROCEDURE with the column "routine_module_name" a null value.
As described in SYSCAT.ROUTINES, the column ROUTINE_MODULE_NAME allows null values and there are a lot of rows with null values in this column when I query the monitored database.
This is the error:
----------------------------------------------------------------
monitor (278) Jun 12, 2020 10:59:39 AM INFO EventMonitorStaticsMapper::preCollect(): before sicWatchdog
monitor (202) Jun 12, 2020 10:59:39 AM ERROR Batch persist failed :
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='routine_module_name', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeNam
e='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #7 with JdbcType NULL . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: com.ibm.db2.jcc.am.SqlE
xception: [jcc][10271][10295][4.26.14] Unrecognized JDBC type: 0. ERRORCODE=-4228, SQLSTATE=null
### The error may involve com.ibm.aps.tools.monitor.collector.mybatis.mapper.StoredProcedureMapper.persist-Inline
### The error occurred while setting parameters
### SQL: --insert into ibm_rtmon_data.STOREDPROCEDURE ( insert into IBMCONSOLE.STOREDPROCEDURE ( dbconn_int, collected, timestamp, level_tag, routine_type, routine_schema, routine_module_name, routine_name, specific_name, routin
e_id, lib_id, total_times_routine_invoked, total_rqst_time, pool_l_reads, pool_p_reads, pool_writes, fcm_sends_recvs_total, lock_timesouts, lock_waits, rows_read, rows_returned, wlm_queue_time_total, total_cpu_time, total_sorts
, fed_wait_time, fed_rows_deleted, fed_rows_inserted, fed_rows_updated, fed_rows_read, fed_waits_total ) values( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
### Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='routine_module_name', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null
'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #7 with JdbcType NULL . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: com.ibm.db2.jcc.am.SqlException: [jcc][10271][102
95][4.26.14] Unrecognized JDBC type: 0. ERRORCODE=-4228, SQLSTATE=null
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:185)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy.$Proxy318.persist(Unknown Source)
at com.ibm.aps.tools.monitor.collector.consumer.MonitorPersistConsumer.run(MonitorPersistConsumer.java:131)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:818)
Caused by: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='routine_module_name', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null
'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #7 with JdbcType NULL . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: com.ibm.db2.jcc.am.SqlException: [jcc][10271][102
95][4.26.14] Unrecognized JDBC type: 0. ERRORCODE=-4228, SQLSTATE=null
at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:89)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:93)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:64)
at org.apache.ibatis.executor.BatchExecutor.doUpdate(BatchExecutor.java:71)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
... 8 more
Caused by: org.apache.ibatis.type.TypeException: Error setting null for parameter #7 with JdbcType NULL . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: com.ibm.db2.jcc.am.SqlException: [jcc][10271][102
95][4.26.14] Unrecognized JDBC type: 0. ERRORCODE=-4228, SQLSTATE=null
at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:47)
at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:87)
... 14 more
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10271][10295][4.26.14] Unrecognized JDBC type: 0. ERRORCODE=-4228, SQLSTATE=null
at com.ibm.db2.jcc.am.b7.a(b7.java:794)
at com.ibm.db2.jcc.am.b7.a(b7.java:66)
at com.ibm.db2.jcc.am.b7.a(b7.java:116)
at com.ibm.db2.jcc.am.ao.m(ao.java:1504)
at com.ibm.db2.jcc.am.k5.e(k5.java:948)
at com.ibm.db2.jcc.am.k5.setNull(k5.java:843)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:499)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:499)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:499)
at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:45)
... 15 more
monitor (278) Jun 12, 2020 10:59:39 AM INFO EventMonitorStaticsMapper::preCollect(): after sicWatchdog
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks in advance,
Javier
------------------------------
Javier Pérez Hidalgo
------------------------------
#Db2