Skip to Content
avatar image
Former Member

Spring framework - Error with session scoped Beans

Hello guys,

I'm trying execute my Java Application inside Netweaver Application Server, but I'm having problems with serviceBeans with scope session. Anyone have already used Spring with session scope?

Thanks,

Cleiton.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 06, 2009 at 07:34 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2009 at 12:53 PM

    Hi Cleiton,

    Go through the link, hope u get the proper info.

    https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/6000c426-008a-2a10-aeac-9a66ae62edcf≺tmode=print [original link is broken]

    Regards,

    Srikanth Reddy.T

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      After many attempt, when I declared the bean with <aop:scoped-proxy /> it works, however it could cause performance problem. I don't need refer this bean by another singleton bean, i did a wrong configuration in order to make a work a round...

      When I run my application on tomcat server, the DWR starts perfectly the "session scope bean form IOC container", but in the WEBAS maybe it's running in other thread. Is it possible?

      Anyone had a problem like this?

      I got a detailed error with log4j,

      -


      ERROR Application [1] org.directwebremoting.impl.DefaultCreatorManager - Error loading class for creator 'SpringCreator[CounterSpringFacade]'.

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'counterSpringFacade': 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.

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:312)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)

      at org.directwebremoting.spring.SpringCreator.getInstance(SpringCreator.java:145)

      at org.directwebremoting.spring.SpringCreator.getType(SpringCreator.java:107)

      Edited by: Cleiton dos Santos Garcia on Jan 7, 2009 5:02 PM

  • avatar image
    Former Member
    Sep 24, 2009 at 11:03 AM

    For this project we give up to user java netweaver 7.1 Web AS, maybe these problems will the fixed in 7.2

    Add comment
    10|10000 characters needed characters exceeded