Vaadin-cdi + weld + tomcat7 problem

Hi all,

Vaadin-cdi + weld + tomcat7 problem

First, I create a vaadin project, and add weld-servlet.jar, vaadin-cdi-1.0.0.jar into WEB-INF/lib,
then it happend NullPointerException when tomcat starting.
Following are error messages:

Jun 06, 2013 1:48:03 PM com.vaadin.cdi.internal.ContextDeployer discoverUIMappingsFromAnnotations
INFO: Discovering Vaadin UIs…
Jun 06, 2013 1:48:03 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.vaadin.cdi.internal.ContextDeployer
java.lang.NullPointerException
at com.vaadin.cdi.internal.AnnotationUtil.getUiBeans(AnnotationUtil.java:77)
at com.vaadin.cdi.internal.ContextDeployer.discoverUIMappingsFromAnnotations(ContextDeployer.java:102)
at com.vaadin.cdi.internal.ContextDeployer.contextInitialized(ContextDeployer.java:60)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

Jun 06, 2013 1:48:03 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jun 06, 2013 1:48:03 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context
[/perfmgr] startup failed due to previous errors

public static Set getUiBeans(BeanManager beanManager)
{
    Set uiBeans = beanManager.getBeans(com/vaadin/ui/UI, new Annotation[] {
        new AnnotationLiteral() {

        }
    });
    return uiBeans;
}

I think the beanManager is Null, so how to initialize the beanManager when tomcat starting?

Thanks,
Evan

Hi, same here.

I have try to enable CDI in Tomcat like is described her: http://docs.jboss.org/weld/reference/1.0.0/en-US/html/environments.html#d0e4998, but the BeanManager is still null.

My maven-project contains dependencies for vaadin-cdi 1.0.0.alpha1 and weld-servlet 2.0.2.Final.

I have already tried to run the vaadin-cdi-example-Webapp but this stops with the same error.

Thanks,
Andre

Hi,

I got this error when my WEB-INF/beans.xml was not “empty”. With following beans.xml it should work better:

<?xml version="1.0" encoding="UTF-8"?>
<beans>

</beans>

With Vaadin 7.2.2 + CDI in Tomcat 7 and Weld, I get this:

Jun 14, 2014 1:14:48 AM org.apache.catalina.core.StandardWrapperValve invoke Grave: Servlet.service() for servlet [UI] in context with path [/testCDI] threw exception [com.vaadin.server.ServiceException: java.lang.NullPointerException] with root cause java.lang.NullPointerException at com.vaadin.cdi.internal.AnnotationUtil.getUiBeans(AnnotationUtil.java:74) at com.vaadin.cdi.internal.AnnotationUtil.getRootUiBeans(AnnotationUtil.java:46) at com.vaadin.cdi.CDIUIProvider.rootUI(CDIUIProvider.java:104) at com.vaadin.cdi.CDIUIProvider.getUIClass(CDIUIProvider.java:76) at com.vaadin.server.BootstrapHandler.synchronizedHandleRequest(BootstrapHandler.java:168) at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1405) at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:237) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Evan Yang, did you manage to solve that error?

In com.vaadin.cdi.CDIUIProvider, there is a lookup for “java:comp/BeanManager”, but in Tomcat bind it to “java:comp/env/BeanManager”. That is the problem. I tried providing my own implementation of com.vaadin.cdi.CDIUIProvider that uses the correct lookup for Tomcat and it worked. Any chance of incorporating this special case?

That is a bug in the addon if both java:comp/BeanManager and java:comp/env/BeanManager aren’t checked. The lookup could be done
like this
to prevent this error. Please file a bug against this in the
issue tracker
so it gets fixed.

This was
ticket #12388
, with a fix coming in Vaadin CDI 1.0.0.alpha3 probably later today or tomorrow.

Hi everybody, I got to this topic, because I have a quite similiar topic : I’m using JBoss Wildfly with Vaadin CDI add-on. This works fine, as long as I don’t add a dependency to vaadin-client-compiler. Then I get a NPE for the BeanManager as well telling me furthermore, that the BeanManager couldn´t be get through JNDI. I use Vaadin version 7.2.5 in all dependencies and Vaadin CDI 1.0.0.alpha3. Since I’m a Vaadin rookie, I do not really understand, what´s happening here, that just adding a dependency breaks CDI. What did I wrong here ?
This is my pom.xml:

