Java N1ql Error while debugging code

When i debug my project i get following error,

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘usedCarController’: Unsatisfied dependency expressed through field ‘fileStorageService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘fileStorageService’: Unsatisfied dependency expressed through field ‘usedCarDao’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.boot.autoconfigure.data.couchbase.SpringBootCouchbaseDataConfiguration’: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.data.couchbase.SpringBootCouchbaseDataConfiguration$$EnhancerBySpringCGLIB$$bc0bbf1c]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘springBootCouchbaseConfigurer’ defined in class path resource [org/springframework/boot/autoconfigure/data/couchbase/CouchbaseConfigurerAdapterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.couchbase.config.CouchbaseConfigurer]: Factory method ‘springBootCouchbaseConfigurer’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘couchbaseClient’ defined in class path resource [org/springframework/boot/autoconfigure/couchbase/CouchbaseConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.couchbase.client.java.Bucket]: Factory method ‘couchbaseClient’ threw exception; nested exception is java.lang.RuntimeException: java.util.concurrent.TimeoutException

After adding following query,

@Query(“Select usedcarimages from UsedCar where #{n1ql filter} AND usedcarimages LIKE %$1% within #{n1ql bucket} ORDER BY DESC”)
List< String> findByUsedcarimages(String fileName);

Is there somthing i am missing ?

Below is my pojo class,

@Id
private String car_id;
@Field
@NotNull
private String car_name;
@Field
@NotNull
private String car_model;
@Field
@NotNull
private String car_built;
@Field
@NotNull
private String car_manufac_year;
@Field
private List < String> usedcarimages;

Not sure this has to do with the new query. If you remove that query and try few times without it, see if you still get the error.

Seems the issue is coming from a timeout when attempting to create couchbaseClient … which I’m guessing is an issue with when your bootstrap. Could be a network issue, Couchbase Server is not reachable, or maybe your application server is undersized in terms of CPU that the bootstrap times out … among other things.

What can i do ?
do i have to increase RAM?

We don’t know what the issue is.
If this is in development, please try following with the debugger and try see why it is timing out.
Are you already overriding your CouchbaseEnvironment in your config class? If so, maybe you could try increasing the connectTimeout value and see if it can bootstrap.

Ok will try to increase time out value. But before adding above query it was working fine.

If you remove that query, does it work?

No i tried to remove it but got the same error

also if you can help me with this problem that will be great

Only in the debugger? Do you have a breakpoint that is preventing the bean creation from completing? That would do it.

@nilay
Did u solve this issue? ı have the same issue and ı think its about the fetching list. how did u solve it? Also did you fetch list of field