错误:无法找到或加载主类org.hibernate.dialect.DB2390Dialect

时间:2017-07-07 12:27:46

标签: java hibernate

当我运行程序时,我收到此错误:

  

错误:无法找到或加载主类   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>

1 个答案:

答案 0 :(得分:0)

在配置中,您需要提及DB2390,如下所示  property name =“hibernate.dialect”value =“org.hibernate.dialect.DB2390Dialect”

如果你使用oracle,它会有所不同  property name =“hibernate.dialect”value =“org.hibernate.dialect.Oracle10gDialect”&gt;