【问题标题】:J2EE Application with Netbeans and Glassfish (No [EntityType] was found)带有 Netbeans 和 Glassfish 的 J2EE 应用程序(未找到 [EntityType])
【发布时间】:2012-05-29 14:54:52
【问题描述】:

我正在使用 NetBeans IDE 7.0.1 和 Glassfish 3.0.1。

我正在使用 JPA + EJB3.0 + JSF2.0 构建一个 J2EE 应用程序,当我尝试部署我的项目时出现此错误:

Caused by: java.lang.IllegalArgumentException: No [EntityType] was found for the key class [objetmetier.Application] in the Metamodel - please verify that the [Entity] class was referenced in persistence.xml using a specific <class>objetmetier.Application</class> property or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element

对我来说,在 glassfish 服务器上部署 EJB3.0 是个问题。但我不明白,因为当我查看 glassfish 管理控制台时,它们已部署在服务器中。

【问题讨论】:

  • 你的persistence.xml是否包含特定的类或exclude-unlisted-classes属性?
  • 是的,马特。 persistence.xml 没问题,因为我尝试了升级 netbeans 的解决方案,现在它正在工作......

标签: netbeans glassfish ejb-3.0


【解决方案1】:

我, 我今年在学习期间已经解决了这个问题:你应该将你的 netbeans 更新到 7.1.0 版本。 您的 glassfish 和 Netbeans 版本不兼容。

【讨论】:

    【解决方案2】:

    实际上问题在于使用 NetBeans 7.0.1 管理 EJB 3.1。 EJB 无法在 Glassfish 服务器上正确部署。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-12
      相关资源
      最近更新 更多