Topic: 初学hibernate求助:在做hibernate时出的错。

  Print this page

1.初学hibernate求助:在做hibernate时出的错。 Copy to clipboard
Posted by: joybike
Posted on: 2006-04-20 11:49

总是出现这个问题:怎么解决阿。有知道的帮帮忙,谢谢
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml not found
  at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
  at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1243)
  at org.hibernate.cfg.Configuration.configure(Configuration.java:1265)
  at org.hibernate.cfg.Configuration.configure(Configuration.java:1252)
  at com.weportal.computer.ComputerCreate.main(ComputerCreate.java:14)

2.Re:初学hibernate求助:在做hibernate时出的错。 [Re: joybike] Copy to clipboard
Posted by: wen4516
Posted on: 2006-04-20 19:57

不是写着hibernate.cfg.xml没有找到吗......你应该把放在classes目录中

3.Re:初学hibernate求助:在做hibernate时出的错。 [Re: joybike] Copy to clipboard
Posted by: joybike
Posted on: 2006-04-20 21:57

我也知道是找不到xml文件,就是不知道为什么找不到。谢谢啦


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923