java.lang.IllegalStateException: Configuration error: found multiple declarations of @BootstrapWith on test class [EmployeeRestControllerTest] with values [class org.springframework.test.context.web.WebTestContextBootstrapper, class org.springframework.boot.test.WebAppIntegrationTestContextBootstrapper]

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

Solutions on the web

via Stack Overflow by socal_javaguy
, 1 year ago
Configuration error: found multiple declarations of @BootstrapWith on test class [EmployeeRestControllerTest] with values [class org.springframework.test.context.web.WebTestContextBootstrapper, class org.springframework.boot.test.WebAppIntegrationTestContextBootstrapper]
via 2cto.com by Unknown author, 1 year ago
Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
via Stack Overflow by OneTwo
, 1 year ago
Could not load TestContextBootstrapper [class org.springframework.test.context.support.DefaultTestContextBootstrapper]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
via Stack Overflow by Srikanth Pragallapati
, 11 months ago
Could not load TestContextBootstrapper [class org.springframework.test.context.support.DefaultTestContextBootstrapper]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
via Stack Overflow by Freaky Thommi
, 11 months ago
Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
via Stack Overflow by luca
, 6 months ago
Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.
java.lang.IllegalStateException: Configuration error: found multiple declarations of @BootstrapWith on test class [EmployeeRestControllerTest] with values [class org.springframework.test.context.web.WebTestContextBootstrapper, class org.springframework.boot.test.WebAppIntegrationTestContextBootstrapper]
at org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:123)
at org.springframework.test.context.TestContextManager.(TestContextManager.java:105)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:154)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

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