Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\stsworkspace\loving-message-services\user-location-rest\bin\com\changhongit\locations\config\CassandraConfig.class]; nested exception is java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.cassandra.repository.config.EnableCassandraRepositories.repositoryBaseClass() at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:248) at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:140) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:265) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:229) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:196) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:165) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) at org.springframework.boot.SpringApplication.run(SpringApplication.java:957) at org.springframework.boot.SpringApplication.run(SpringApplication.java:946) at com.changhongit.locations.Application.main(Application.java:28) Caused by: java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.cassandra.repository.config.EnableCassandraRepositories.repositoryBaseClass() at java.lang.reflect.Method.getDefaultValue(Unknown Source) at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.registerDefaultValues(RecursiveAnnotationAttributesVisitor.java:69) at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.doVisitEnd(RecursiveAnnotationAttributesVisitor.java:57) at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(AnnotationAttributesReadingVisitor.java:67) at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(RecursiveAnnotationAttributesVisitor.java:48) at org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:1802) at org.springframework.asm.ClassReader.accept(ClassReader.java:642) at org.springframework.asm.ClassReader.accept(ClassReader.java:508) at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:64) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:98) at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:279) ... 18 more
i hava a exception on spring data cassandra 1.4.5.RELEASE
189 views Asked by ligq At
1
Request you to please be more elaborative while you put up the questions.
Seeing at the error log, it looks as if issue is because of CassandraConfig class which you are using.
Either the CassandraConfig has errors and hence your SpringBootServletInitiliazer is unable to initialize the context.
Or, CassandraConfig.java class is out of path and isn't accessible in the main application.
Add some more code excerpts for better clarity and resolution.