-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class Not Found Exception #1695
Comments
Could you share a sample project for this issue? |
@jdneo This code belongs to my company. I can implement the approximate logic and send it to you |
@jdneo Hi! I found a legitimate problem! In our project in pom.xml dependencies have a "classifier" set Which is why the test does not find classes |
I see. classifier is not well supported now. |
@jdneo Hi! I found a workaround. I think it's worth publishing this. |
Hello everyone When trying to run SpringBootTest, it crashes with an error that it cannot find the @Autowired fields, although everything works in IDEA . The project structure looks like this:
public interface TestData {
void setUser();
void setScenario();
}
@SpringBootTest(classes = {AbstractTestConfiguration.BaseConfiguration.class})
@slf4j
@embeddedkafka
public abstract class AbstractTestConfiguration implements TestData {
@BeforeAll
public static void startPostgres() {
...
}
@Autowired
protected SomeField someFIeld;
@Autowired
private SomeJpaRespository someJpaRepostitory;
@test
public void testContextStarted() {
...
}
}
public class SomeTestClass extends AbstractTestConfigiuration {
implements setters from interface
}
NoClassDefFoundError: SomeJpaRespositore
Using:
Mac OS Sonome 14.4.1
Temurin JDK 17
Red Hat Language Support v1.31.0
Test Runner For Java v0.41.1
maven 3.9.5
The text was updated successfully, but these errors were encountered: