Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin with Service & DAO Layer

priyanka Kulathilaka
9 years ago Jun 20, 2012 4:01pm
Charles Anthony
9 years ago Jun 21, 2012 6:53am

Hi,

The problem is that the Application has not been "weaved" - that is, the application class needs to be processed immediately after it is instantiated to add in the autowire objects.
Now, assuming that you haven't done compile-time weaving, you probably want to enable load-time weaving.

This is a Spring issue, by the way, and nothing to do with Vaadin.

Here's the Spring documentation on load-time weaving AOP, which is essentially what "drives" the autowiring. Essentially, you'll want to add <context:load-time-weaver/> to your application-context.xml, and if you're running tomcat, stick the org.springframework.instrument.tomcat.jar in the lib directory, and tweak a (tomcat) context.xml file

It is also possible to do autowiring with Vaadin without doing Spring AOP - by creating and using a different ApplicationServlet , but it is not something I've done - others may be able to help.

Cheers,

Charles.

Joonas Lehtinen
9 years ago Jun 21, 2012 2:21pm

I deleted the other copies of this post. Please only post in one thread.

priyanka Kulathilaka
9 years ago Jun 21, 2012 6:46pm
priyanka Kulathilaka
9 years ago Jun 21, 2012 6:47pm
Charles Anthony
9 years ago Jun 22, 2012 7:14am
priyanka Kulathilaka
9 years ago Jun 24, 2012 4:37pm