MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » net.sf.hibernate.MappingException:   Error

net.sf.hibernate.MappingException:   Error   (2)

www.MyException.Cn  网友分享于:2013-12-12  浏览:1398次

Initial   SessionFactory   creation   failed.


hibernate.cfg.xml文件:
<?xml   version= '1.0 '   encoding= 'utf-8 '?>
<!DOCTYPE   hibernate-configuration
        PUBLIC   "-//Hibernate/Hibernate   Configuration   DTD//EN "
        "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd ">

<hibernate-configuration>

        <session-factory>

                <!--   Database   connection   settings   -->
                <property   name= "connection.driver_class "> oracle.jdbc.driver.OracleDriver </property>
                <property   name= "connection.url "> jdbc:oracle:thin:@localhost:1521:o9idb </property>
                <property   name= "connection.username "> ycx </property>
                <property   name= "connection.password "> ycx </property>

                <!--   JDBC   connection   pool   (use   the   built-in)   -->
                <property   name= "connection.pool_size "> 1 </property>
                <property   name= "c3p0.max_size "> 5 </property>
                <property   name= "c3p0.timeout "> 600 </property>

                <!--   SQL   dialect   -->
                <property   name= "dialect "> net.sf.hibernate.dialect.Oracle9Dialect </property>

                <!--   Use   EHCache   but   not   the   query   cache.   -->
                <property   name= "cache.provider_class "> net.sf.ehcache.hibernate.Provider </property>
                <property   name= "cache.use_query_cache "> false </property>
                <property   name= "cache.use_minimal_puts "> false </property>

                <!--   Print   SQL   to   stdout.
                <property   name= "show_sql "> true </property> -->

                <!--   Create   the   tables
                <property   name= "hibernate.hbm2ddl.auto "> update </property> -->


                <mapping   resource= "ems_sh/hibernate/mapping_files/User.hbm.xml "/>

        </session-factory>

</hibernate-configuration>


User.hbm.xml文件:
<?xml   version= '1.0 '   encoding= 'utf-8 '?>

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有