数据库SQL Server 2005使用hibernate时报错:
JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQLServerDriver
sqljdbc.jar也添加到工程,SQL Server configuration manager的TCP/IP端口号也配置成1433,不知道哪错了,大家帮忙看看...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="hibernate.connection.url">
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=temp;SelectMethod=cursor
</property>
<property name="hibernate.connection.driver_class">
com.microsoft.jdbc.sqlserver.SQLServerDriver
</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password">123</property>
<property name="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</property>
  
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.show_sql">true</property> <mapping resource="hibernate/test/cache_level/Student.hbm.xml" />
<mapping
resource="hibernate/test/cache_level/ClassInfo.hbm.xml" />
</session-factory>
</hibernate-configuration>