[code]

<?xml version="1.0" encoding="UTF-8"?>


4.0.0
com.jpo
almut
war
0.0.1-SNAPSHOT
Vaadin Web Application

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <vaadin.version>7.2.5</vaadin.version>
    <!-- <vaadin.version>7.4.0.alpha5</vaadin.version> -->
    <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
</properties>
<repositories>
    <repository>
        <id>vaadin-addons</id>
        <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
    <repository>
        <id>vaadin-snapshots</id>
        <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>vaadin-snapshots</id>
        <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
<dependencies>
    <!-- Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory).
        For widgetset compilation, vaadin-client-compiler is automatically added
        on the compilation classpath by vaadin-maven-plugin so normally there is
        no need for an explicit dependency. -->
    <!-- <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiler</artifactId>
        <version>${vaadin.version}</version> <scope>provided</scope> </dependency> -->
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-push</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-themes</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-cdi</artifactId>
        <version>1.0.0.alpha3</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.31</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.3.6.Final</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-maven-plugin</artifactId>
        <version>${vaadin.version}</version>
        <type>maven-plugin</type>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiler</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-server</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client</artifactId>
        <version>${vaadin.version}</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-websocket</artifactId>
        <version>8.1.12.v20130726</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
        <!-- As we are doing "inplace" GWT compilation, ensure the widgetset -->
        <!-- directory is cleaned properly -->
        <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
                <filesets>
                    <fileset>
                        <directory>src/main/webapp/VAADIN/widgetsets</directory>
                    </fileset>
                </filesets>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>${vaadin.plugin.version}</version>
            <configuration>
                <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                <!-- <runTarget>mobilemail</runTarget> -->
                <!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This
                    way compatible with Vaadin eclipse plugin. -->
                <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets
                </webappDirectory>
                <hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets
                </hostedWebapp>
                <!-- Most Vaadin apps don't need this stuff, guide that to target -->
                <persistentunitcachedir>${project.build.directory}</persistentunitcachedir>
                <deploy>${project.build.directory}/gwt-deploy</deploy>
                <!-- Compile report is not typically needed either, saves hunreds of
                    mb disk -->
                <compileReport>false</compileReport>
                <noServer>true</noServer>
                <!-- Remove draftCompile when project is ready -->
                <draftCompile>false</draftCompile>

                <style>OBF</style>
                <strict>true</strict>
                <runTarget>http://localhost:8080/</runTarget>
            </configuration>
            <executions>
                <execution>
                    <configuration>
                        <!-- if you don't specify any modules, the plugin will find them -->
                        <!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module>
                            </modules> -->
                    </configuration>
                    <goals>
                        <goal>clean</goal>
                        <goal>resources</goal>
                        <goal>update-theme</goal>
                        <goal>update-widgetset</goal>
                        <goal>compile-theme</goal>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
        </plugin>
    </plugins>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings
                only. It has no influence on the Maven build itself. -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>com.vaadin</groupId>
                                    <artifactId>
                                        vaadin-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [7.2.5,)
                                    </versionRange>
                                    <goals>
                                        <goal>resources</goal>
                                        <goal>update-widgetset</goal>
                                        <goal>compile</goal>
                                        <goal>update-theme</goal>
                                        <goal>compile-theme</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <additionalProjectnatures>
                        <projectnature>com.vaadin.integration.eclipse.widgetsetNature</projectnature>
                    </additionalProjectnatures>
                    <additionalBuildcommands>
                        <buildcommand>com.vaadin.integration.eclipse.widgetsetBuilder</buildcommand>
                        <buildcommand>com.vaadin.integration.eclipse.addonStylesBuilder</buildcommand>
                    </additionalBuildcommands>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
[/code]And this is the stack trace I get when I load the app in the browser: [code] 00:13:56,799 SEVERE [com.vaadin.cdi.CDIUIProvider] (default task-3) Could not get BeanManager through JNDI 00:13:58,973 SEVERE [com.vaadin.server.DefaultErrorHandler] (default task-3) : java.lang.NullPointerException at com.vaadin.cdi.CDIUIProvider.scanForBeans(CDIUIProvider.java:141) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]
at com.vaadin.cdi.CDIUIProvider.createInstance(CDIUIProvider.java:51) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:199) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:237) [vaadin-server-7.2.5.jar:7.2.5]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

