question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IncompatibleClassChangeError while initiating [de.flapdoodle.embed.mongo.MongodExecutable]

See original GitHub issue

Using de.flapdoodle.embed.mongo version 3.4.6, an error was occurred before running test cases:

40:45.124 WARN  [main        ] o.s.w.c.s.GenericWebApplicationContext.refresh:591           - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxx.xxxxxx.xxx': Unsatisfied dependency expressed through field 'mongoTemplate';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedMongoServer' defined in class path resource [org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.class]: Bean instantiation via factory method failed;
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.flapdoodle.embed.mongo.MongodExecutable]: Factory method 'embeddedMongoServer' threw exception;
nested exception is java.lang.IncompatibleClassChangeError: Found interface de.flapdoodle.os.Platform, but class was expected

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
yadavan88commented, Oct 18, 2022

@michaelmosmann Just asking this due to my curiosity. Any idea why the change got affected without the version update? By any chance, the flapdoodle-os latest changes got published with the same version? I was just trying to understand how this behaviour. Thanks in advance!

2reactions
michaelmosmanncommented, Oct 18, 2022

sorry for this… the change was in flapdoodle-os … and i am not sure if i did choose the right sem-ver for this…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my flapdoodle Embedded MongoDB test fail to run ...
I was in the same situation, and I could resolve it using @DirtiesContext on this way: @DirtiesContext(classMode = ClassMode.
Read more >
Resolve exception "IncompatibleClassChangeError Found ...
When starting Spectrum, the wrapper.log file contains these errors: ERROR [ScanDirectoryHandler] Unable to deploy file [services-compat.war] java.lang.
Read more >
Organization Flapdoodle OSS | Embedmongo.flapdoodle.de
Starting with version 2 we are going to support only java 8 or higher. ... Dependencies. Build on top of. Embed Process Util...
Read more >
de.flapdoodle.embed.mongo.MongodExecutable java code ...
Embedded MongoDB when running integration tests. MongoDBRuntime runtime = MongoDBRuntime.getDefaultInstance(); mongodExe = runtime.prepare(new ...
Read more >
spring-projects/spring-boot - Gitter
... Failed to instantiate [de.flapdoodle.embed.mongo.MongodExecutable]: Factory method 'embeddedMongoServer' threw exception; nested exception is java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found