vaadin-spring and @Autowired woes

I’ve started writing a Vaadin 7 web app which also uses Spring JPA and Spring CDI.
The DB access part is split off into a sub project (for re-use by another project), and the Vaadin UI uses this sub project.
To use the backend layer, and to allow the UI to access DAO/Service classes via @Autowired annotations, I added the vaadin-spring library to the project defs, and followed the directions at
I could get the web app to start up, the configured DAO objects are scanned by spring (according to log messages), BUT I also added a DAO class as an @Autowired field to an UI - and this field stays at null, i.e. @Autowired does not work at this place.

This UI class is not a subclass of UI, but only a part of an UI, btw - is this a problem?

The main problem for me is - how can I track down the source of this bug? I have no idea where to even start here…

With greetings from Vienna,
Wolfgang Liebich

Hi, is your “injection chain” working? You can only use @Autowired if the object where you use it is a spring managed bean (e.g. created by @Autowired annotation in other spring managed bean. If you instantiate your object with “new” keyword, Autowired fields will be null.


Thanks - yes, that was the root of all evil at work here (I’m rather new at Spring). I found two solutions aout of this problem - in!/thread/11090891/11107003 I describe my soluti