java.lang.IllegalArgumentException

'ok' should never be null...

Samebug tips1

This happened when I tried to insert an empty list of elements to a MongoDB collection.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web10875

  • 'ok' should never be null... 'ok' should never be null...
  • 'ok' should never be null...
  • via Google Groups by Frank LaRosa, 1 year ago
    okshould never be null
  • Stack trace

    • java.lang.IllegalArgumentException: 'ok' should never be null... at com.mongodb.CommandResult.ok(CommandResult.java:43) at com.mongodb.CommandResult.throwOnError(CommandResult.java:109) at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:102) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:142) at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:115) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:248) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204) at com.mongodb.DBCollection.insert(DBCollection.java:76) at com.mongodb.DBCollection.insert(DBCollection.java:60) at com.mongodb.DBCollection.insert(DBCollection.java:119) at com.llnw.edge.query.loader.UniquenessDaoImpl.insertAsStringSafe(UniquenessDaoImpl.java:76) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:69) at com.llnw.edge.query.loader.RetryTemplate.doExecute(RetryTemplate.java:245) at com.llnw.edge.query.loader.RetryTemplate.execute(RetryTemplate.java:138) at org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy0.insertAsStringSafe(Unknown Source) at com.llnw.edge.query.loader.UniquenessLoadManager$AddUUIDTask$7.add(UniquenessLoadManager.java:329) at com.llnw.edge.query.loader.UniquenessLoadManager$AddUUIDTask.run(UniquenessLoadManager.java:385) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Once, 1 month ago
    Once, 1 month ago
    2 times, 3 months ago
    Unknown user
    Once, 1 year ago
    1 more bugmates