DB2 - Problem description
Problem IT39269 | Status: Closed |
NOSQLJSON SERIALIZER CRASHES WHEN NULL IS THE VALUE FOR JSON KEY | |
product: | |
DB2 CONNECT / DB2CONNCT / B50 - DB2 | |
Problem description: | |
nosqljson serializer crashes when null is the value for json key like {"name": null} nosqljson.jar prints stack trace and throws exception. f.e. when collstat command has null it throws error like below: [08/07/2021 17:57:03:639 EDT] 0000001e 3 com.ibm.nosql.db2wire.server.DB2Listener Message - Collection {"collStats":"auditTrail","scale": null ,"$db":"MAPICS"} [08/07/2021 17:57:03:639 EDT] 0000001e 3 com.ibm.nosql.db2wire.server.DB2CollectionHelper Query: collStats [08/07/2021 17:57:03:640 EDT] 0000001e com.ibm.nosql.db2wire.server.DB2Listener Error: An exception has been thrown: Error processing message; java.lang.NullPointerException : null at com.ibm.nosql.db2wire.server.DB2CollectionHelper.collStats(DB2Co llectionHelper.java:127) at com.ibm.nosql.db2wire.server.DB2Plugin.query(DB2Plugin.java:457) at com.ibm.nosql.driver.opMessage.Message(opMessage.java:183) at com.ibm.nosql.socket.channel.NoSQLInboundLink.handleMessage(NoSQ LInboundLink.java:430) at com.ibm.nosql.socket.channel.NoSQLInboundLink.complete(NoSQLInbo undLink.java:196) at com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.requestComplete( WorkQueueManager.java:551) at com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQu eueManager.java:601) at com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.workerRun(WorkQu eueManager.java:948) at com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQ ueueManager.java:1027) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec utor.java:1160) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe cutor.java:635) at com.ibm.ws.objectgrid.thread.XSThreadPool$Worker.run(XSThreadPoo l.java:282) | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Mongo client with IBM NoSQL/JSON Wire Listener * **************************************************************** * PROBLEM DESCRIPTION: * * osqljson serializer crashes when null is the value for json * * key like {"name": null} * * * * nosqljson.jar prints stack trace and throws exception. f.e. * * when collstat command has null it throws error like below: * * * * [08/07/2021 17:57:03:639 EDT] 0000001e * * com.ibm.nosql.db2wire.server.DB2Listener Message * * -Collection * * {"collStats":"auditTrail","scale": null ,"$db":"MAPICS"} * * * * [08/07/2021 17:57:03:639 EDT] 0000001e * * com.ibm.nosql.db2wire.server.DB2CollectionHelper Query: * * collStats * * [08/07/2021 17:57:03:640 EDT] 0000001e * * com.ibm.nosql.db2wire.server.DB2Listener Error: * * Anexception has been thrown: Error processing message; * * java.lang.NullPointerException : null * * at * * com.ibm.nosql.db2wire.server.DB2CollectionHelper.collStats(D * * B2CollectionHelper.java:127) * * at * * com.ibm.nosql.db2wire.server.DB2Plugin.query(DB2Plugin.java: * * 457) * * at * * com.ibm.nosql.driver.opMessage.Message(opMessage.java:183) * * at * * com.ibm.nosql.socket.channel.NoSQLInboundLink.handleMessage( * * NoSQLInboundLink.java:430) * * at * * com.ibm.nosql.socket.channel.NoSQLInboundLink.complete(NoSQL * * InboundLink.java:196) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.requestCompl * * ete(WorkQueueManager.java:551) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.attemptIO(Wo * * rkQueueManager.java:601) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.workerRun(Wo * * rkQueueManager.java:948) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager$Worker.run(W * * orkQueueManager.java:1027) * * at * * java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool * * Executor.java:1160) * * at * * java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo * * lExecutor.java:635) * * at * * com.ibm.ws.objectgrid.thread.XSThreadPool$Worker.run(XSThrea * * dPool.java:282) * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.5.7.1 or later releases. * **************************************************************** | |
Local Fix: | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * * Mongo client with IBM NoSQL/JSON Wire Listener * **************************************************************** * PROBLEM DESCRIPTION: * * osqljson serializer crashes when null is the value for json * * key like {"name": null} * * * * nosqljson.jar prints stack trace and throws exception. f.e. * * when collstat command has null it throws error like below: * * * * [08/07/2021 17:57:03:639 EDT] 0000001e * * com.ibm.nosql.db2wire.server.DB2Listener Message * * -Collection * * {"collStats":"auditTrail","scale": null ,"$db":"MAPICS"} * * * * [08/07/2021 17:57:03:639 EDT] 0000001e * * com.ibm.nosql.db2wire.server.DB2CollectionHelper Query: * * collStats * * [08/07/2021 17:57:03:640 EDT] 0000001e * * com.ibm.nosql.db2wire.server.DB2Listener Error: * * Anexception has been thrown: Error processing message; * * java.lang.NullPointerException : null * * at * * com.ibm.nosql.db2wire.server.DB2CollectionHelper.collStats(D * * B2CollectionHelper.java:127) * * at * * com.ibm.nosql.db2wire.server.DB2Plugin.query(DB2Plugin.java: * * 457) * * at * * com.ibm.nosql.driver.opMessage.Message(opMessage.java:183) * * at * * com.ibm.nosql.socket.channel.NoSQLInboundLink.handleMessage( * * NoSQLInboundLink.java:430) * * at * * com.ibm.nosql.socket.channel.NoSQLInboundLink.complete(NoSQL * * InboundLink.java:196) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.requestCompl * * ete(WorkQueueManager.java:551) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.attemptIO(Wo * * rkQueueManager.java:601) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager.workerRun(Wo * * rkQueueManager.java:948) * * at * * com.ibm.ws.xs.tcp.channel.impl.WorkQueueManager$Worker.run(W * * orkQueueManager.java:1027) * * at * * java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool * * Executor.java:1160) * * at * * java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo * * lExecutor.java:635) * * at * * com.ibm.ws.objectgrid.thread.XSThreadPool$Worker.run(XSThrea * * dPool.java:282) * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 version 11.5.7.1 or later releases. * **************************************************************** | |
Comment | |
db2_v11571 contains fix of this issue. After the fix, exception no longer exists and program works fine. | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 30.11.2021 15.12.2021 24.10.2022 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |