首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >hibernate-ogm - 'cassandra_experimental‘不是有效的数据存储提供者短名称。

hibernate-ogm - 'cassandra_experimental‘不是有效的数据存储提供者短名称。
EN

Stack Overflow用户
提问于 2015-07-15 12:30:42
回答 2查看 223关注 0票数 0

我刚刚为多个数据库编写了一个测试程序。它基于hibernate vor关系数据库和NoSQL数据库hibernate-ogm .

目前,我支持mysql、postgresql和MongoDB。现在我想试试卡桑德拉的驱动程序,但我发现了一个错误:

'cassandra_experimental' is no valid datastore provider short name. Valid values are: MAP, INFINISPAN, EHCACHE, MONGODB, NEO4J_EMBEDDED, COUCHDB_EXPERIMENTAL

maven项目中的依赖项列表:

代码语言:javascript
复制
<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>

我使用hibernate文档docs.jboss.org

有人已经用过卡桑德拉了,可以在这里给你一些建议吗?

谢谢你的回答:)

PS:更多信息:我在虚拟机中使用windows 7客户端和ubuntu14.04服务器。在我的客户端,我用eclipse开普勒编写我的程序。

版本:当我删除pom.xml中的版本时,我想知道错误消息:

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-07-17 09:54:17

您能否删除hibernate-ogm-mongodb和hibernate-ogm-cassandra依赖项的版本,您将从BOM中获得它们:

代码语言:javascript
复制
<dependency>
    <groupId>org.hibernate.ogm</groupId>
    <artifactId>hibernate-ogm-mongodb</artifactId>
</dependency>

<dependency>
    <groupId>org.hibernate.ogm</groupId>
    <artifactId>hibernate-ogm-cassandra</artifactId>
</dependency>

您为hibernate-ogm-mongodb指定了4.1.3,这可能是hibernate-ogm-core的旧版本。如果它仍然不能工作,那么您的环境需要更多的细节:这是Java还是在JJ服务器(如WildFly )上?

票数 0
EN

Stack Overflow用户

发布于 2015-07-16 09:22:13

我怀疑你没有使用最新的Hibernate OGM版本。

卡桑德拉实验支持可以从4.2版本开始。

这是数据存储提供程序名称已更改为CASSANDRA_EXPERIMENTAL:6fd5777的提交

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31430454

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档