Vassilis Virvilis wrote:
Following the post
http://www.nabble.com/Share-object-in-request-scope-on-ws-server-td14611572.html
and upgrading cxf-2.0.4 with the spring libraries of 2.0.8 I was able to
make my service work serverside only.
But If I try cxf-2.0.5 which has spring-2.0.8 I am getting again.
http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other-web-configuration
To make session scope work when you're not using Spring MVC you need to
add a <listener> to your web.xml.
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'test': Cannot resolve reference to be
an 'testService' while setting bean property 'serviceBean'; nested exception is
org.springframework.beans.factory.BeanCreatio
nException: Error creating bean with name 'testService': Scope 'session' is not
active for the current thread; consider defin
ing a scoped proxy for this bean if you intend to refer to it from a singleton;
nested exception is java.lang.IllegalStateExc
eption: No thread-bound request found: Are you referring to request attributes
outside of an actual web request? If you are a
ctually operating within a web request and still receive this message,your code
is probably running outside of DispatcherServ
let/DispatcherPortlet: In this case, use RequestContextListener or
RequestContextFilter to expose the current request.
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'testService': Scope 'sessi
on' 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 a
ttributes 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 Re
questContextFilter 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 probab
ly running outside of DispatcherServlet/DispatcherPortlet: In this case, use
RequestContextListener or RequestContextFilter t
o expose the current request.
--
Ian Roberts | Department of Computer Science
[EMAIL PROTECTED] | University of Sheffield, UK