[求助]Hibernate建立SessionFactory时报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/dispatcherServlet-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
在dispatcherServlet-servlet.xml中关于sessionFactory的配置是这样的:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>wang/po/User.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
commons-dbcp.jar;commons-pool.jar我已经加到classpath中了..
相关代码都是书中的例子,,应该不会有错误;;
使用的Hibernate3和tomcat5.5.23版本..
在线求救等..
这个问题已经困扰了我两天了..网上也找了,真的没办法自己解决..