00:13:58,979 ERROR [io.undertow.request]
(default task-3) UT005023: Exception handling request to /almut/: javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.NullPointerException
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:239) [vaadin-server-7.2.5.jar:7.2.5]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

Caused by: com.vaadin.server.ServiceException: java.lang.NullPointerException
at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1466) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1420) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:237) [vaadin-server-7.2.5.jar:7.2.5]

... 27 more

Caused by: java.lang.NullPointerException
at com.vaadin.cdi.CDIUIProvider.scanForBeans(CDIUIProvider.java:141) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.cdi.CDIUIProvider.createInstance(CDIUIProvider.java:51) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:199) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408) [vaadin-server-7.2.5.jar:7.2.5]

... 28 more

00:14:16,337 SEVERE [com.vaadin.cdi.CDIUIProvider]
(default task-10) Could not get BeanManager through JNDI
00:14:16,339 SEVERE [com.vaadin.server.DefaultErrorHandler]
(default task-10) : java.lang.NullPointerException
at com.vaadin.cdi.CDIUIProvider.scanForBeans(CDIUIProvider.java:141) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.cdi.CDIUIProvider.createInstance(CDIUIProvider.java:51) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:199) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:237) [vaadin-server-7.2.5.jar:7.2.5]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

00:14:16,346 ERROR [io.undertow.request]
(default task-10) UT005023: Exception handling request to /almut/: javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.NullPointerException
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:239) [vaadin-server-7.2.5.jar:7.2.5]

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

Caused by: com.vaadin.server.ServiceException: java.lang.NullPointerException
at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1466) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1420) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:237) [vaadin-server-7.2.5.jar:7.2.5]

... 27 more

Caused by: java.lang.NullPointerException
at com.vaadin.cdi.CDIUIProvider.scanForBeans(CDIUIProvider.java:141) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.cdi.CDIUIProvider.createInstance(CDIUIProvider.java:51) [vaadin-cdi-1.0.0.alpha3.jar:1.0.0.alpha3]

at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:199) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.2.5.jar:7.2.5]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408) [vaadin-server-7.2.5.jar:7.2.5]

... 28 more

[/code]

As Joernpeter Pook mentioned we simply added vaadin-client-compiler as dependency to your vaadin-cdi-example project pom.xml and after this project stopped to work. Reporting the same error as shown in Joernpeter Pook question. ticket #12388 doesn’t solve this problem.

Hi i have the same error here…
i’m using:

  • TOMCAT 7
  • WELD
  • VAADIN-CDI (1.0.0.alpha3)
  • My beans.xml (with 0 bytes) in WEB-INF/

I am trying replay the this tutorial:
https://vaadin.com/wiki/-/wiki/Main/Vaadin-CDI-integration

Somebody can help-me?

but i receive this error:

