hibernate报错?

libd2319 2006-12-06 03:29:18
我的hibernate运行到这句就报错
sessionFactory=new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();

错误信息:
java.lang.ExceptionInInitializerError
All.HibernateUtil.<clinit>(HibernateUtil.java:28)
com.toshiba.servlet.addminRegisterServlet.doPost(addminRegisterServlet.java:71)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


hibernate.cfg.xml文件:
<?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">

<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>

<session-factory>
<property name="connection.username">sa</property>
<property name="connection.url">
jdbc:microsoft:sqlserver://localhost:3121;DatabaseName=Logistics
</property>
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="myeclipse.connection.profile">conSQL</property>
<property name="connection.password">sa</property>
<property name="connection.driver_class">
com.microsoft.jdbc.sqlserver.SQLServerDriver
</property>
<mapping resource="com/toshiba/hibernate/UserInfo.hbm.xml" />
<mapping resource="com/toshiba/hibernate/OrderInfo.hbm.xml" />
<mapping resource="com/toshiba/hibernate/IndentInfo.hbm.xml" />
<mapping resource="com/toshiba/hibernate/Outgrowth.hbm.xml" />
<mapping resource="com/toshiba/hibernate/DeliverMission.hbm.xml" />
<mapping resource="com/toshiba/hibernate/RoadLog.hbm.xml" />
<mapping resource="com/toshiba/hibernate/DepotMission.hbm.xml" />


</session-factory>

</hibernate-configuration>
...全文
120 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