2017-07-07 139 views
0

當我運行我的程序我得到這個錯誤:錯誤:無法找到或加載主類org.hibernate.dialect.DB2390Dialect

Error: Could not find or load main class org.hibernate.dialect.DB2390Dialect

我已經檢查了所有必需的jar文件已經到位。請幫忙。我想這是hibernate配置文件的問題。請看下面的配置文件:

<?xml version="1.0" encoding="UTF-8"?> 

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" 
             "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> 
<hibernate-configuration> 
    <session-factory> 
     <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> 
     <property name="hibernate.connection.password">batch</property> 
     <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property> 
     <property name="hibernate.connection.username">batch</property> 
     <property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property> 
     <property name="hibernate.show_sql">true</property> 
     <property name="hibernate.hbm2ddl.auto">none</property> 
     <mapping resource="galaxe.model.Network" /> 
    </session-factory> 
</hibernate-configuration> 

回答

0

在配置你需要DB2390提如下 屬性名=「hibernate.dialect」值=「org.hibernate.dialect.DB2390Dialect」

如果使用甲骨文,這將是不同的 屬性名= 「hibernate.dialect」 值= 「org.hibernate.dialect.Oracle10gDialect」>

+0

我使用Oracle 11g –

+0

,那麼請嘗試 值=「org.hibernate.dialect。 Oracle10gDialect」 – Suraj

相關問題