java.lang.IllegalStateException: Cannot add more expectations after actual requests are made.

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

Samebug tips

,
Expert tip

If you're using boot 1.4.x you need to modify the @springBootTest annotation to @SpringBootTest(classes = DataFlowServerConfiguration.class). 1.3.8 doesn't have this problem as well.

,
Expert tip

Spring Boot 1.4 changed their annotation system a little. Try using the @SpringBootApplication annotation for better results.

Solutions on the web

via Spring JIRA by Stéphane Nicoll, 1 year ago
Cannot add more expectations after actual requests are made.
via Spring JIRA by Stéphane Nicoll, 1 year ago
Cannot add more expectations after actual requests are made.
via Stack Overflow by Unknown author, 2 years ago
Cannot load driver class: org.hsqldb.jdbc._jdbcdriver
via Stack Overflow by BillGoneMad
, 2 years ago
Cannot return Sitemesh factory it has not been set!
via Stack Overflow by voidcurser
, 2 months ago
Cannot load driver class: com.mysql.jdbc.Driver
java.lang.IllegalStateException: Cannot add more expectations after actual requests are made.
at org.springframework.test.web.client.AbstractRequestExpectationManager.expectRequest(AbstractRequestExpectationManager.java:60)
at org.springframework.test.web.client.MockRestServiceServer.expect(MockRestServiceServer.java:112)

Users with the same issue

8 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 6 months ago
67 more bugmates

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