原来一直使用spring的aop去注入一些Session scope的对象,但是今天在部署此类应用程序的时候却出现了以下异常:
[09-12-25 14:50:52:562 CST] 0000003f WebApp E SRVE0026E: [Servlet ERROR]-[Filter [IdentityFilter]: filter is unavailable.]:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.sessionUser': Scope 'session' 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? 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.
Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? 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.
at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:102)
at org.springframework.web.context.request.SessionScope.get(SessionScope.java:88)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:285)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.getTarget(Cglib2AopProxy.java:661)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:611)
at com.interprosoft.maximo.maximostudy.user.module.User$$EnhancerByCGLIB$$64b912.toString(<generated>)
at java.lang.String.valueOf(String.java(Inlined Compiled Code))
at java.lang.StringBuffer.append(StringBuffer.java(Compiled Code))
...
查了半天资料,也没有人给出解决办法,没办法了,有把spring的文档找来看看了,最后把web.xml文件中使用的Listener换成Filter就把问题解决了,就是把
改成
但是具体原因还是没有搞清楚,等以后有时间再好好看看。
分享到:
相关推荐
6.8.1. 在Spring中使用AspectJ来为domain object进行依赖注入 6.8.1.1. @Configurable object的单元测试 6.8.1.2. 多application context情况下的处理 6.8.2. Spring中其他的AspectJ切面 6.8.3. 使用Spring IoC来...
### 将Web应用从Tomcat5移植到Websphere6的知识点详解 #### 一、移植背景及目的 随着业务发展和技术更新换代,企业往往需要将原有的Web应用从一个平台迁移到另一个平台上以适应新的需求和技术环境。本文旨在详细...
WebSphere Application Server 6.x 资源环境提供程序配置是一种高级的系统配置方式,它允许开发者在不修改应用程序代码或配置文件的情况下,通过WebSphere管理控制台动态修改J2EE应用的配置属性。这种方式特别适合...
文档中还会详细讲述如何使用Log4j 1.2或2.x,避免使用Commons Logging,以及如何在Spring应用中通过SLF4J与Log4j或Logback结合使用,还有如何使用Java的原生日志库JUL(java.util.logging)。此外,文档还提供了对...
6.8.1. 在Spring中使用AspectJ进行domain object的依赖注入 6.8.2. Spring中其他的AspectJ切面 6.8.3. 使用Spring IoC来配置AspectJ的切面 6.8.4. 在Spring应用中使用AspectJ加载时织入(LTW) 6.9. 更多资源 7...
IBM Websphere6.0日志占满硬盘,修改日志配置文件,循环往一个日志文件里写。
was@restest2[136.6.177.37][/was]$/was/WebSphere/AppServer/bin/versionInfo.sh ``` 这个命令会显示当前WebSphere的版本号以及系统架构等信息,这些信息对于后续下载正确的升级程序至关重要。 #### 三、下载升级...
Prentice.Hall.PTR.IBM.WebSphere.Deployment.and.Advanced.Configuration.Aug.2004.eBook-DDU.chm
在所有组件安装完成后,还需要进行集成测试,确保WebSphere 8.5、IHS以及WAS插件能协同工作。这可能包括启动和停止服务、测试HTTP和HTTPS连接,以及验证应用程序的部署和运行。在整个过程中,注意记录每个步骤,以...
在IT领域,WebSphere Application Server(WAS)作为IBM的一款企业级应用服务器,其稳定性、安全性和可扩展性被广泛认可。从WebSphere 6.1.0.0升级至6.1.0.17的过程,涉及到多个关键步骤和技术要点,本文将详细解析...
【标题】"Websphere8.5.zip" 指的是IBM的一款企业级应用服务器软件——WebSphere Application Server 8.5.5的压缩包。WebSphere是IBM提供的用于部署和管理Java EE(Java Platform, Enterprise Edition)应用程序的...
6.8.1. 在Spring中使用AspectJ来为domain object进行依赖注入 6.8.2. Spring中其他的AspectJ切面 6.8.3. 使用Spring IoC来配置AspectJ的切面 6.8.4. 在Spring应用中使用AspectJ Load-time weaving(LTW) 6.9. ...
6.8.1. 在Spring中使用AspectJ进行domain object的依赖注入 6.8.2. Spring中其他的AspectJ切面 6.8.3. 使用Spring IoC来配置AspectJ的切面 6.8.4. 在Spring应用中使用AspectJ加载时织入(LTW) 6.9. 更多资源 7...
6.8.1. 在Spring中使用AspectJ来为domain object进行依赖注入 6.8.2. Spring中其他的AspectJ切面 6.8.3. 使用Spring IoC来配置AspectJ的切面 6.8.4. 在Spring应用中使用AspectJ Load-time weaving(LTW) 6.9. ...
jar包,官方版本,自测可用
精通 WebSphere MQ.pdf,精通 WebSphere MQ.pdf
在本文中,我们使用的安装包已经经过解压缩处理,直接可以使用。 二、登录主机启动安装程序 在确认安装介质后,需要登录主机并启动安装程序。执行命令 ./launchpad.sh,启动安装程序的界面将显示出来。在该界面中...
WebSphere Application Server9.0.0.2 安装包百度云盘资源地址,非商业用途,仅供学习使用。
本教程将全面介绍以上知识点,通过学习,读者将具备在实际工作中运用WebSphere解决业务问题的能力。无论你是初入IT行业的新人,还是希望提升WebSphere技能的专业人士,这都将是一份宝贵的参考资料。
【标题】:“WebSphere MQ”是IBM开发的一种高级消息队列...通过深入学习“MQ教程.ppt”,你可以获得关于WebSphere MQ的全面知识,无论你是新手还是经验丰富的开发者,都能从中受益,更好地应对实际工作中遇到的挑战。