Question regarding Spring Configuration

38 views
Skip to first unread message

mm

unread,
Mar 24, 2011, 5:41:12 AM3/24/11
to GWT Dispatch
Hi all

I face some problems when trying to use the
SpringSecureDispatchServlet. The relevant configuration in my
spring.xml looks like

<bean id="secureDispatchServlet"

class="net.customware.gwt.dispatch.server.spring.SpringSecureDispatchServlet">
<property name="sessionValidator" ref="sessionValidator"/>
<property name="dispatch" ref="simpleDispatch"/>
</bean>

<bean id="dispatch"
class="net.customware.gwt.dispatch.server.spring.SpringDispatch"/
>
<bean id="sessionValidator"

class="ch.arpage.iqey.production.webapp.gwt.server.rpc.ArpageSessionValidator"/
>

When starting up, I get a BeanCreationException:

Error creating bean with name 'dispatch' defined in ServletContext
resource [/WEB-INF/conf/spring.xml]: Instantiation of bean failed;
nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[net.customware.gwt.dispatch.server.spring.SpringDispatch]: No default
constructor found; nested exception is
java.lang.NoSuchMethodException:
net.customware.gwt.dispatch.server.spring.SpringDispatch.<init>():
java.lang.NoSuchMethodException:
net.customware.gwt.dispatch.server.spring.SpringDispatch.<init>()

Could you give me a hint what my mistake is?

If I uncomment the dispatch bean and the reference to it in the
secureDispatchServlet, the app starts but gets a NullPointerException
when trying to invoke the SessionValidator. Any Ideas on this?

Thanks a lot,
mm.

Robert Munteanu

unread,
Mar 24, 2011, 6:21:35 AM3/24/11
to gwt-di...@googlegroups.com
Hi,

Isn't the SpringSecureDispatchServlet supposed to be declared in web.xml?

Robert

--
Sent from my (old) computer

Michael Monstein

unread,
Mar 24, 2011, 7:38:18 AM3/24/11
to gwt-di...@googlegroups.com
It is, but it needs a SessionValidator and I don't know how this can be attached to it...

Regards,
Michael


-------- Original-Nachricht --------
> Datum: Thu, 24 Mar 2011 12:21:35 +0200
> Von: Robert Munteanu <robert....@gmail.com>
> An: gwt-di...@googlegroups.com
> Betreff: Re: [gwt-dispatch] Question regarding Spring Configuration

--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

Robert Munteanu

unread,
Mar 24, 2011, 7:47:26 AM3/24/11
to gwt-di...@googlegroups.com
On Thu, Mar 24, 2011 at 1:38 PM, Michael Monstein <Mons...@gmx.ch> wrote:
> It is, but it needs a SessionValidator and I don't know how this can be attached to it...

IIRC you should declare it in the top-level Spring ApplicationContext,
i.e. the one specified in the context listener.

Robert

Juan Pablo Gardella

unread,
Mar 24, 2011, 7:43:22 AM3/24/11
to gwt-di...@googlegroups.com

Michael Monstein

unread,
Mar 24, 2011, 8:53:30 AM3/24/11
to gwt-di...@googlegroups.com
this helps, thanks a lot!


-------- Original-Nachricht --------
> Datum: Thu, 24 Mar 2011 08:43:22 -0300
> Von: Juan Pablo Gardella <gardella...@gmail.com>


> An: gwt-di...@googlegroups.com
> Betreff: Re: [gwt-dispatch] Question regarding Spring Configuration

> You can't use SpringDispatch because don't have default constructor

--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone

Reply all
Reply to author
Forward
0 new messages