Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 590535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:32:25+00:00 2026-05-13T15:32:25+00:00

Spring: 2.5.6.SEC01 DWR: 2.0.5 I would like to use a session scoped bean from

  • 0

Spring: 2.5.6.SEC01

DWR: 2.0.5

I would like to use a session scoped bean from DWR. It works fine, when I configure the bean to be a singleton. I read this tutor:
(http://directwebremoting.org/dwr/server/integration/spring.html)
and modified my applicationContext.xml, but it is still wrong somewhere.

My applicationContext.xml:

http://pastebin.com/m8d57f18

It ork well, but when I use an AJAX function, I get this exception:

11:31:09,593 INFO [DefaultRemoter]
Exec: DBTestAjaxFunc.testJNDI()
11:31:09,609 WARN [DefaultRemoter]
Method execution failed:
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
‘scopedTarget.dbtestajax’: 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, 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.

It seems, that the aop proxy wasn’t created, but I don’t know why.

Libs in the classpath:

  • aspectjrt.jar
  • aspectjweaver.jar
  • cglib-nodep-2.2.jar
  • dwr.jar
  • spring.jar
  • spring-aop.jar
  • spring-dwr-2.0.xsd
  • spring-web.jar
  • spring-webmvc.jar

Any idea? (Thanks!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:32:25+00:00Added an answer on May 13, 2026 at 3:32 pm

    In order for session- or request-scoped beans to work in Spring, something has to associate the current request and session with the current thread. Normally, this would be done by DispatcherServlet, but if you’re not using that, then you need an alternative.

    The alternative in this case is RequestContextListener or RequestContextFilter, either of which you can wire in to your web.xml, and both os which will allow you to use request- and session-scoped beans. Just make sure that you configure them in web.xml so that DWR requests pass through them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Spring's DI works fine for singleton scope bean. However, regarding to prototype scope it
I have a simple quartz trigger running in Spring 2.5.6-SEC01. Trigger definition looks like
The spring JDBC template returns me a list which looks like below: [{CODE_C=CSC, DESC_C=CSC},
In Spring MVC when placing an object in the view model like so: public
In Spring 3.0.x documentation its mentioned that when you use other than setter/config method
Spring version: 2.5.6 SEC01 Spring Security version: 3.0.0 RC1 I'm attempting to integrate Spring
Spring in Action book says: Hessian, like RMI, uses binary messages to communicate between
Environment: The application is using Spring Framework 2.5.6.SEC01 and iBatis 2.3.4.726. It is MVC
I add sprig dependency to my maven pom. <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>2.5.6.SEC01</version> </dependency> I
I need a custom mapping using ibatis-sqlmap 2.3.4.726 and spring 2.5.6.SEC01. class: public class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.