log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.MySQlDialect
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:81)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at ch3.hibernate.Test.main(Test.java:12)这是什么问题啊 
我只是写了一个简单的测试类都出这么多错误?

解决方案 »

  1.   

    方言类没有被找到,看看你Hibernate配置信息
      

  2.   

    方言类没有被找到,看看你Hibernate配置信息
      

  3.   

    楼主的原因处于HIBERNATE的配置文件中.........应该是在HIBERNATE读配置文件的时候,里面某个元素的属性配置不正确..........请楼主仔细检查........
      

  4.   

    org.hibernate.dialect.MySQlDialect类名写错了。org.hibernate.dialect.MySQLDialect
    L大写,你小写了。
      

  5.   

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE   hibernate-configuration   PUBLIC   
      "-//Hibernate/Hibernate   Configuration   DTD   3.0//EN"   
      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">   <hibernate-configuration>
    <session-factory> <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="connection.url">jdbc:mysql://localhost:3306/myproject</property>
    <property name="connection.username">root</property>
    <property name="connection.password">admin</property>
    <property name="connection.pool_size">1</property>
    <property name="dialect">org.hibernate.diaLect.MySQlDialect</property>
    <property name="current_session_context_class">thread</property>
    <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
    <property name="show_sql">true</property>
    <property name="hbm2ddl.auto">create</property>
    <property name="ch3/hibernate/User.hbm.xml"></property></session-factory>
    </hibernate-configuration>
    这是我的配置文件
      

  6.   

    常出的问题就几个jar有没有 
      

  7.   

    jar包我都有啊
    全部放进去了
      

  8.   

    #hibernate.dialect org.hibernate.dialect.MySQLDialect
    #hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
    #hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
    #hibernate.connection.driver_class com.mysql.jdbc.Driver
    #hibernate.connection.url jdbc:mysql:///test
    #hibernate.connection.username gavin
    #hibernate.connection.password