简体   繁体   English

Kundera(JPA)-在类路径中找不到任何META-INF / persistence.xml文件

[英]Kundera (JPA) - Could not find any META-INF/persistence.xml file in the classpath

I am trying to play around with Kundera 2.5.1 on JBoss EAP 6.1 (essentially the same as JBoss AS 7.1). 我正在尝试在JBoss EAP 6.1上使用Kundera 2.5.1(基本上与JBoss AS 7.1相同)。 However, when I deploy my application, I see the following Exception: 但是,当我部署应用程序时,会看到以下异常:

[0m[31m12:44:24,119 ERROR org.jboss.msc.service.fail MSC000001: Failed to start service jboss.persistenceunit."KunderaTests-ear.ear/KunderaTests-ejb.jar#KunderaTests": org.jboss.msc.service.StartException in service jboss.persistenceunit."KunderaTests-ear.ear/KunderaTests-ejb.jar#KunderaTests": com.impetus.kundera.loader.PersistenceLoaderException: com.impetus.kundera.utils.InvalidConfigurationException: Could not find any META-INF/persistence.xml file in the classpath
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
Caused by: com.impetus.kundera.loader.PersistenceLoaderException: com.impetus.kundera.utils.InvalidConfigurationException: Could not find any META-INF/persistence.xml file in the classpath
at com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:103)
at com.impetus.kundera.configure.Configurator.configure(Configurator.java:65)
at com.impetus.kundera.KunderaPersistence.initializeKundera(KunderaPersistence.java:104)
at com.impetus.kundera.KunderaPersistence.createEntityManagerFactory(KunderaPersistence.java:77)
at com.impetus.kundera.KunderaPersistence.createContainerEntityManagerFactory(KunderaPersistence.java:65)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
... 4 more
Caused by: com.impetus.kundera.utils.InvalidConfigurationException: Could not find any META-INF/persistence.xml file in the classpath
at com.impetus.kundera.configure.PersistenceUnitConfiguration.findPersistenceMetadatas(PersistenceUnitConfiguration.java:131)
at com.impetus.kundera.configure.PersistenceUnitConfiguration.configure(PersistenceUnitConfiguration.java:86)
... 11 more

The Kundera JARs (core & cassandra) are deployed within my EAR. Kundera JAR(核心和cassandra)已部署在我的EAR中。 There is a Web application project, and a separate EJB project that houses the entities. 有一个Web应用程序项目,还有一个容纳实体的单独的EJB项目。 The persistence.xml file is in the EJB project under the src/META-INF path, but I still get this exception. persistence.xml文件在EJB项目的src / META-INF路径下,但是我仍然遇到此异常。 I do not have any problems with other JPA providers, such as Hibernate. 我与Hibernate等其他JPA提供程序没有任何问题。

My persistence.xml file looks like this: 我的persistence.xml文件如下所示:

<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="KunderaTests">
        <provider>com.impetus.kundera.KunderaPersistence</provider>
        <properties>
            <property name="kundera.nodes" value="localhost" />
            <property name="kundera.port" value="9160" />
            <property name="kundera.keyspace" value="dev" />
            <property name="kundera.dialect" value="cassandra" />
            <property name="kundera.client.lookup.class"
                value="com.impetus.client.cassandra.pelops.PelopsClientFactory" />
        </properties>
    </persistence-unit>
</persistence>

Am I missing something? 我想念什么吗? Does my configuration look okay? 我的配置看起来还好吗? Or, is this an issue with deploying Kundera on JBoss EAP 6.1? 或者,这是在JBoss EAP 6.1上部署Kundera的问题吗?

Have a look at https://groups.google.com/forum/#!topic/kundera-discuss/x0AqH_Te6eQ . 看看https://groups.google.com/forum/#!topic/kundera-discuss/x0AqH_Te6eQ

See if it helps. 看看是否有帮助。

-Vivek -维维克

通过升级到最新的中继解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在类路径中找不到任何 META-INF/persistence.xml 文件 - Could not find any META-INF/persistence.xml file in the classpath 在类路径中找不到任何META-INF / persistence.xml文件 - Could not find any META-INF/persistence.xml file in the classpath Maven / Eclipse:在类路径中找不到任何META-INF / persistence.xml文件 - Maven/Eclipse: Could not find any META-INF/persistence.xml file in the classpath 在类路径中找不到任何 META-INF/persistence.xml 文件 Java - 动态 Web 项目 - Could not find any META-INF/persistence.xml file in the classpath Java - Dynamic Web Project Eclipse - 在类路径中找不到任何 META-INF/persistence.xml 文件 - Eclipse - Could not find any META-INF/persistence.xml file in the classpath 在类路径(wildfly,maven)中找不到任何META-INF / persistence.xml文件 - Could not find any META-INF/persistence.xml file in the classpath (wildfly, maven) 带有TopLink的JPA:在类路径中未找到META-INF / persistence.xml - JPA with TopLink: No META-INF/persistence.xml was found in classpath 在类路径中找不到META-INF / persistence.xml - No META-INF/persistence.xml was found in classpath 使用JPA + Google App Engine:在CLASSPATH中找不到META-INF / persistence.xml文件 - Using JPA+Google App Engine: No META-INF/persistence.xml files were found in the CLASSPATH 找到另一个META-INF / persistence.xml - find another META-INF/persistence.xml
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM