-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.5.0
-
Component/s: Async, Connection Management
-
Environment:Windows 64 bit.
Hi,
Got this error while trying to aggregate through spring data mongoDB in a Spring async method.
java.lang.IllegalStateException: state should be: open
at com.mongodb.assertions.Assertions.isTrue(Assertions.java:70)
at com.mongodb.connection.BaseCluster.selectServer(BaseCluster.java:82)
at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.<init>(ClusterBinding.java:75)
at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.<init>(ClusterBinding.java:71)
at com.mongodb.binding.ClusterBinding.getReadConnectionSource(ClusterBinding.java:63)
at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:90)
at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:85)
at com.mongodb.operation.CommandReadOperation.execute(CommandReadOperation.java:55)
at com.mongodb.Mongo.execute(Mongo.java:836)
at com.mongodb.Mongo$2.execute(Mongo.java:823)
at com.mongodb.DB.executeCommand(DB.java:729)
at com.mongodb.DB.command(DB.java:491)
at com.mongodb.DB.command(DB.java:507)
at com.mongodb.DB.command(DB.java:462)
at org.springframework.data.mongodb.core.MongoTemplate$3.doInDB(MongoTemplate.java:410)
at org.springframework.data.mongodb.core.MongoTemplate$3.doInDB(MongoTemplate.java:408)
at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:466)
at org.springframework.data.mongodb.core.MongoTemplate.executeCommand(MongoTemplate.java:408)
at org.springframework.data.mongodb.core.MongoTemplate.aggregate(MongoTemplate.java:1576)
at org.springframework.data.mongodb.core.MongoTemplate.aggregate(MongoTemplate.java:1511)
at com.metlife.impactview.service.DBComputationImpl.getPOIStreamByReferenceId(DBComputationImpl.java:616)
at com.metlife.impactview.service.MultiLevelAsyncServiceImpl.createJobLevelGraphForAllStreams(MultiLevelAsyncServiceImpl.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy119.createJobLevelGraphForAllStreams(Unknown Source)
at com.metlife.impactview.service.TestService.tester(TestService.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
- is caused by
-
JAVA-2411 MongoDB: java.lang.IllegalStateException: state should be: open
- Closed