- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试在 Cassandra 2.1.12(作为 DSE 4.8.4 的一部分)上使用 Spring-data-cassandra 1.3.4 以及最新的 cassandra-driver-core 3.0.0,一切正常。因为相同的 spring 批处理不适用于普通的 Cassandra 3.x 版本。我在 Cassandra 3.2、3.3 和 3.4 上尝试过。
我收到以下堆栈跟踪中提到的ClassNotFound Exception
。
现在我完全明白这是由于“com.datastax.driver.core.DataType.java”中不存在特定方法(asJavaClass)造成的。
我的问题是有没有其他方法可以解决这个问题?
我正在使用 Spring Batch 进行一次性数据加载,这是巨大的。而且我不能使用低于 Cassandra 3.3 的任何东西。
2016-04-11 13:38:32.684 WARN 3166 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mappingContext' defined in class path resource [com/walgreens/batch/config/CassandraConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.mapping.CassandraMappingContext]: Factory method 'mappingContext' threw exception; nested exception is java.lang.NoSuchMethodError: com.datastax.driver.core.DataType.asJavaClass()Ljava/lang/Class;
2016-04-11 13:38:32.808 ERROR 3166 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mappingContext' defined in class path resource [com/walgreens/batch/config/CassandraConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.mapping.CassandraMappingContext]: Factory method 'mappingContext' threw exception; nested exception is java.lang.NoSuchMethodError: com.datastax.driver.core.DataType.asJavaClass()Ljava/lang/Class;
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
at com.walgreens.batch.WagStoreInventoryBatchJobApplication.main(WagStoreInventoryBatchJobApplication.java:43) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.mapping.CassandraMappingContext]: Factory method 'mappingContext' threw exception; nested exception is java.lang.NoSuchMethodError: com.datastax.driver.core.DataType.asJavaClass()Ljava/lang/Class;
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
... 17 common frames omitted
Caused by: java.lang.NoSuchMethodError: com.datastax.driver.core.DataType.asJavaClass()Ljava/lang/Class;
at org.springframework.data.cassandra.mapping.CassandraSimpleTypeHolder.<clinit>(CassandraSimpleTypeHolder.java:62) ~[spring-data-cassandra-1.3.4.RELEASE.jar:na]
at org.springframework.data.cassandra.mapping.BasicCassandraMappingContext.<init>(BasicCassandraMappingContext.java:73) ~[spring-data-cassandra-1.3.4.RELEASE.jar:na]
at com.walgreens.batch.config.CassandraConfiguration.mappingContext(CassandraConfiguration.java:47) ~[classes/:na]
at com.walgreens.batch.config.CassandraConfiguration$$EnhancerBySpringCGLIB$$78a36265.CGLIB$mappingContext$4(<generated>) ~[classes/:na]
at com.walgreens.batch.config.CassandraConfiguration$$EnhancerBySpringCGLIB$$78a36265$$FastClassBySpringCGLIB$$c7f2ad2a.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
at com.walgreens.batch.config.CassandraConfiguration$$EnhancerBySpringCGLIB$$78a36265.mappingContext(<generated>) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
... 18 common frames omitted
2016-04-11 13:38:32.811 INFO 3166 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/Users/Siraj/Documents/workspace/Ask2/WagStoreInventoryBatchJob/target/classes/, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-starter-batch/1.3.3.RELEASE/spring-boot-starter-batch-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-starter/1.3.3.RELEASE/spring-boot-starter-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot/1.3.3.RELEASE/spring-boot-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.3.3.RELEASE/spring-boot-autoconfigure-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.3.3.RELEASE/spring-boot-starter-logging-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/ch/qos/logback/logback-classic/1.1.5/logback-classic-1.1.5.jar, file:/Users/Siraj/.m2/repository/ch/qos/logback/logback-core/1.1.5/logback-core-1.1.5.jar, file:/Users/Siraj/.m2/repository/org/slf4j/jul-to-slf4j/1.7.16/jul-to-slf4j-1.7.16.jar, file:/Users/Siraj/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.16/log4j-over-slf4j-1.7.16.jar, file:/Users/Siraj/.m2/repository/org/yaml/snakeyaml/1.16/snakeyaml-1.16.jar, file:/Users/Siraj/.m2/repository/org/hsqldb/hsqldb/2.3.3/hsqldb-2.3.3.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-jdbc/4.2.5.RELEASE/spring-jdbc-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-beans/4.2.5.RELEASE/spring-beans-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/batch/spring-batch-core/3.0.6.RELEASE/spring-batch-core-3.0.6.RELEASE.jar, file:/Users/Siraj/.m2/repository/com/ibm/jbatch/com.ibm.jbatch-tck-spi/1.0/com.ibm.jbatch-tck-spi-1.0.jar, file:/Users/Siraj/.m2/repository/javax/batch/javax.batch-api/1.0/javax.batch-api-1.0.jar, file:/Users/Siraj/.m2/repository/com/thoughtworks/xstream/xstream/1.4.7/xstream-1.4.7.jar, file:/Users/Siraj/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar, file:/Users/Siraj/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar, file:/Users/Siraj/.m2/repository/org/codehaus/jettison/jettison/1.2/jettison-1.2.jar, file:/Users/Siraj/.m2/repository/org/springframework/batch/spring-batch-infrastructure/3.0.6.RELEASE/spring-batch-infrastructure-3.0.6.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/retry/spring-retry/1.1.2.RELEASE/spring-retry-1.1.2.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-context/4.2.5.RELEASE/spring-context-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-starter-data-cassandra/1.3.3.RELEASE/spring-boot-starter-data-cassandra-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-tx/4.2.5.RELEASE/spring-tx-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/data/spring-data-cassandra/1.3.4.RELEASE/spring-data-cassandra-1.3.4.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/data/spring-cql/1.3.4.RELEASE/spring-cql-1.3.4.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-expression/4.2.5.RELEASE/spring-expression-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/data/spring-data-commons/1.11.4.RELEASE/spring-data-commons-1.11.4.RELEASE.jar, file:/Users/Siraj/.m2/repository/com/datastax/cassandra/cassandra-driver-dse/2.1.9/cassandra-driver-dse-2.1.9.jar, file:/Users/Siraj/.m2/repository/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar, file:/Users/Siraj/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/1.3.3.RELEASE/spring-boot-starter-jdbc-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/apache/tomcat/tomcat-jdbc/8.0.32/tomcat-jdbc-8.0.32.jar, file:/Users/Siraj/.m2/repository/org/apache/tomcat/tomcat-juli/8.0.32/tomcat-juli-8.0.32.jar, file:/Users/Siraj/.m2/repository/com/datastax/cassandra/cassandra-driver-core/3.0.0/cassandra-driver-core-3.0.0.jar, file:/Users/Siraj/.m2/repository/io/netty/netty-handler/4.0.33.Final/netty-handler-4.0.33.Final.jar, file:/Users/Siraj/.m2/repository/io/netty/netty-buffer/4.0.33.Final/netty-buffer-4.0.33.Final.jar, file:/Users/Siraj/.m2/repository/io/netty/netty-common/4.0.33.Final/netty-common-4.0.33.Final.jar, file:/Users/Siraj/.m2/repository/io/netty/netty-transport/4.0.33.Final/netty-transport-4.0.33.Final.jar, file:/Users/Siraj/.m2/repository/io/netty/netty-codec/4.0.33.Final/netty-codec-4.0.33.Final.jar, file:/Users/Siraj/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar, file:/Users/Siraj/.m2/repository/io/dropwizard/metrics/metrics-core/3.1.2/metrics-core-3.1.2.jar, file:/Users/Siraj/.m2/repository/joda-time/joda-time/2.8.2/joda-time-2.8.2.jar, file:/Users/Siraj/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-configuration-processor/1.3.3.RELEASE/spring-boot-configuration-processor-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/json/json/20140107/json-20140107.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-core/4.2.5.RELEASE/spring-core-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/boot/spring-boot-starter-aop/1.3.3.RELEASE/spring-boot-starter-aop-1.3.3.RELEASE.jar, file:/Users/Siraj/.m2/repository/org/springframework/spring-aop/4.2.5.RELEASE/spring-aop-4.2.5.RELEASE.jar, file:/Users/Siraj/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/Users/Siraj/.m2/repository/org/aspectj/aspectjweaver/1.8.8/aspectjweaver-1.8.8.jar, file:/Users/Siraj/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar]
最佳答案
Spring-Data-Cassandra 1.3.4(甚至最新的开发版本)使用客户端驱动程序 Cassandra 2.1.x请参阅 Datastax 驱动程序 compatibility chart您会发现需要 3.x 客户端驱动程序才能使用 Cassandra 3.x 。
正如 Aaron 所提到的,这不是 C* 的最佳 ORM 实现,因为它最初是为 RDBMS 接口(interface)设计的,因此具有与 Cassandra 等 NoSQL 数据库反模式的实现。
您提到这是大量数据的一次性数据加载,我会首先阅读有关将大量数据加载到 Cassandra from this article 的最佳方法。 (提示不要使用批处理)。我不知道有什么真正好的工具可以进行开箱即用的数据迁移(也取决于您的源系统是什么)。因此,您可能必须编写一些自定义的内容,或者进行一些调整。
关于cassandra - Spring-data-cassandra 1.3.4 与 Cassandra 3.x 不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36558099/
只是想知道这些结构之间有什么区别(text、data、rodata、bss 等)在链接描述文件中: .data : { *(.data) } .data : { *(.data*) }
Data 定义为其核心功能之一 gfoldl : gfoldl :: (Data a) => (forall d b. Data d => c (d -> b) -> d -> c b)
以下之间有什么区别:data-sly-use、data-sly-resource、data-sly-include 和 数据-sly-模板?我正在阅读 Sightly AEM 上的文档,我非常困惑。
我有一个 Spring Boot、Spring Data JPA (hibernate) Web 应用程序,并且想引入文本搜索功能。 我理解以下内容 hibernate search 或 spring
我不知道我的代码有什么问题。我读了其他有同样问题的人的一些问题,但没有找到答案。当我尝试编译时出现以下错误: ||In function 'main':| |35|error: expected ex
我不太确定为什么会收到此错误或其含义。我的数据框称为“数据”。 library(dplyr) data %>% filter(Info==1, Male==1) %>% lm(CFL_
我一直在 GitHub 等更现代的网站上看到这些属性,它们似乎总是与自定义的弹出窗口一致,如 title 属性。 Option 1 Option 2 Option 3 Option 4 我在 HTML
如何用 iCloud Core Data 替换我现有的 Core Data?这是我的持久商店协调员: lazy var persistentStoreCoordinator: NSPersistent
我一直在 GitHub 等更现代的网站上看到这些属性,它们似乎总是与自定义的弹出窗口一致,如 title 属性。 Option 1 Option 2 Option 3 Option 4 我在 HTML
我正在通过 this project 在 Android 上摆弄 node.js ,我需要一种方法将 js 文件部署到私有(private)目录(以隐藏源代码,防止用户篡改),该目录也物理存在于文件系
大家好我有点沮丧,所以我希望得到一些帮助。我的项目在 SwiftUI 中。我想使用图像选择器将图像保存到 Core Data。我实现了让 ImagePicker 工作,但我正在努力转换 Image -
我有以下数据和代码: mydf grp categ condition value 1 A X P 2 2 B X P 5
我一直在努力解决这个问题,但我根本找不到任何解决问题的方法。希望这里有人可以提供帮助。 我正在尝试为具有以下结构的某些数据创建个人选择矩阵: # A tibble: 2,152 x 32 a
我了解 Data.Map.Lazy 和 Data.Map.Strict 是不同的。但是,当您导入 Data.Map 时,您究竟导入了什么:严格的、惰性的还是两者的组合? 最佳答案 懒人。看着docs
我正在开发一个 C 程序,用于从 BerkeleyDB DBTree 数据库中提取数据值与特定模式匹配的记录。我创建数据库,打开它,将键的 DBT 和数据的另一个 DBT 清零,将 DBT 标志设置为
所以我有以下成员(member)历史表 User_ID | Start date | End Date | Type(0-7) | ---------------------------
随着最近推出的包dataframe ,我认为是时候正确地对各种数据结构进行基准测试,并突出每种数据结构的优势。我不是每个人的不同优势的专家,所以我的问题是,我们应该如何对它们进行基准测试。 我尝试过的
我有来自 API 的数据,但无法将数组中的数据设置为 vue.js 中的 this.data这是来自 API 的数据(JSON) 你能告诉我这个语法吗 {"id":1613, "name_org":"
在 Vue.js到目前为止,我已经找到了两种定义数据的方法:data: {} 和 data() { return; }. data: { defaultLayout: 'default' }
我正在研究Spring Data Rest Services,并在自定义拦截器中遇到一些问题。之前我使用spring-data-rest-webmvc 2.2.0并以以下方式添加了拦截器。 publi
我是一名优秀的程序员,十分优秀!