Hi Team,
We recently tried to connect the latest Flowable version (6.4.0.alpha) with MongoDB as per the instruction provided in Read.md file on GitHub. We used 4.0.2 version of MongoDB to connect to Flowable. But while running the application we were facing issues with the startSession method. The error which we faced is as below :
Exception in thread “main” java.lang.NoSuchMethodError: com.mongodb.MongoClient.startSession(Lcom/mongodb/ClientSessionOptions;)Lcom/mongodb/client/ClientSession;
at org.flowable.mongodb.persistence.MongoDbSession.(MongoDbSession.java:69)
at org.flowable.mongodb.persistence.MongoDbSessionFactory.openSession(MongoDbSessionFactory.java:151)
at org.flowable.common.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:241)
at org.flowable.mongodb.transaction.MongoDbTransactionContext.(MongoDbTransactionContext.java:46)
at org.flowable.mongodb.transaction.MongoDbTransactionContextFactory.openTransactionContext(MongoDbTransactionContextFactory.java:29)
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:47)
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:71)
at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
at org.flowable.engine.impl.ProcessEngineImpl.(ProcessEngineImpl.java:78)
at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:888)
at com.example.test.TestApplication.main(TestApplication.java:26)
Post this error, we tried to run the Junit Test cases using the replicate set of Mongo instances, which was executed successfully. Which infers there is no issue with the Mongo version, but still we are not able to run the Springboot application, where we injected Flowable engine dependencies.
Image attached contains the code, dependencies and the error which we faced.
Please go through it once and let us know in case we forget to add something or missed some configuration.
Thanks in advance.!