Reactive Couchbase microservice fails to start
See original GitHub issueOverview of the issue
I created a Couchbase microservice as part of the following JDL:
application {
config {
baseName gateway,
packageName com.okta.developer.gateway,
applicationType gateway,
authenticationType oauth2,
databaseType neo4j,
devDatabaseType neo4j,
prodDatabaseType neo4j,
enableHibernateCache false,
reactive true,
searchEngine elasticsearch,
serviceDiscoveryType eureka,
testFrameworks [protractor]
}
entities Blog, Post, Tag, Product
}
application {
config {
baseName blog,
packageName com.okta.developer.blog,
applicationType microservice,
authenticationType oauth2,
databaseType couchbase,
devDatabaseType couchbase,
prodDatabaseType couchbase,
enableHibernateCache false,
reactive true,
searchEngine elasticsearch,
serverPort 8081,
serviceDiscoveryType eureka
}
entities Blog, Post, Tag
}
application {
config {
baseName store,
packageName com.okta.developer.store,
applicationType microservice,
authenticationType oauth2,
databaseType mongodb,
devDatabaseType mongodb,
prodDatabaseType mongodb,
enableHibernateCache false,
reactive true
searchEngine elasticsearch,
serverPort 8082,
serviceDiscoveryType eureka
}
entities Product
}
entity Blog {
name String required minlength(3),
handle String required minlength(2)
}
entity Post {
title String required,
content TextBlob required,
date Instant required
}
entity Tag {
name String required minlength(2)
}
entity Product {
title String required,
price BigDecimal required min(0),
image ImageBlob
}
relationship ManyToOne {
Blog{user(login)} to User,
Post{blog(name)} to Blog
}
relationship ManyToMany {
Post{tag(name)} to Tag{post}
}
paginate Post, Tag with infinite-scroll
paginate Product with pagination
microservice Product with store
microservice Blog, Post, Tag with blog
When I try to run the blog
microservice, it fails:
2020-04-21 10:31:47.247 WARN 36895 --- [ restartedMain] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'blogResource' defined in file [/Users/mraible/reactive/blog/target/classes/com/okta/developer/blog/web/rest/BlogResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.okta.developer.blog.repository.BlogRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2020-04-21 10:31:47.499 ERROR 36895 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.okta.developer.blog.web.rest.BlogResource required a bean of type 'com.okta.developer.blog.repository.BlogRepository' that could not be found.
Action:
Consider defining a bean of type 'com.okta.developer.blog.repository.BlogRepository' in your configuration.
Motivation for or Use Case
You should be able to use Couchbase in a reactive microservice.
Reproduce the error
See JDL above.
Related issues
Suggest a Fix
JHipster Version(s)
master branch as of 10:33AM MDT on Tue, 21 April, 2020
Browsers and Operating System
- Checking this box is mandatory (this is just to show you read everything)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Condemn Microservices Architecture to Fail Before Even Start
The blog focus on concepts that we historically take for granted and which might lead to poor architecture when applied to microservices.
Read more >Full Stack Reactive NoSQL: Spring Data and Couchbase
Currently Spring Data Couchbase builds on its reactive ... build Spring Framework apps and microservices with Spring Data Couchbase since ...
Read more >Creating a reactive microservices architecture fails with main ...
Overview of the issue During my Twitch stream yesterday, I tried to generate a reactive microservices architecture using the following JDL.
Read more >couchbase/discuss - Gitter
This error occurs periodically upon different admin api calls (PUT /_user, ... We are seeing when we run the couchbase reactive application (v...
Read more >com.couchbase.client.java.error.ViewDoesNotExistException
I suppose you are using reactive Spring Data, and potentially using some method like removeAll/listAll. Before SDK 3 those methods still use ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess it might be the same problem with neo4j and elasticsearch. Can you try without elastic? Gerrit checked and all repository beans are tried to be created with the elastic repository bean. Will keep you updated if I have some news.
@SudharakaP Yes, I’m using
mraible:reactive-neo4j
from https://github.com/jhipster/generator-jhipster/pull/11612.