本帖最后由 chemjay 于 2010-04-11 17:09:13 编辑

解决方案 »

  1.   

    ExceptionInInitializerError
     
    初始化错误!  你的hibernate配置文件名称对吗?
      

  2.   

    Configuration cfg = new Configuration("hibernate.cfg.xml").configure(),
    你应该让它知道去哪里读取这个配置文件
      

  3.   

    Configuration cfg = new Configuration().configure("hibernate.cfg.xml"),
    或则你的这个配置文件必须在class的根目录下,也就是默认位置。
      

  4.   

    我配置文件放在src目录下,应该可以吧。Path:/hibernate_first/src/hibernate.cfg.xml
    请问出现“ExceptionInInitializerError”这样的错误,只与配置文件有关吗?会不会还有其他的可能啊。
      

  5.   

    我也出现同样的问题 hibernate在哪里配置哦