Skip to content
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

Fails to start boot-data-couchbase #4

Closed
jcalvopinam opened this issue Aug 14, 2018 · 3 comments
Closed

Fails to start boot-data-couchbase #4

jcalvopinam opened this issue Aug 14, 2018 · 3 comments

Comments

@jcalvopinam
Copy link

Hello, I tried to use "boot-data-couchbase" sample but it fails to start, Do you know what is happening? I'm getting the following error:

2018-08-14 11:27:08.518  WARN 15304 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start reactive web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpHandler' defined in class path resource [org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration$AnnotationConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.http.server.reactive.HttpHandler]: Factory method 'httpHandler' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webHandler' defined in class path resource [org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration$EnableWebFluxConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'routerFunctionMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration$EnableWebFluxConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.web.reactive.function.server.support.RouterFunctionMapping$SortedRouterFunctionsContainer': Unsatisfied dependency expressed through method 'setRouterFunctions' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routes' defined in com.example.demo.DemoApplication: Unsatisfied dependency expressed through method 'routes' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'postHandler' defined in file [/home/juan/IntelliJ/spring-reactive-sample-master/boot-data-couchbase/target/classes/com/example/demo/PostHandler.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.demo.PostRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2018-08-14 11:27:08.523  INFO 15304 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-08-14 11:27:08.603 ERROR 15304 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in com.example.demo.PostHandler required a bean of type 'com.example.demo.PostRepository' that could not be found.


Action:

Consider defining a bean of type 'com.example.demo.PostRepository' in your configuration.


Process finished with exit code 1

@hantsy
Copy link
Owner

hantsy commented Aug 17, 2018

@juanca87 Make sure there is a Couchbase is running before you start the application. Simply, run the docker-compose.yml to start a couchbase if you are familiar with Docker.

@hantsy
Copy link
Owner

hantsy commented Aug 23, 2018

No more feedback got from the reporter, close it now.

@hantsy hantsy closed this as completed Aug 23, 2018
@jcalvopinam
Copy link
Author

jcalvopinam commented Aug 24, 2018

@hantsy Sorry for late reply, the problem was the couchbase version, I use the latest (5.5.x), I read that it is necessary to add some additional properties to work properly, I added the spring.couchbase.bucket.name and spring.couchbase.bucket.password and it works!. It would be a bit clearer if you add a README file with the versions that you used, anyway this example was useful!
Thanks!

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