0

我正在尝试纠正这个错误,但自从 3 天以来没有任何人可以帮助我..!

当我使用 tomcat 7 部署我的应用程序时,我正在使用 spring2.5 和 hibernate3 和 struts2-2.1.6 我收到此错误。

流动的是我的 applicationContext.xml 文件

提前致谢..

<bean id ="RegistrationBeanId" class="com.xxxx.click.action.Registration.RegistrationController">
    <property name="newregistration" ref="newregistration"/>
</bean>
<bean id="newregistration" class="com.xxxxx.click.service.addRegistration.NewRegistrationManager">
    <property name="webResourceModule" ref="webResourceModule"/>
</bean>
<bean id ="webResourceModule" class="com.seeinfobiz.click.daoImpl.Wrm.WrmDAOImpl">
    <property name="sessionFactory" ref="sessionFactory"/>
</bean>

<bean id ="fileUploadBeanId" class="com.xxxx.click.action.FileUpload.FileUploadController">
    <property name="fileuploadManager" ref="fileuploadManager"/>
</bean>
<bean id="fileuploadManager" class="com.seeinfobiz.click.service.FileUploadManager.FileUploadManager">
    <property name="fileUploadDAOImpl" ref="fileUploadDAOImpl"/>
</bean>
<bean id ="fileUploadDAOImpl" class="com.seeinfobiz.click.daoImpl.FileUploadDAOImpl">
    <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!--- filupload End -->

<!-- Login Beans - Start-->
<bean id="loginBeanId" class="com.xxxxx.click.action.login.LoginController">
    <property name="loginService" ref="loginService"></property>
    <property name="menuTreeId" ref="menuTreeId"></property>
    <property name="searchManager" ref="searchManager"></property>
</bean>

和 web.xml 文件

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <distributable/>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
    </context-param>
    <listener>
        <listener-class>com.xxxx.click.util.ClickPssServletContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.xxxxx.click.util.ClickPssSessionListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.xxxxx.click.zschedular.SchedularListener</listener-class>
    </listener>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <filter>
        <filter-name>ResponseOverrideFilter</filter-name>
        <filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>ResponseOverrideFilter</filter-name>
        <url-pattern>*.export</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ResponseOverrideFilter</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>ResponseOverrideFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <!--filter-mapping>
        <filter-name>ResponseOverrideFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping-->
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <session-config>
        <session-timeout>
           15
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>clickpss/index.html</welcome-file>
    </welcome-file-list>
    <!-- added by stalin on 17 Sep, 2011-->
    <error-page>
        <error-code>404</error-code>
        <location>/error/404.jsp</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/error/500.jsp</location>
    </error-page>
    <error-page>
        <error-code>403</error-code>
        <location>/error/403.jsp</location>
    </error-page>
    <error-page>
        <error-code>400</error-code>
        <location>/error/400.jsp</location>
    </error-page>
    <!-- Added by Adip  -->
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>All JSP direct access</web-resource-name>
            <url-pattern>/views/*</url-pattern>
            <url-pattern>/WEB-INF/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <description>
                No Access
            </description>
            <role-name>restricted</role-name>
        </auth-constraint>
    </security-constraint>

</web-app>

请帮我!

4

1 回答 1

0

在您的 applicationContext.xml 文件中,我没有看到任何名称或 id 为 sessionFactory 的 bean,您<property name="sessionFactory" ref="sessionFactory"/>在另一个地方引用它。请定义一个名称或 ID 为 sessionFactory 的 bean。

于 2013-07-31T09:09:55.713 回答