【问题标题】:JBoss EAP 7.2 Oracle Hibernate DialectJBoss EAP 7.2 Oracle 休眠方言
【发布时间】:2021-06-07 00:45:57
【问题描述】:

我正在使用 JBoss EAP 7.2 和 Oracle 12c ojdbc7.jar 该应用程序曾经工作。但是,在重新启动 JBoss 服务器后,我现在得到了

"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"monitoring4.war#primary\"" => "org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [oorg.hibernate.dialect.Oracle12cDialect] as strategy [org.hibernate.dialect.Dialect]
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [oorg.hibernate.dialect.Oracle12cDialect]
Caused by: java.lang.ClassNotFoundException: Could not load requested class : oorg.hibernate.dialect.Oracle12cDialect"}}

我使用了一个没有休眠方言的简单persistence.xml

<persistence version="2.0">
  <persistence-unit name="primary">
  
  
     <jta-data-source>java:/blabla</jta-data-source> 

  <properties>
     <!-- Properties for Hibernate -->
    
     <property name="hibernate.show_sql" value="true" /> 
    
   
  </properties>

我已经尝试添加

<property name="hibernate.dialect" 
              value="oorg.hibernate.dialect.Oracle12cDialect"/>

不知道

{"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"monitoring4.war#primary\"" => "org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [oorg.hibernate.dialect.Oracle12cDialect] as strategy [org.hibernate.dialect.Dialect]
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [oorg.hibernate.dialect.Oracle12cDialect]
Caused by: java.lang.ClassNotFoundException: Could not load requested class : oorg.hibernate.dialect.Oracle12cDialect"}}

我应该在 EAP 7.2 中使用什么 Oracle 方言? 知道为什么应用程序没有任何更改(据我所知)就停止工作的任何想法肯定不在项目中。

谢谢,

汉斯

【问题讨论】:

    标签: oracle hibernate jboss dialect


    【解决方案1】:
    <property name="hibernate.dialect" 
                  value="org.hibernate.dialect.OracleDialect"/>
    

    解决了问题

    【讨论】:

      【解决方案2】:

      检查您的项目/JBoss 实例中的 hibernate-core 版本(取决于您的战争或 JBoss 是否提供它)。

      从 hibernate-core >= 5.0 开始支持org.hibernate.dialect.Oracle12cDialect

      【讨论】:

        猜你喜欢
        • 2020-01-03
        • 2015-10-20
        • 1970-01-01
        • 2019-04-18
        • 2014-12-09
        • 2019-05-04
        • 2020-03-29
        • 2020-04-29
        • 2011-05-21
        相关资源
        最近更新 更多