`
qimo601
  • 浏览: 3445912 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

ssh 框架搭建出现错误

    博客分类:
  • java
阅读更多
最近刚学习是使用SSH出现下面错误,在网上搜了半天也不知道什么问题,拜托各位大虾了。
如下错误


2009-03-19 17:01:58,937 ERROR [main] (ContextLoader.java:203) - Context initialization failed 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hDemocratService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: 
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao': no matching editors or conversion strategy found 
Caused by: 
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are: 
PropertyAccessException 1: 
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao': no matching editors or conversion strategy found 
Caused by: 
java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao': no matching editors or conversion strategy found 
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231) 
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138) 
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815) 
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645) 
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78) 
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1127) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424) 
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) 
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) 
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) 
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) 
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) 
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) 
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) 
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) 
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) 
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) 
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) 
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926) 
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889) 
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) 
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) 
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) 
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) 
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) 
at org.apache.catalina.core.StandardService.start(StandardService.java:516) 
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:589) 
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) 
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 
2009-3-19 17:01:58 org.apache.catalina.core.StandardContext listenerStart 
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hDemocratService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: 
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao': no matching editors or conversion strategy found 
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are: 
PropertyAccessException 1: 
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao': no matching editors or conversion strategy found 
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.tzb.dao.IDemocratDao] for property 'democratDao': no matching editors or conversion strategy found 
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231) 
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138) 
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:815) 
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645) 
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78) 
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1127) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:424) 
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) 
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) 
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) 
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244) 
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187) 
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) 
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) 
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) 
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) 
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) 
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) 
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926) 
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889) 
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) 
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) 
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) 
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) 
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) 
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) 
at org.apache.catalina.core.StandardService.start(StandardService.java:516) 
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:589) 
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) 
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 
2009-3-19 17:01:58 org.apache.catalina.core.StandardContext start 
严重: Error listenerStart 
2009-3-19 17:01:58 org.apache.catalina.core.StandardContext start 
严重: Context [/tzb] startup failed due to previous errors 



web.xml 源代码:


<?xml version="1.0" encoding="UTF-8"?>   
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"  
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">   
    <servlet>   
        <servlet-name>action</servlet-name>   
        <servlet-class>   
            com.tzb.system.TzbServlet   
        </servlet-class>   
        <init-param>   
            <param-name>config</param-name>   
            <param-value>/WEB-INF/struts-config.xml</param-value>   
        </init-param>   
        <init-param>   
            <param-name>debug</param-name>   
            <param-value>3</param-value>   
        </init-param>   
        <init-param>   
            <param-name>detail</param-name>   
            <param-value>3</param-value>   
        </init-param>   
        <load-on-startup>0</load-on-startup>   
    </servlet>   
    <servlet-mapping>   
        <servlet-name>action</servlet-name>   
        <url-pattern>*.do</url-pattern>   
    </servlet-mapping>   
  
    <context-param>   
        <param-name>contextConfigLocation</param-name>   
        <param-value>/WEB-INF/applicationContext.xml</param-value>   
    </context-param>   
  
    <listener>   
        <listener-class>   
            org.springframework.web.context.ContextLoaderListener   
        </listener-class>   
    </listener>   
    <session-config>   
        <session-timeout>30</session-timeout>   
    </session-config>   
  
<!-- 该配置主要作用:在每一次请求与访问之间开启的session个数控制,要是设成true即为全过程只有一个session,否则会开启多个 -->   
    <filter>   
        <filter-name>OpenSessionInViewFilter</filter-name>   
        <filter-class>   
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter   
        </filter-class>   
        <init-param>   
            <param-name>singleSession</param-name>   
            <param-value>true</param-value>   
        </init-param>   
    </filter>   
    <filter-mapping>   
        <filter-name>OpenSessionInViewFilter</filter-name>   
        <url-pattern>*.do</url-pattern>   
    </filter-mapping>   
  
    <welcome-file-list>   
        <welcome-file>index.jsp</welcome-file>   
    </welcome-file-list>   
</web-app>  

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<servlet>
		<servlet-name>action</servlet-name>
		<servlet-class>
			com.tzb.system.TzbServlet
		</servlet-class>
		<init-param>
			<param-name>config</param-name>
			<param-value>/WEB-INF/struts-config.xml</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>3</param-value>
		</init-param>
		<init-param>
			<param-name>detail</param-name>
			<param-value>3</param-value>
		</init-param>
		<load-on-startup>0</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>action</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext.xml</param-value>
	</context-param>

	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>
	<session-config>
		<session-timeout>30</session-timeout>
	</session-config>

<!-- 该配置主要作用:在每一次请求与访问之间开启的session个数控制,要是设成true即为全过程只有一个session,否则会开启多个 -->
	<filter>
		<filter-name>OpenSessionInViewFilter</filter-name>
		<filter-class>
			org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
		</filter-class>
		<init-param>
			<param-name>singleSession</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>OpenSessionInViewFilter</filter-name>
		<url-pattern>*.do</url-pattern>
	</filter-mapping>

	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
</web-app>




applicationContext.xml源代码:


<?xml version="1.0" encoding="UTF-8"?>   
<beans xmlns="http://www.springframework.org/schema/beans"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">   
  
    <!-- DataBase Configuration -->   
    <bean id="tzbDB" class="org.apache.commons.dbcp.BasicDataSource">   
        <property name="driverClassName"  
            value="com.mysql.jdbc.Driver">   
        </property>   
        <property name="url" value="jdbc:mysql://127.0.0.1:3306/tzb"></property>   
        <property name="username" value="root"></property>   
        <property name="password" value="root"></property>   
    </bean>   
    <bean id="hSessionFactory"  
        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">   
        <property name="dataSource">   
            <ref bean="tzbDB" />   
        </property>   
  
        <property name="hibernateProperties">   
            <props>   
                <!-- 定义hibernate的sessionFactory的属性 -->   
                <prop key="hibernate.dialect">   
                    org.hibernate.dialect.MySQLDialect   
                </prop>   
                <prop key="hibernate.show_sql">true</prop>   
            </props>   
        </property>   
  
        <property name="mappingResources">   
            <list>   
                <!-- 在这列出所有的PO映射文件XX.hbm.xml -->   
                <value>com/tzb/vo/Democrat.hbm.xml</value>   
            </list>   
        </property>   
    </bean>   
  
    <!-- 声明性事务管理 -->   
    <bean id="transactionManager"  
        class="org.springframework.jdbc.datasource.DataSourceTransactionManager">   
        <property name="dataSource">   
            <ref local="tzbDB" />   
        </property>   
    </bean>   
    <bean id="transactionInterceptor"  
        class="org.springframework.transaction.interceptor.TransactionInterceptor">   
        <property name="transactionManager">   
            <ref bean="transactionManager" />   
        </property>   
        <property name="transactionAttributes">   
            <props>   
                <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>   
                <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>   
                <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>   
                <prop key="remove*">PROPAGATION_REQUIRED</prop>   
                <prop key="add*">PROPAGATION_REQUIRED</prop>   
                <prop key="delete*">PROPAGATION_REQUIRED</prop>   
                <prop key="update*">PROPAGATION_REQUIRED</prop>   
                <prop key="save*">PROPAGATION_REQUIRED</prop>   
                <prop key="insert*">PROPAGATION_REQUIRED</prop>   
                <prop key="*">PROPAGATION_REQUIRED</prop>   
            </props>   
        </property>   
    </bean>   
  
    <bean   
        class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">   
        <property name="beanNames">   
            <!-- 需要添加事务管理的类在这配置,一般是业务类 -->   
            <list>   
                <value>hDemocratDao</value>   
                <value>hDemocratService</value>   
                   
            </list>   
        </property>   
        <property name="interceptorNames">   
            <list>   
                <value>transactionInterceptor</value>   
            </list>   
        </property>   
    </bean>   
    <!-- DAO配置 -->   
    <bean id="hDemocratDao" class="com.tzb.dao.DemocratDao">   
        <property name="sessionFactory">   
            <ref bean="hSessionFactory" />   
        </property>   
    </bean>   
  
  
    <!-- appService配置 -->   
    <bean id="hDemocratService"  
        class="com.tzb.appService.democratService.DemocratService">   
        <property name="democratDao">   
            <ref bean="hDemocratDao" />   
        </property>   
  
    </bean>   
    <!-- action设置 -->   
    <bean name="/democratOpt"  
        class="com.tzb.controller.democratController.DemocratOpt">   
        <property name="democratService">   
            <ref local="hDemocratService" />   
        </property>   
  
    </bean>   
</beans>  

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

	<!-- DataBase Configuration -->
	<bean id="tzbDB" class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClassName"
			value="com.mysql.jdbc.Driver">
		</property>
		<property name="url" value="jdbc:mysql://127.0.0.1:3306/tzb"></property>
		<property name="username" value="root"></property>
		<property name="password" value="root"></property>
	</bean>
	<bean id="hSessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="dataSource">
			<ref bean="tzbDB" />
		</property>

		<property name="hibernateProperties">
			<props>
				<!-- 定义hibernate的sessionFactory的属性 -->
				<prop key="hibernate.dialect">
					org.hibernate.dialect.MySQLDialect
				</prop>
				<prop key="hibernate.show_sql">true</prop>
			</props>
		</property>

		<property name="mappingResources">
			<list>
				<!-- 在这列出所有的PO映射文件XX.hbm.xml -->
				<value>com/tzb/vo/Democrat.hbm.xml</value>
			</list>
		</property>
	</bean>

	<!-- 声明性事务管理 -->
	<bean id="transactionManager"
		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource">
			<ref local="tzbDB" />
		</property>
	</bean>
	<bean id="transactionInterceptor"
		class="org.springframework.transaction.interceptor.TransactionInterceptor">
		<property name="transactionManager">
			<ref bean="transactionManager" />
		</property>
		<property name="transactionAttributes">
			<props>
				<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="remove*">PROPAGATION_REQUIRED</prop>
				<prop key="add*">PROPAGATION_REQUIRED</prop>
				<prop key="delete*">PROPAGATION_REQUIRED</prop>
				<prop key="update*">PROPAGATION_REQUIRED</prop>
				<prop key="save*">PROPAGATION_REQUIRED</prop>
				<prop key="insert*">PROPAGATION_REQUIRED</prop>
				<prop key="*">PROPAGATION_REQUIRED</prop>
			</props>
		</property>
	</bean>

	<bean
		class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
		<property name="beanNames">
			<!-- 需要添加事务管理的类在这配置,一般是业务类 -->
			<list>
				<value>hDemocratDao</value>
				<value>hDemocratService</value>
				
			</list>
		</property>
		<property name="interceptorNames">
			<list>
				<value>transactionInterceptor</value>
			</list>
		</property>
	</bean>
	<!-- DAO配置 -->
	<bean id="hDemocratDao" class="com.tzb.dao.DemocratDao">
		<property name="sessionFactory">
			<ref bean="hSessionFactory" />
		</property>
	</bean>


	<!-- appService配置 -->
	<bean id="hDemocratService"
		class="com.tzb.appService.democratService.DemocratService">
		<property name="democratDao">
			<ref bean="hDemocratDao" />
		</property>

	</bean>
	<!-- action设置 -->
	<bean name="/democratOpt"
		class="com.tzb.controller.democratController.DemocratOpt">
		<property name="democratService">
			<ref local="hDemocratService" />
		</property>

	</bean>
</beans>



struts-config.xml 源代码:

<?xml version="1.0" encoding="UTF-8"?>   
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">   
  
<struts-config>   
    <data-sources />   
    <form-beans>   
        <form-bean name="DemocrateForm"  
            type="com.ctms.form.DemocrateForm">   
        </form-bean>   
    </form-beans>   
  
    <global-exceptions />   
    <global-forwards />   
    <action-mappings>   
        <action name="DemocrateForm" path="/democratOpt" scope="request"  
            type="org.springframework.web.struts.DelegatingActionProxy"  
            validate="false">   
            <forward name="democratList"  
                path="/democrat/democratList.jsp" />   
        </action>   
    </action-mappings>   
  
    <controller>   
        <set-property   
            value="org.springframework.web.struts.DelegatingRequestProcessor"  
            property="processorClass" />   
    </controller>   
  
    <message-resources parameter="ApplicationResources" />   
  
  
</struts-config>  
1
1
分享到:
评论
1 楼 qimo601 2009-03-19  
我自己发现了错误。

原来是我在 public class DemocratDao extends HibernateDaoSupport implements IDemocratDao


忘写了继承 IDemocratDao 这个接口。


相关推荐

    SSH框架搭建源码

    这个压缩包文件"SSHdemo"提供了一个SSH框架搭建登录功能的示例,帮助开发者了解并实践如何整合这三个框架来构建一个完整的Web应用程序。 **Struts2** 是一个基于MVC(Model-View-Controller)设计模式的Java Web...

    SSH框架搭建步骤

    以下将详细介绍SSH框架搭建的步骤。 **Spring框架** 1. **环境准备**:首先确保已安装JDK,并配置好环境变量。然后下载Spring框架的库文件,将其添加到项目的类路径中。 2. **创建项目**:使用IDE如Eclipse或...

    ssh框架搭建实例源码7

    本资源是在“ssh框架搭建实例源码6”基础上实现注解自动注入功能,简化了spring的配置,并解决了按F5刷新页面出现错误的bug。 本资源所需的jar包请到“ssh框架搭建实例源码2”和“ssh框架搭建实例源码”中下载: ...

    ssh框架搭建用到的包完整版.zip

    在本文中,我们将深入探讨SSH框架搭建过程中涉及到的关键知识点。 首先,Spring框架是SSH的核心,它负责管理应用程序的组件和依赖关系。Spring提供了依赖注入(Dependency Injection,DI)和面向切面编程(Aspect-...

    SSH框架搭建详细图文教程

    在SSH框架搭建步骤中: 1. 新建Web项目:在MyEclipse中创建一个新的Web项目,例如名为"SSH"。 2. 添加Struts2框架:右键点击项目,选择MyEclipse -&gt; Add Struts Capabilities,设置基包路径。 3. 配置Spring框架:...

    Maven-SSH框架搭建

    在Maven环境中搭建SSH框架,你需要先配置项目的pom.xml文件,引入所需的依赖。对于Struts2,Spring和Hibernate,你需要指定它们的版本号。例如: ```xml &lt;groupId&gt;org.apache.struts &lt;artifactId&gt;struts2-core...

    ssh 框架搭建 pdf

    SSH框架搭建的过程中,首先要根据项目需求选择合适的Struts、Spring和Hibernate版本,然后按照SSH的结构设计项目架构。整合这三者,主要目的是发挥各自的优势,比如Struts负责Web层的MVC实现,Spring处理业务逻辑和...

    ssh框架搭建所需要的全部jar包

    尽管这个压缩包包含了SSH框架搭建所需的基本库,但现代的开发实践中,使用构建工具如Maven或Gradle来管理依赖是更佳的选择。Maven是一个项目管理和综合工具,它可以自动下载所需的jar包,解决依赖冲突,并提供构建...

    ssh框架搭建( spring4.3.8、struts2.5.1、hibernate5.2.1)

    SSH框架是Java开发中常用的三大框架集成,包括Spring、Struts和Hibernate。这些框架的组合为开发者提供了模型-视图...提供的SSH框架搭建.docx文档应该包含详细的步骤指导和示例代码,是学习SSH框架集成的重要参考资料。

    SSH框架搭建的网上书店系统

    SSH框架搭建的网上书店系统是一种基于Java开发的Web应用程序,主要使用了Struts2、Hibernate和Spring这三大框架。这个系统提供了丰富的功能,包括用户端的注册、登录、购物车管理和购书流程,以及管理员端的订单处理...

    SSH框架搭建

    在SSH框架搭建过程中,首先需要配置各个框架的基本环境,包括添加相应的库文件到项目中,设置项目构建路径,以及配置web.xml文件以启动Struts2和Spring。接下来,定义实体类并进行Hibernate的映射配置,创建DAO...

    ssh框架搭建及实例

    在这个“ssh框架搭建及实例”中,我们将深入探讨如何配置和使用这三个框架,以及它们如何协同工作。 首先,Struts2是基于Model2模式的Web应用框架,用于处理HTTP请求并展示结果。它提供了Action、Result和...

    ssh框架搭建实例

    ### SSH框架搭建实例 #### 一、项目背景与目标 本案例主要介绍如何利用Struts、Spring、Hibernate(简称SSH)三大框架搭建一个鲜花礼品网的Web应用程序。通过本课程的学习,你将能够掌握SSH框架的基本搭建流程以及...

    ssh框架搭建教程.pdf

    接下来,我们将深入探讨如何搭建SSH框架以及相关的核心知识点。 首先,需要准备相关环境与依赖。搭建SSH框架通常需要以下基础: 1. Java开发环境:JDK,用于编写Java代码和运行Java应用程序。 2. Web服务器:如...

    ssh框架手动搭建PPT

    让我们深入探讨一下SSH框架搭建的知识点。 **Spring框架** Spring是一个全面的后端开发框架,它提供了依赖注入(DI)和面向切面编程(AOP)等功能。在SSH框架中,Spring主要负责管理对象的生命周期和装配,以及处理...

    SSH框架搭建调查管理系统

    这个项目“SSH框架搭建调查管理系统”是基于SSH2实现的一个调查管理平台,旨在帮助用户创建、管理和分析调查数据。以下是关于SSH2框架、调查管理以及注解的相关知识点: 1. **Struts2框架**:Struts2是一个MVC...

    SSH框架搭建——登录、注册实例

    在整个SSH框架搭建的过程中,我们需要熟悉各个框架的工作原理及其配置方法,这对于开发一个功能完整的Web应用至关重要。例如,Struts框架的配置主要集中在web.xml文件和struts-config.xml文件中,Spring框架的配置则...

    最新SSH框架搭建工程

    这个"最新SSH框架搭建工程"提供了基于Struts2.5.10、Spring4.3.7和Hibernate5.2.9的集成开发环境,旨在帮助开发者快速构建高效、稳定且可维护的Web应用。 1. **Struts2**: 是一个基于MVC(Model-View-Controller)...

    ssh框架搭建并简单实例实现(注册登录功能)

    SSH框架是Java Web开发中...SSH框架的搭建和实例实现有助于理解MVC模式和企业级应用的开发流程。通过这个简单的注册登录功能,你可以深入学习每个框架的核心概念和它们之间的协作方式,为后续的复杂项目打下坚实基础。

Global site tag (gtag.js) - Google Analytics