DatePicker with Spring

I’ve found that if I define a component @Component (Spring component) during startup DatePicker has a NullPointerException.
Any ideas?
Thanks