Hello vaadin community,
I am relatively new to Vaadin and it is my first approach to make a CDI aware multi module project running on Wildfly 9.
When my server starts up and i am starting the application, this Exception occures (Full Log at
https://gist.github.com/calaedo/da85e2092e48e72b2452
):
14:58:03,712 SEVERE [com.vaadin.cdi.internal.CDIUtil]
(default task-1) Could not get BeanManager through JNDI
14:58:03,713 SEVERE [com.vaadin.server.DefaultErrorHandler]
(default task-1) : java.lang.NullPointerException
As you can see the BeanManager can not be injected.
I did following things:
- created a project from vaadin-archetype-application-multimodule
- Added a beans.xml (0 Byte) to WEB-INF of ui project
- added this dependencies to ui
[list]
- javax:javaee-api:7.0 (provided)
- javax.enterprise:cdi-api:7.0 (provided)
- javax.inject:
javax.inject:7 (provided) - com.vaadin:
vaadin-cdi:1.0.9 (compile)
[/list] - Then I edited my UI class to:
package at.tma.core.nemesis;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.Widgetset;
import com.vaadin.cdi.CDIUI;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
/**
*
*/
@Theme("mytheme")
@Widgetset("at.tma.core.nemesis.MyAppWidgetset")
@CDIUI("")
public class NemesisRootUI extends UI {
@Override
protected void init(VaadinRequest vaadinRequest) {
this.setContent(new Label("<h1>HELLO</h1>"));
}
}
Do you know whats wrong?