suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT39267 Status: Closed

NOSQL JAVA DRIVER THROWS RUNTIMEEXCEPTION FOR $SAMPLE IN AGGREGATE
PIPELINE

product:
DB2 CONNECT / DB2CONNCT / B50 - DB2
Problem description:
IBM NoSQL Java Driver, NoSQL Command Line and JSON Wire Listener
throws RuntimeException if $sample stage is used in
db.collection.aggregate() pipeline.

For a collection "book" in test db, the command
"db.book.aggregate( [ { $sample:{ size: 3 }} ])" throws below
exception:

An exception has been thrown: java.lang.RuntimeException :
CDJSN0101E Execution failed in the following expression:
"$sample"
at
com.ibm.nosql.json.api.DBQueryAnalyzer.handleJSONTask(DBQueryAna
lyzer.java:126)
at
com.ibm.nosql.json.api.DBQueryAnalyzer.makeSQLQueryTasks(DBQuery
Analyzer.java:58)
at
com.ibm.nosql.json.api.DBQueryBuilder.buildQuery(DBQueryBuilder.
java:269)
at
com.ibm.nosql.json.api.DBCursorAggregate.find(DBCursorAggregate.
java:189)
at com.ibm.nosql.json.api.DBCursor.hasNext(DBCursor.java:278)
at
com.ibm.nosql.json.api.DBCollection.aggregate(DBCollection.java:
4537)
at
com.ibm.nosql.db2wire.server.DB2AggregationHelper.pipeline(DB2Ag
gregationHelper.java:90)
at
com.ibm.nosql.db2wire.server.DB2Plugin.query(DB2Plugin.java:504)
at com.ibm.nosql.driver.opMessage.Message(opMessage.java:183)
at
com.ibm.nosql.socket.channel.NoSQLInboundLink.handleMessage(NoSQ
LInboundLink.java:433)
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:1156)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
cutor.java:626)
at
com.ibm.ws.objectgrid.thread.XSThreadPool$Worker.run(XSThreadPoo
l.java:282)
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* IBM NoSQL/JSON Wire listener is used to run aggregate        *
* command with $sample option.                                 *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* IBM NoSQL Java Driver, NoSQL Command Line and JSON Wire      *
* Listener throws RuntimeException if $sample stage is used in *
* db.collection.aggregate() pipeline. For a collection "book"  *
* in test db, the command "db.book.aggregate( [ { $sample:{    *
* size: 3 }} ])" throws below exception:                       *
*                                                              *
* An exception has been thrown: java.lang.RuntimeException     *
* :CDJSN0101E Execution failed in the following expression:    *
* "$sample"                                                    *
* at                                                           *
* com.ibm.nosql.json.api.DBQueryAnalyzer.handleJSONTask(DBQuer *
* yAnalyzer.java:126)                                          *
* at                                                           *
* com.ibm.nosql.json.api.DBQueryAnalyzer.makeSQLQueryTasks(DBQ *
* ueryAnalyzer.java:58)                                        *
* at                                                           *
* com.ibm.nosql.json.api.DBQueryBuilder.buildQuery(DBQueryBuil *
* der.java:269)                                                *
* at                                                           *
* com.ibm.nosql.json.api.DBCursorAggregate.find(DBCursorAggreg *
* ate.java:189)                                                *
* at                                                           *
* com.ibm.nosql.json.api.DBCursor.hasNext(DBCursor.java:278)   *
* at                                                           *
* com.ibm.nosql.json.api.DBCollection.aggregate(DBCollection.j *
* ava:4537)                                                    *
* at                                                           *
* com.ibm.nosql.db2wire.server.DB2AggregationHelper.pipeline(D *
* B2AggregationHelper.java:90)                                 *
* at                                                           *
* com.ibm.nosql.db2wire.server.DB2Plugin.query(DB2Plugin.java: *
* 504)                                                         *
* at                                                           *
* com.ibm.nosql.driver.opMessage.Message(opMessage.java:183)   *
* at                                                           *
* com.ibm.nosql.socket.channel.NoSQLInboundLink.handleMessage( *
* NoSQLInboundLink.java:433)                                   *
* 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:1156)                                          *
* at                                                           *
* java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo *
* lExecutor.java:626)                                          *
* 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:                                              *
* IBM NoSQL/JSON Wire listener is used to run aggregate        *
* command with $sample option.                                 *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* IBM NoSQL Java Driver, NoSQL Command Line and JSON Wire      *
* Listener throws RuntimeException if $sample stage is used in *
* db.collection.aggregate() pipeline. For a collection "book"  *
* in test db, the command "db.book.aggregate( [ { $sample:{    *
* size: 3 }} ])" throws below exception:                       *
*                                                              *
* An exception has been thrown: java.lang.RuntimeException     *
* :CDJSN0101E Execution failed in the following expression:    *
* "$sample"                                                    *
* at                                                           *
* com.ibm.nosql.json.api.DBQueryAnalyzer.handleJSONTask(DBQuer *
* yAnalyzer.java:126)                                          *
* at                                                           *
* com.ibm.nosql.json.api.DBQueryAnalyzer.makeSQLQueryTasks(DBQ *
* ueryAnalyzer.java:58)                                        *
* at                                                           *
* com.ibm.nosql.json.api.DBQueryBuilder.buildQuery(DBQueryBuil *
* der.java:269)                                                *
* at                                                           *
* com.ibm.nosql.json.api.DBCursorAggregate.find(DBCursorAggreg *
* ate.java:189)                                                *
* at                                                           *
* com.ibm.nosql.json.api.DBCursor.hasNext(DBCursor.java:278)   *
* at                                                           *
* com.ibm.nosql.json.api.DBCollection.aggregate(DBCollection.j *
* ava:4537)                                                    *
* at                                                           *
* com.ibm.nosql.db2wire.server.DB2AggregationHelper.pipeline(D *
* B2AggregationHelper.java:90)                                 *
* at                                                           *
* com.ibm.nosql.db2wire.server.DB2Plugin.query(DB2Plugin.java: *
* 504)                                                         *
* at                                                           *
* com.ibm.nosql.driver.opMessage.Message(opMessage.java:183)   *
* at                                                           *
* com.ibm.nosql.socket.channel.NoSQLInboundLink.handleMessage( *
* NoSQLInboundLink.java:433)                                   *
* 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:1156)                                          *
* at                                                           *
* java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo *
* lExecutor.java:626)                                          *
* 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 occurs and $sample gives correct result.
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)