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.

Regression: "Class not found" during spring boot test

See original GitHub issue

After upgrading for a 4.4 version of STS to the latest 4.5.1. version I get a class not found exception for the test class when trying to run tests. Going back to an older 4.3.2 version fixes this problem.

@RunWith(SpringRunner.class)
@ComponentScan(basePackages = {"de.something"})
@EnableAutoConfiguration
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
public class LegacyServiceCommunicationTest extends AbstractSoapSetupTest {

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bmaehrcommented, Feb 5, 2020

spring-tool-suite-4-4.5.2.CI-B2150-e4.15.0 solved it

0reactions
kdvoldercommented, Feb 6, 2020

Okay, thanks for confirming that @bmaehr . So I think we can close this issue assuming that the problems are down to the above mentioned Eclipse bug. It can’t be totally ruled out there are other causes of this error still, but for now it seems we have no evidence of other problems.

If someone still runs into this after upgrading to an Eclipse 4.15 based build, please provide some details for us to try and reproduce and debug and we can re-open this ticket (or you can create a new one also).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class Not Found Exception when running JUnit test
Follow these steps: ... Go to Run -> Run Configurations... ... Click on the unit test's run configuration and click on the Classpath...
Read more >
Error While Running Spring Boot Tests, Springrunner.Class ...
Regression : Class not found during spring boot test #406 latest 4.5.1. version I get a class not found exception for the test...
Read more >
A quick guide to Spring Tests optimization - 10Pines | Blog
This can take too long, so we should try to reuse the Spring Boot context between test classes, to start it fewer times....
Read more >
Build with Confidence: A Guide to JUnit Tests - Toptal
We will focus on writing unit and integration testing for a web app written in Java's Spring framework. Most of the time, we...
Read more >
45. Testing - Spring
If a web environment is not available on your classpath, this mode ... @TestConfiguration indicates that classes in src/test/java should not be picked...
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