Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

[Resolved] NoSuchBeanDefinitionException: No bean named 'cqlTemplate' available






Cassandra Exception

In Spring Data Cassandra integration to the project, you may have setup the cassandra context as follows,

   

   
   

The Issue

And may still noticing the following error,

 at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

Resolution

The issue here is, even though the Cassandra template is available in the context, it is not noticed while repository operations happen.

The issue can be resolved by setting the template to the repository.

cassandra-template-ref="cassandraTemplate" />

References

1. https://docs.spring.io/spring-data/cassandra/docs/1.0.1.RELEASE/reference/html/cassandra.core.html
2. https://jira.spring.io/browse/DATACASS-228




This post first appeared on Devdummy, please read the originial post: here

Share the post

[Resolved] NoSuchBeanDefinitionException: No bean named 'cqlTemplate' available

×

Subscribe to Devdummy

Get updates delivered right to your inbox!

Thank you for your subscription

×