spring2.0+struts2.0+hibernate3.0问题
我用spring2.0+struts2.0+hibernate3.0做一个用户登陆的例子,但运行时提示错误信息:严重:actionServlet:nullorg.spri...
我用spring2.0+struts2.0+hibernate3.0做一个用户登陆的例子,但运行时提示错误信息:
严重: actionServlet: null
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/config.xml]: Class that bean class [org.apache.commons.dbcp.BasicDataSource] depends on not found; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
。。。
以及
严重: Servlet /mySSH threw load() exception
请问这是哪里的原因呢?谢谢!
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost/Hibernate</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>root</value>
</property>
</bean>
这个bean内的<value>jdbc:mysql://localhost/Hibernate</value>写了localhost:3306和不写是一个效果 展开
严重: actionServlet: null
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/config.xml]: Class that bean class [org.apache.commons.dbcp.BasicDataSource] depends on not found; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
。。。
以及
严重: Servlet /mySSH threw load() exception
请问这是哪里的原因呢?谢谢!
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost/Hibernate</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>root</value>
</property>
</bean>
这个bean内的<value>jdbc:mysql://localhost/Hibernate</value>写了localhost:3306和不写是一个效果 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询