spring-data-cassandra 1.5.0.M1 BeanInstantiationException -


when running spring boot application, getting following beaninstantiationexception:

org.springframework.beans.factory.unsatisfieddependencyexception: error creating bean name 'samplecassandraapplication':      unsatisfied dependency expressed through field 'repository':     error creating bean name 'customerrepository':      cannot resolve reference bean 'cassandratemplate' while setting bean property 'cassandratemplate';      nested exception org.springframework.beans.factory.unsatisfieddependencyexception:      error creating bean name 'cassandratemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/cassandradataautoconfiguration.class]:      unsatisfied dependency expressed through method 'cassandratemplate' parameter 0: error creating bean name 'session' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/cassandradataautoconfiguration.class]:      unsatisfied dependency expressed through method 'session' parameter 0:      error creating bean name 'cassandraconverter' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/cassandradataautoconfiguration.class]:      unsatisfied dependency expressed through method 'cassandraconverter' parameter 0:      error creating bean name 'cassandramapping' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/cassandradataautoconfiguration.class]: bean instantiation via factory method failed;      nested exception org.springframework.beans.beaninstantiationexception:     failed instantiate [org.springframework.data.cassandra.mapping.cassandramappingcontext]:      factory method 'cassandramapping' threw exception;      nested exception java.lang.nosuchfielderror: instance; nested exception org.springframework.beans.factory.beancreationexception:      error creating bean name 'cassandramapping' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/cassandradataautoconfiguration.class]:      bean instantiation via factory method failed; nested exception org.springframework.beans.beaninstantiationexception:      failed instantiate [org.springframework.data.cassandra.mapping.cassandramappingcontext]:      factory method 'cassandramapping' threw exception;  

nested exception java.lang.nosuchfielderror: instance;

when went source, found this:

error

initially have forgotten add cassandraconfig class (http://docs.spring.io/spring-data/cassandra/docs/1.5.0.m1/reference/html/#cassandra-connectors.javaconfig) not part of sample provided spring-boot. works.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -