java.lang.IllegalArgumentException: 'ok' should never be null...

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

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

,
via JIRA by Stephan Schroevers

You try to insert an empty list into MongoDB before 3.5.0 .

Check that the inserted list is not empty or upgrade your server.

Solutions on the web

via JIRA by Nazar Volynets, 1 year ago
'ok' should never be null...
via GitHub by harrychan
, 2 years ago
'ok' should never be null...
via Google Groups by sagar, 2 years ago
via Google Groups by sagar, 2 years ago
'ok' should never be null...
via Stack Overflow by Sagar Varpe
, 1 year ago
'ok' should never be null...
via Google Groups by Joel Westberg, 2 years ago
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 com.llnw.edge.query.loader.RetryTemplate.doExecute(RetryTemplate.java:245)
at com.llnw.edge.query.loader.RetryTemplate.execute(RetryTemplate.java:138)
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 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)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.