报错内容为:
Unable to instantiate Action, testAction, defined for 'testStart' in namespace '/TEST'Error creating bean with name 'testAction': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:307)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
其中有一段话为:
引用
In this case, use RequestContextListener or RequestContextFilter to expose the current request.
然后参考了Spring Framework 2.0.5 API 文档英文版
http://doc.javanb.com/spring-framework-api-2-0-5/org/springframework/web/context/request/RequestContextListener.html 才知道项目里的web.xml中没有配置RequestContextListener,则在web.xml中加入下面内容则正常运行了。
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
分享到:
相关推荐
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 通过控制台的...
SSH登录无实例化例子 SSH登录无实例化例子
1)第一种不是常驻型广播,也就是说广播跟随注册他的Activity的生命周期。 2)第二种是常驻型,也就是说当应用程序关闭后,如果有信息广播来,程序也会被系统调用自动运行。
WebService大讲堂之Axis2,多个实例,非常全的文档,从新手入门开始到复杂的实例
在搭建spring项目时通常需要这些jar包 ...org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace ...
ar.com.tadp.xml.rinzo_0.9.0.zip eclipse xml 插件
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.amqp.core.Queue]: Factory method 'clientQueue' threw exception; nested exception is org....
学习spring boot的一个简单demo 导入eclipse可以直接使用,希望我的分享能帮助到你
Yii 2深度实例化 该软件包提供了Yii 2依赖注入器容器,该容器能够自动解决嵌套的构造函数接口类型的依赖项。 要求 Yii 2.0.39.3+ PHP 7.0以上 安装 composer require bizley/deep-instantiate:^1.0 用法 直接-只需...
Unity3D教程:Prefabs与Instantiate1
学习使用Prefabs和instantiate使用方法!
dpoll ... 最初创建于 安装 $ python3 -m venv dpoll-env $ tmp source dpoll-env/bin/activate ...$ cd dpoll.xyz $ pip install -r requirements.txt $ touch dpoll/base/settings.py dpoll/base/local_settings.py ...
{“success”:false,“message”:“Failed to instantiate the chaincode. cause:instantiate proposal resulted in an error :: Error: 2 UNKNOWN: chaincode error (status: 500, message: is not a valid ...
@AspectJ配置Spring AOP,文档,Aspect jar包, 可运行的demo,
discover the operations available on it, and to instantiate the appropriate bean to perform said operation(s). For example, if a browser obtained a JPEG image, this framework would enable the browser...
通过MediaExtractor抽取视频,然后再通过MediaMuxer产生视频文件
稳定的兔子 stablerabbit是一个用于Rabbitmq的库 ... log.Fatalf("unable to instantiate publisher: %s", err) } queueName := "shahin" if err = p.Publish(context.Background(), queueName
名称 WebService :: Pushover-Pushover ...) or die( "Unable to instantiate WebService::Pushover.\n" ); my %params = ( message => 'test test test', priority => 0, ); my $status = $push->message( %params
Multiple points support to create objects between points with one click Connect end points if multiple points are used Instantiate objects between point A and B Option to lock end objects Option to ...
-- "MMCM" or "PLL" to instantiate, if kGenerateSerialClk true kClkRange : natural := 1; -- MULT_F = kClkRange*5 (choose >=120MHz=1, >=60MHz=2, >=40MHz=3) kRstActiveHigh : boolean := true); --...