我刚刚为多个数据库编写了一个测试程序。它基于 hibernate vor 关系数据库和用于 NoSQL 数据库的 hibernate-ogm。
目前我支持 mysql、postgresql 和 MongoDB。现在我想试试 cassandra 驱动程序,但我得到了错误:
'cassandra_experimental' is no valid datastore provider short name. Valid values are: MAP, INFINISPAN, EHCACHE, MONGODB, NEO4J_EMBEDDED, COUCHDB_EXPERIMENTAL
我的 Maven 项目中的依赖项列表:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-bom</artifactId>
<version>4.2.0.Final</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.jbossts</groupId>
<artifactId>jbossjta</artifactId>
<version>4.16.6.Final</version>
</dependency>
<!-- Hibernate Search -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>5.0.1.Final</version>
</dependency>
<!-- Use this for MongoDB -->
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-mongodb</artifactId>
<version>4.1.3.Final</version>
</dependency>
<!-- cassandra -->
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-cassandra</artifactId>
<version>4.2.0.Final</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.36</version>
</dependency>
<!-- postgresql -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1200-jdbc41</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
我使用休眠文档docs.jboss.org
有人已经使用过 cassandra 并且可以在这里提供一些建议吗?
我很感激任何答案:)
PS:更多信息:我在虚拟机中使用 Windows 7 客户端和 ubuntu 14.04 服务器。在我的客户端上,我使用 eclipse 开普勒来编写我的程序。
版本:当我删除 pom.xml 中的版本时,我正在询问错误消息:
mvn eclipse:eclipse
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.hibernate.ogm:hibernate-ogm-mongodb:jar is missing. @ line 49, column 15
[ERROR] 'dependencies.dependency.version' for org.hibernate.ogm:hibernate-ogm-cassandra:jar is missing. @ line 56, column 15
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.hibernate.demos:History_Log_Test:1.0-SNAPSHOT (C:\User
s\MOTZA\Documents\__BA\Bachelor-Thesis\ws\History_Log_Test\pom.xml) has 2 errors
[ERROR] 'dependencies.dependency.version' for org.hibernate.ogm:hibernate-og
m-mongodb:jar is missing. @ line 49, column 15
[ERROR] 'dependencies.dependency.version' for org.hibernate.ogm:hibernate-og
m-cassandra:jar is missing. @ line 56, column 15
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException