Gwt EclipseLink找不到我的实体“IllegalArgumentException”

Gwt EclipseLink找不到我的实体“IllegalArgumentException”,gwt,maven,intellij-idea,eclipselink,guice,Gwt,Maven,Intellij Idea,Eclipselink,Guice,我正在尝试使用以下方法进行一个简单的持久性测试: IntelliJ理念, 专家 谷歌Guice, GWT, EclipseLink和JPA2.0 My persistence.xml: org.eclipse.persistence.jpa.PersistenceProvider utfpr.edu.br.server.model.Contato 例外情况: [EL Warning]: 2012-06-21 10:18:32.846--The collection of metamodel ty

我正在尝试使用以下方法进行一个简单的持久性测试: IntelliJ理念, 专家 谷歌Guice, GWT, EclipseLink和JPA2.0

My persistence.xml:

org.eclipse.persistence.jpa.PersistenceProvider utfpr.edu.br.server.model.Contato 例外情况:

[EL Warning]: 2012-06-21 10:18:32.846--The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units.  Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element

java.lang.IllegalArgumentException: Object: Contato{dataNascimento=Thu Jun 21 10:18:31 BRT 2012, id=null, nome='abcd', sobrenome='adsada', numero='12313123', email='lololol@gmail.com'} is not a known entity type.
我的persistence.xml已更正,并放在参考资料/META-INF中

我在这里读到一个日食虫:

他们说,

解决方案: 解决这个问题有两种方法

1我们完全没有指定实体,也没有指定 错误的 -结果是一个完全空的元模型

2我们仅通过属性指定部分实体 -其结果是在以下情况下引发选择性IllegalArgumentException错误: 我们试图使用缺少的EntityType类——很可能是在CriteriaAPI中 询问

我已经尝试了这两种解决方案,但仍然出现了这个错误


请有人帮帮我

第一条消息是一条可能不相关的警告。但是,您可以将完整的堆栈跟踪发布到错误吗?如果用于创建EntityManagerFactory的类加载器与用于在测试类中创建Contato实体的类加载器不同,则可能发生错误。