Set 17, 2014 10:18:03 AM org.apache.catalina.core.AprLifecycleListener init
Informações: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;.
Set 17, 2014 10:18:03 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
Advertência: [SetPropertiesRule]
{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TesteVaadin' did not find a matching property.
Set 17, 2014 10:18:03 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
Advertência: [SetPropertiesRule]
{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:VaadinJAASeCDI' did not find a matching property.
Set 17, 2014 10:18:04 AM org.apache.coyote.AbstractProtocol init
Informações: Initializing ProtocolHandler ["http-bio-8080"]

Set 17, 2014 10:18:04 AM org.apache.coyote.AbstractProtocol init
Informações: Initializing ProtocolHandler ["ajp-bio-8009"]

Set 17, 2014 10:18:04 AM org.apache.catalina.startup.Catalina load
Informações: Initialization processed in 414 ms
Set 17, 2014 10:18:04 AM org.apache.catalina.core.StandardService startInternal
Informações: Starting service Catalina
Set 17, 2014 10:18:04 AM org.apache.catalina.core.StandardEngine startInternal
Informações: Starting Servlet Engine: Apache Tomcat/7.0.55
Set 17, 2014 10:18:05 AM com.vaadin.cdi.internal.ContextDeployer contextInitialized
Informações: Initializing web context for path /VaadinJAASeCDI
Set 17, 2014 10:18:05 AM com.vaadin.cdi.internal.ContextDeployer discoverUIMappingsFromAnnotations
Informações: Discovering Vaadin UIs...
Set 17, 2014 10:18:06 AM org.apache.catalina.core.StandardContext listenerStart
Grave: Exception sending context initialized event to listener instance of class com.vaadin.cdi.internal.ContextDeployer
java.lang.NullPointerException
    at com.vaadin.cdi.internal.AnnotationUtil.getUiBeans(AnnotationUtil.java:74)
    at com.vaadin.cdi.internal.ContextDeployer.discoverUIMappingsFromAnnotations(ContextDeployer.java:101)
    at com.vaadin.cdi.internal.ContextDeployer.contextInitialized(ContextDeployer.java:58)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Set 17, 2014 10:18:06 AM org.apache.catalina.core.StandardContext startInternal
Grave: Error listenerStart
Set 17, 2014 10:18:06 AM org.apache.catalina.core.StandardContext startInternal
Grave: Context 
[/VaadinJAASeCDI] startup failed due to previous errors
Set 17, 2014 10:18:06 AM com.vaadin.cdi.internal.ContextDeployer contextDestroyed
Informações: Vaadin web context destroyed
Set 17, 2014 10:18:06 AM org.apache.coyote.AbstractProtocol start
Informações: Starting ProtocolHandler ["http-bio-8080"]

Set 17, 2014 10:18:06 AM org.apache.coyote.AbstractProtocol start
Informações: Starting ProtocolHandler ["ajp-bio-8009"]

Set 17, 2014 10:18:06 AM org.apache.catalina.startup.Catalina start
Informações: Server startup in 1980 ms

This is my UI:

[code]
package com.example.vaadinjaasecdi;

import com.vaadin.cdi.CDIUI;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;

@SuppressWarnings(“serial”)
@CDIUI(value = “exampleUI”)
public class VaadinjaasecdiUI extends UI {

@Override
public void init(VaadinRequest request) {
    Label label = new Label("Hello Vaadin user");
    setContent(label);
}

}
[/code]My dependencies:

<!-- Vaadin CDI  -->
        <dependency org="com.vaadin" name="vaadin-cdi" rev="1.0.0.alpha3" /> 
        <!-- WELD -->
        <dependency org="org.jboss.weld" name="weld-core" rev="1.1.5.Final"/>

I found a solution. for the nullpointer problem

1º have an empty beans.xml in your /web-inf/ diretory
2º update your Ivy.xml with those dependencies:

[code]

    <dependency org="com.vaadin" name="vaadin-cdi" rev="1.0.0.beta1" />
    <!-- WELD -->
    <dependency org="org.jboss.weld" name="weld-core" rev="1.1.5.Final"/>
    <dependency org="org.jboss.weld.servlet" name="weld-servlet" rev="2.2.4.Final"/>

[/code]Are done, those steps solved my nullpointer problem… but created other… :frowning:

NFO: Initialize Weld using ServletContainerInitializer
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Set 18, 2014 1:27:20 PM org.apache.catalina.core.ContainerBase startInternal
Grave: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]
.StandardHost[localhost]
.StandardContext
[/VaadinCDI]]
    at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]
.StandardHost[localhost]
.StandardContext
[/VaadinCDI]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 7 more

I’ll keep studying… cya!

hi, see this post is already quite old but … someone has managed to resolve this error ?, i have a project configured with maven and use the version 7.6.1 of vaadin-compiler and 1.0.3 of vaadin-cdi and continue having the same error:

17:33:45,256 SEVERE [com.vaadin.cdi.internal.CDIUtil]
(default task-2) Could not get BeanManager through JNDI
17:33:45,256 SEVERE [com.vaadin.server.DefaultErrorHandler]
(default task-2) : java.lang.NullPointerException
at com.vaadin.cdi.internal.AnnotationUtil.getUiBeans(AnnotationUtil.java:80)
at com.vaadin.cdi.internal.AnnotationUtil.getRootUiBeans(AnnotationUtil.java:52)
at com.vaadin.cdi.CDIUIProvider.rootUI(CDIUIProvider.java:137)
at com.vaadin.cdi.CDIUIProvider.getUIClass(CDIUIProvider.java:109)
at com.vaadin.server.BootstrapHandler.synchronizedHandleRequest(BootstrapHandler.java:245)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1409)
at com.vaadin.cdi.server.VaadinCDIServletService.handleRequest(VaadinCDIServletService.java:92)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

someone can help me?