Topic: 求助struts+spring+hibernate 问题

  Print this page

1.求助struts+spring+hibernate 问题 Copy to clipboard
Posted by: jtaowhy
Posted on: 2006-08-11 00:17

大虾帮帮忙 这个错误我查了2天了 头都大了...
做的基本登陆模块 启动weblogic报错
Error registering bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.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

applicationContext.xml配置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thinAngry218.59.71.7:1521:orcl</value>
</property>
<property name="username">
<value>jt</value>
</property>
<property name="password">
<value>jt</value>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>com/NewWeb/hibernate/domain/Userinfo.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.OracleDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<!-- 用户登录 -->
<bean name = "/login" class = "com.NewWeb.struts.action.LoginAction">
<property name="iService"><ref bean="loginService" /></property>
</bean>

<bean id="loginService" class="com.NewWeb.service.LoginService">
<property name="iDAO"><ref bean="userDAO" /></property>
</bean>
<bean id="userDAO" class="com.NewWeb.hibernate.dao.UserDAO">
<property name="sessionFactory"><ref local="sessionFactory" /></property>
</bean>
</beans>

struts_config配置
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>
<data-sources />
<form-beans >
<form-bean name="loginForm" type="com.NewWeb.struts.form.LoginForm" />

</form-beans>

<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="loginForm"
input="/form/login.jsp"
name="loginForm"
path="/login"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="success" path="/jsp/home.jsp" />
</action>

</action-mappings>

<message-resources parameter="com.NewWeb.struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml" />
</plug-in>
</struts-config>

帮忙看下有没有问题 谢谢了


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923