-
Notifications
You must be signed in to change notification settings - Fork 131
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
Can't run the project #1
Comments
Copy and paste one of the stack traces so I can see the exact error messages. Thanks |
Thank you for responding. Here is the full stack traces 017-06-07 19:15:28,807 INFO [org.springframework.test.context.support.DefaultTestContextBootstrapper] - <Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]> |
Zafara George is tha u? |
I have this error completing carefully step by step the tutorial through pluralsight. java.lang.NoClassDefFoundError: org/springframework/data/repository/PagingAndSortingRepository I think sth is wrong with versions.... I didn't change anything. I walk step by step through the tuto.. |
and when i solved the above now i have org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.guitar.db.LocationPersistenceTests': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.guitar.db.repository.LocationJpaRepository com.guitar.db.LocationPersistenceTests.locationJpaRepository; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.guitar.db.repository.LocationJpaRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} |
It appears to be some kind of classpath issue because of the No Class Def Found issue. I've removed my maven repo, cloned and updated and was able to run the tests. Right click on the project in STS and select Maven -> Update Project from the menu. This should refresh and pull down all of the project dependencies. You can check the "Problems" tab in STS and see if there are any errors. You can also try running the maven commands from the command line at the root of the project. You can try "mvn package" and see if it pulls down all of your dependencies and compiles everything successfully. |
I did maven update and then mvn package, but nothing fixed.
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.IllegalStateException: Failed to determine Hibernate PersistenceProvider |
So let's back up for a second here. What are you doing exactly to get this error? Can you right click on the src/test/java package and run the JUnit tests without any errors? |
Exactly the problem is when I try to run tests under src/test/java I get this error. So that's mean I'm not able to run tests as Junit test |
Hi,
I cloned the repository and tried to run the tests but nothing has worked.
The text was updated successfully, but these errors were encountered: