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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
vaadin-cdi on wildfly (BeanManager Exception)
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
- Then I edited my UI class to:
-
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)
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?
com.vaadin:vaadin-cdi:1.0.9 ?? does not exist.
1.0.3 is the latest .
I do override the deltespike shipped with v1.0.2. ( https://vaadin.com/forum/#!/thread/8538008/9053747 )
Ovverride the logging for com.vaadin.cdi.* to fine.
It should log a fine message in CDIUtil.lookupBeanManager when it tries to lookup the BeanManager.
If I recall correctly there was an ( old ) issue with the JNDI name of the BeanManager. ( I'm sure this was addressed though ).