Hi Ke,
I usually get a similar error in regular basis related to JDBC error when in monitor.0 where trying to insert a null value in column "routine_module_name" of IBMCONSOLE.STOREDPROCEDURE table.
Acording to SYSCAT.ROUTINES, the column ROUTINEMODULENAME allows null values, and if I ask in the monitored database for SYSCAT.ROUTINES rows with ROUTINEMODULENAME with null value, I get a lot of them. Monitored database is in Oracle Compatibility mode.
Product Name: IBM Db2 Data Management Console
This is the error in monitor.0:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
monitor (274) Jun 12, 2020 10:59:39 AM INFO EventMonitorStaticsMapper::preCollect(): before sicWatchdog
monitor (206) 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 (274) Jun 12, 2020 10:59:39 AM INFO EventMonitorStaticsMapper::preCollect(): after sicWatchdog
Thanks in advance,
Javier
------------------------------
Javier Pérez Hidalgo
------------------------------
Original Message:
Sent: Thu May 28, 2020 01:42 AM
From: KE CHEN
Subject: JDBC Connection error in monitor.0 log files
Hi Roland,
This error is caused by absence of storage group. What's your consideration of not creating a storage group? Could you create one?
We have made changes to avoid this exception upon this issue(in the coming release). But without storage group, you won't be able to view the storage usage in the monitor summary page.
Thanks,
Ke
------------------------------
KE CHEN
Original Message:
Sent: Wed May 27, 2020 04:17 AM
From: Roland Schock
Subject: JDBC Connection error in monitor.0 log files
Hi dev team,
today I have cleared out the log file directory "C:\Program Files\IBM Db2 Data Management Console\resources\bin\logs" (=default with GUI install!] and checked all log files after a clean startup of DMC 3.1.1.0. I found following error, which does not seem to be an error related to our individual configuration, but more from the program itself:
monitor (458) *all* May 27, 2020 9:52:20 AM [7f27ef0c30a58323e8ebd15cd50cbf51] INFO [createConnectionInternal] url is: jdbc:db2://SRVINT:50000/DBINT:retrieveMessagesFromServerOnGetMessage=true;
monitor (189) *all* May 27, 2020 9:52:20 AM [7f27ef0c30a58323e8ebd15cd50cbf51] 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='dbconn_int', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 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][10295][4.26.14] Unrecognized JDBC type: 0. ERRORCODE=-4228, SQLSTATE=null
### The error may involve com.ibm.aps.tools.monitor.collector.mybatis.mapper.StorageMapper.persist-Inline
### The error occurred while setting parameters
### SQL: --insert into ibm_rtmon_data.resource_storagegroup( insert into .resource_storagegroup( dbconn_int, collected, timestamp, level_tag, fs_total_size, fs_used_size ) values( ?, ?, ?, ?, ?, ? )
### Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='dbconn_int', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 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][10295][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.$Proxy314.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='dbconn_int', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #1 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][10295][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 #1 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][10295][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
To me it seems DMC is bringing his own JRE and Db2 JDBC drivers (although I can see [too] many copies in the install directories!). So it should be an error, which needs to be solved.
Kind regards
------------------------------
Roland Schock
Distinguished Engineer
ARS Computer und Consulting GmbH
Muenchen
------------------------------
#Db2