【问题标题】:Error processing persistent unit when deploying ear in weblogic using eclipselink使用eclipselink在weblogic中部署ear时处理持久单元时出错
【发布时间】:2012-08-15 05:14:36
【问题描述】:

我正在开发一个多模块 maven 项目,为了持久性,我使用 eclipselink。当我在 weblogic 中部署 ear 文件时,我总是收到此错误消息:无法加载 webapp /yyy。处理模块 /yyy 的持久单元 xxx 时出错。实例化 PersistentUnit xxx 的 Persistence Provider 类 org.apache.openjpa.persistence.PersistenceProviderImpl 时出错。 java.lang.ClassNotFoundException org.apache.openjpa.persistence.PersistenceProviderImpl。 我猜它尝试使用默认的 openjpa 提供程序,但我已将其配置为在 persistence.xml 中使用 eclipselink。有任何想法吗?

【问题讨论】:

    标签: persistence weblogic eclipselink


    【解决方案1】:

    在您的weblogic.xml 应用程序描述符中使用prefer-web-inf-classes 元素。
    根据文档,

    将此元素设置为 True 会破坏类加载器委托模型,以便 Web 应用程序中的类定义优先于更高级别的类加载器中的类定义加载。这允许 Web 应用程序使用它自己版本的第三方类,它也可能是 WebLogic Server 的一部分。

    This 是一个相关问题,它也可能对您有所帮助。

    【讨论】:

      猜你喜欢
      • 2012-03-17
      • 2014-08-02
      • 2022-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-15
      • 2013-01-20
      相关资源
      最近更新 更多