首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >昆德拉:持久性配置cassandra+eclipse+kundera中的错误

昆德拉:持久性配置cassandra+eclipse+kundera中的错误
EN

Stack Overflow用户
提问于 2015-10-17 05:17:37
回答 1查看 226关注 0票数 2

我对我的cassandra+kundera+eclipse项目的持久性有一个问题。报告的错误如下:

Log4j:没有为记录器(com.impetus.kundera.KunderaPersistence)找到任何附加程序。log4j :警告请正确初始化log4j系统。Log4j:警告参见http://logging.apache.org/log4j/1.2/faq.html#noconfig以获得更多信息。线程"main“com.impetus.kundera.loader.PersistenceLoaderException: com.impetus.kundera.utils.InvalidConfigurationException:中的异常无法在com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:100) at com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:100) at com.impetus.kundera.configure.Configurator.configure(Configurator.java:65) at com.impetus.kundera.KunderaPersistence.initializeKundera(KunderaPersistence.java:109) at com.impetus.kundera.KunderaPersistence.createEntityManagerFactory的类路径中找到任何META/sistence.xml文件。( javax.persistence.Persistence.createEntityManagerFactory(Unknown Source) at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source) at controlador.Conetor.main(Conetor.java:17)引起的: com.impetus.kundera.utils.InvalidConfigurationException:在com.impetus.kundera.configure.PersistenceUnitConfiguration.findPersistenceMetadatas(PersistenceUnitConfiguration.java:132) at com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:83) .6的类路径中找不到任何META/sistence.xml文件。

持久化的来源是:

代码语言:javascript
复制
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    version="2.0">
    <persistence-unit name="cassandra_pu">
        <provider>com.impetus.kundera.KunderaPersistence</provider>     
        <properties>            
            <property name="kundera.nodes" value="localhost"/>
            <property name="kundera.port" value="9160"/>
            <property name="kundera.keyspace" value="KunderaExamples"/>
            <property name="kundera.dialect" value="cassandra"/>
            <property name="kundera.client.lookup.class"
                value="com.impetus.client.cassandra.thrift.ThriftClientFactory" />

        </properties>       
    </persistence-unit>
</persistence>

POM XML与DE JAR KUNDERA

EN

回答 1

Stack Overflow用户

发布于 2016-11-15 02:14:40

请把你的persistence.xml放在下面的路径上。它应该解决这个错误。src/main/resources/META-INF/persistence.xml

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

https://stackoverflow.com/questions/33183039

复制
相关文章

相似问题

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