sessionFactory返回值为什么是NullPointerException?
hibernate3.4+Struts1.3,数据库是SQlServer2008,程序执行到sessionFactory = new Configuration().configure().buildSessionFactory()时返回值sessionFactory是null,
下面的openSession进行不下去了,求高手帮忙看下错误在哪里?
hibernate.cfg.xml
<!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.url">jdbc:sqlserver://localhost:1433;DatabaseName=hibernate</property>
<property name="connection.username">sa</property>
<property name="connection.password">sa</property>
<property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="show_sql">true</property>
<mapping resource="person.hbm.xml"/>
</session-factory>
</hibernate-configuration>