gpt4 book ai didi

ubuntu - cassandra 错误键空间不存在

转载 作者:行者123 更新时间:2023-12-02 18:23:38 24 4
gpt4 key购买 nike

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JournalActions': Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace 'audit' does not exist
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
at com.paypal.pps.activity.init.RaptorApplication.main(RaptorApplication.java:23)
Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace 'audit' does not exist
但是当我手动登录 cqlsh 时,我可以选择表格。

cqlsh:journal> use audit;

cqlsh:audit> select * from event_log;

event_id | event_type



我正在使用在 docker 上运行的 Cassandra 3.9

最佳答案

您已经缩小了问题的范围(在 cqlsh 中查询正在运行),
所以问题出在驾驶员方面。

请确保以下

1) 使用的驱动程序(datastax.cassandra - cassandra-driver-core - 版本 3.0.0-alpha5)与 Cassandra DB 版本兼容

2) 如果您的项目中有任何 spring-data-cassandra 库引用,请删除

请参阅这些帖子以获取更多信息

https://docs.datastax.com/en/developer/driver-matrix/doc/javaDrivers.html#java-drivers

com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table schema_keyspaces

关于ubuntu - cassandra 错误键空间不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41194429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com