flapdoodle-oss / de.flapdoodle.embed.mongo.spring

embedded mongo spring integration
Apache License 2.0
30 stars 7 forks source link

Unable to create the bean #1

Closed nayan-rafiq closed 2 years ago

nayan-rafiq commented 2 years ago

I'm trying to integrate this integration library with my spring-boot-2.7.0 project. Here is what I've done: Added the following dependencies in the pom.xml

<dependency>
    <groupId>de.flapdoodle.embed</groupId>
    <artifactId>de.flapdoodle.embed.mongo</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>de.flapdoodle.embed</groupId>
    <artifactId>de.flapdoodle.embed.mongo.spring</artifactId>
    <version>1.1.0-spring27x</version>
</dependency>

Added de.flapdoodle.mongodb.embedded.version=3.4.3 to the application.properties

Here is how my test classes annotated:

@RunWith(SpringRunner.class)
@SpringBootTest
@Slf4j
@DirtiesContext
public class ApplicationServiceTest {
}

If I run any method from the test, I get the following error:

Failed to instantiate [de.flapdoodle.embed.mongo.MongodExecutable]: Factory method 'embeddedMongoServer' threw exception; nested exception is java.lang.IllegalArgumentException: no match out of [X86_64, X86_32, ARM_64, ARM_32]

I'm running on Mac with a M1 chip.

nayan-rafiq commented 2 years ago

I was able to get rid of the error by providing the folllowing parameters when running the test: -Dde.flapdoodle.os.explain=true -Dde.flapdoodle.os.override=OS_X|X86_64 Closing this issue as it's more related to documentation.

michaelmosmann commented 2 years ago

see https://github.com/flapdoodle-oss/de.flapdoodle.os#run