SSH2 救命啊,神马问题啊!!!这么恐怖

metowang 2011-06-23 05:33:46
本人用SSH2写的架构,每访问一个ACTION都会报以下DEBUG

不超过十分钟,内存溢出而挂掉~~~望神人救命~~~~~

DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] No bean named 'org.apache.struts2.dispatcher.ServletDispatcherResult' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@46136: defining beans [sessionFactory,jbpmConfiguration,dbDao,menuDao,adminRoleDao,adminUserDao,webconfigDao,projectbookDao,projectsupportDao,projectmigrationproductDao,jbpmFacade,workflowDao,documentDao,managerJbpm,adminUserProxy,menuProxy,paginationProxy,adminRoleProxy,webconfigProxy,workflowProxy,documentProxy,adminUserService,menuService,paginationService,adminRoleService,webconfigService,adminUserAction,menuAction,adminroleAction,webconfigAction,workflowAction,documentAction,projectbookAction,showMessageAction,AdminUserDWR,loginDWR,documentDWR]; root of factory hierarchy




DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Ignoring constructor [public org.apache.struts2.dispatcher.ServletDispatcherResult(java.lang.String)] of bean 'org.apache.struts2.dispatcher.ServletDispatcherResult': org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.struts2.dispatcher.ServletDispatcherResult': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: : No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
...全文
139 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
zjt321 2011-06-23
  • 打赏
  • 举报
回复
struts2的jar 包有问题把@!
O溺水的鱼0 2011-06-23
  • 打赏
  • 举报
回复
DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] No bean named 'org.apache.struts2.dispatcher.ServletDispatcherResult' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@46136: defining beans
--------------------------------
名称为“ServletDispatcherResult”的Bean没有找到。
metowang 2011-06-23
  • 打赏
  • 举报
回复
因为TOMCAT 老挂,所以调用debug 模式~~~发现这个问题!!!
jumpheightway 2011-06-23
  • 打赏
  • 举报
回复
你不要debug模式不就对了
这是日志调试用的
metowang 2011-06-23
  • 打赏
  • 举报
回复
SPRING


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


<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml">
</property>
</bean>

<bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
<property name="sessionFactory" ref="sessionFactory"/>
<property name="configuration" value="classpath:jbpm.cfg.xml"/>
</bean>



<!-- 配置文件 -->
<import resource="meto/ecshop/resource/spring/dao.xml" />
<import resource="meto/ecshop/resource/spring/proxy.xml" />
<import resource="meto/ecshop/resource/spring/service.xml" />
<import resource="meto/ecshop/resource/spring/admin_action.xml" />
<import resource="meto/ecshop/resource/spring/web_action.xml" />
<import resource="meto/ecshop/resource/spring/dwr.xml" />

</beans>
metowang 2011-06-23
  • 打赏
  • 举报
回复
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
<constant name="struts.i18n.encoding" value="GBK" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.multipart.saveDir" value="c:/strutsFiles"/>

<package name="default" namespace="/" extends="struts-default">


<!-- 前台提示框信息 -->
<action name="showMessage" method="showMessage" class="showMessageAction">
<result name="su">jsp/share/showMessage.jsp</result>
<result name="fa" type= "redirect">/error.action?action=1</result>
</action>
<!-- 后台提示框信息 -->
<action name="adminShowMessage" method="adminShowMessage" class="showMessageAction">
<result name="su">jsp/share/admin_showMessage.jsp</result>
<result name="fa" type= "redirect">/error.action?action=1</result>
</action>
<!-- 后台网页提示框信息 -->
<action name="show" method="show" class="showMessageAction">
<result name="su">../jsp/share/admin_showWebMessage.jsp</result>
<result name="fa" type= "redirect">/error.action?action=1</result>
</action>

<!-- error 错误提示 -->
<action name="error" method="error" class="showMessageAction">
<result name="su">/jsp/share/loginout_showWebMessage.jsp</result>
<result name="fa">/jsp/share/loginout_showWebMessage.jsp</result>
</action>

<!-- 前台提示框信息 -->
<action name="showAlerMessage" method="showAlerMessage" class="showMessageAction">
<result name="su">jsp/share/showAlerMessage.jsp</result>
<result name="fa" type= "redirect">/error.action?action=1</result>
</action>

</package>

<include file="meto/ecshop/resource/struts/admin/AdminUserAction.xml"/>

<include file="meto/ecshop/resource/struts/admin/adminAjaxAction.xml"/>

<include file="meto/ecshop/resource/struts/admin/MenuAction.xml"/>

<include file="meto/ecshop/resource/struts/admin/AdminRoleAction.xml"/>

<include file="meto/ecshop/resource/struts/admin/WebconfigAction.xml"/>

<include file="meto/ecshop/resource/struts/admin/myStruts.xml"/>










</struts>
RuanJava 2011-06-23
  • 打赏
  • 举报
回复
看下你的配置文件里是否有有问题!
ypb137154098 2011-06-23
  • 打赏
  • 举报
回复
看看struts2的jar包是否加的全
wl_ldy 2011-06-23
  • 打赏
  • 举报
回复
1.首先检查一个所需要的Jar包是否全面
2.检查一下配置文件是否正确
3.但不调试一下,看执行到哪里报异常的

good luck...
zhou961270 2011-06-23
  • 打赏
  • 举报
回复
NoSuchBeanDefinition ,没有定义Bean

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