Skip to content

Repository no longer found #254

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

Closed
johanfrick-mobenga opened this issue Jan 22, 2014 · 5 comments
Closed

Repository no longer found #254

johanfrick-mobenga opened this issue Jan 22, 2014 · 5 comments

Comments

@johanfrick-mobenga
Copy link

Just tried upgrading from 0.5.0.M7 to 1.0.0.RC1
When running spring-boot:run I get this:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.mycompany.service.data.repository.EventRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(mappedName=, shareable=true, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}

I tried adding:
@EntityScan(basePackages = "com.mycompany.service")
to my SpringApplication config class, but that didn't help.

Any pointers?

@dsyer
Copy link
Member

dsyer commented Jan 22, 2014

We changed the default algorithm for @Repository detection. If your @Repositories are in a different paqckage than your @EnableAutoConfiguration then you will need to add your own @EnableJpaRepositories (or similar ofr different data stores).

@EntityScan is for @Entity detection. You might need that as well if the entities are in a different package than the @EnableAutoConfiguration.

@dsyer dsyer closed this as completed Jan 22, 2014
@johanfrick-mobenga
Copy link
Author

If I add @EnableJpaRepositories I get:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined

@dsyer
Copy link
Member

dsyer commented Jan 22, 2014

Duplicate of gh-256

@dsyer dsyer closed this as completed Jan 22, 2014
@johanfrick-mobenga
Copy link
Author

But you never answered my question in any of the two issues you just closed?

@dsyer
Copy link
Member

dsyer commented Jan 22, 2014

Sorry. The other one is still open, isn't it? I thought you must have unintentionally opened two the same. Was there a difference I missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants