12 Replies Latest reply on Jan 23, 2018 3:31 PM by Arnie Morein

    CDI throws exceptions during deployment on Tomcat 8

    Arnie Morein Novice

      I have to create a new JSF/PrimeFaces application to run on Tomcat 8. I want to include CDI. I have added the following jars:versions to the project:

       

      • javax.enterprise:cdi-api:2.0
      • org.jboss.weld:weld-api:3.0.SP2
      • org.jboss.weld:weld-core-impl:3.0.SP2
      • org.jboss.weld.environment:weld-environment-common:3.0.SP2
      • org.jboss.weld.module:weld-jsf:3.0.2.Final
      • org.jboss.weld.servlet:weld-servlet-core:3.0.2.Final
      • org.jboss.weld:weld-spi:3.0.SP2
      • org.jboss.weld.module:weld-web:3.0.2.Final

       

      I only added weld-api and weld-servlet-core to my POM file; all the others came in as dependencies and with out them I get many ClassNotFound exceptions.

       

      Yet when the application is deploying, it fails with strange errors internal to Weld as shown below. Can some venture a guess as to what is going on?

       

      INFO: Initializing AtmosphereFramework

      Jan 18, 2018 10:48:26 AM org.apache.catalina.core.ContainerBase addChildInternal

      SEVERE: ContainerBase.addChild: start:

      org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aamva-mock-ui-1.0.0]]

          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

          at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

          at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at java.lang.reflect.Method.invoke(Method.java:497)

          at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

          at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

          at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

          at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

          at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:106)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

          at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:

      Exception 0 :

      javax.enterprise.event.ObserverException

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

          at sun.reflect.DelegatingConstructorAccessorImpl.__newInstance(DelegatingConstructorAccessorImpl.java:45)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)

          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

          at java.lang.Class.newInstance(Class.java:442)

          at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33)

          at java.security.AccessController.doPrivileged(Native Method)

          at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40)

          at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:78)

          at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:103)

          at org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:144)

          at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)

          at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)

          at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)

          at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)

          at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)

          at org.jboss.weld.util.Observers.notify(Observers.java:166)

          at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)

          at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)

          at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)

          at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)

          at org.jboss.weld.bootstrap.events.AbstractContainerEvent._fire(AbstractContainerEvent.java:53)

          at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java)

          at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)

          at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:31)

          at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:242)

          at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:236)

          at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploySpecialized(AbstractBeanDeployer.java:111)

          at org.jboss.weld.bootstrap.BeanDeployment.deploySpecialized(BeanDeployment.java:260)

          at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:434)

          at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

          at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:236)

          at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62)

          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)

          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

          at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

          at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at java.lang.reflect.Method.invoke(Method.java:497)

          at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

          at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

          at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

          at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

          at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:106)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

          at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.ExceptionInInitializerError

          at com.sun.faces.cdi.CdiExtension.collect(CdiExtension.java:172)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

          at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at java.lang.reflect.Method.invoke(Method.java:497)

          at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)

          ... 71 more

      Caused by: java.lang.reflect.MalformedParameterizedTypeException

          at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)

          at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:51)

          at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)

          at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)

          at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)

          at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)

          at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)

          at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)

          at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)

          at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:87)

          at java.lang.Class.getGenericSuperclass(Class.java:777)

          at com.zeroturnaround.jrebelbase.facade.ac.getGenericSuperclass(SourceFile:79)

          at javax.enterprise.util.TypeLiteral.getTypeParameter(TypeLiteral.java:104)

          at javax.enterprise.util.TypeLiteral.getType(TypeLiteral.java:67)

          at com.sun.faces.cdi.CdiUtils.<clinit>(CdiUtils.java:84)

          ... 79 more

       

          at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)

          at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:31)

          at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:242)

          at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:236)

          at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploySpecialized(AbstractBeanDeployer.java:111)

          at org.jboss.weld.bootstrap.BeanDeployment.deploySpecialized(BeanDeployment.java:260)

          at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:434)

          at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

          at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:236)

          at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62)

          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)

          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

          ... 46 more

       

      Jan 18, 2018 10:48:26 AM org.apache.catalina.startup.HostConfig deployWAR

      SEVERE: Error deploying web application archive C:\dev\tomcat\apache-tomcat-8.0.18\webapps\aamva-mock-ui-1.0.0.war

      java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aamva-mock-ui-1.0.0]]

          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)

          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

          at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

          at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)

          at java.lang.reflect.Method.invoke(Method.java:497)

          at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

          at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

          at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

          at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

          at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:106)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

          at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

          at java.lang.Thread.run(Thread.java:745)

       

      Jan 18, 2018 10:48:26 AM org.apache.catalina.startup.HostConfig deployWAR

      INFO: Deployment of web application archive C:\dev\tomcat\apache-tomcat-8.0.18\webapps\aamva-mock-ui-1.0.0.war has finished in 36,110 ms

        • 1. Re: CDI throws exceptions during deployment on Tomcat 8
          Martin Kouba Master

          Hi Arnie,

          the root cause seems to be java.lang.reflect.MalformedParameterizedTypeException thrown when CDI attempts to obtain the java.lang.reflect.Type from a TypeLiteral. The stack also reveals that the literal is enhanced by jrebel: com.zeroturnaround.jrebelbase.facade.ac.getGenericSuperclass(SourceFile:79). I'd try to run the app without jrebel first and if it works then jrebel probably produces some malformed bytecode.

          • 2. Re: CDI throws exceptions during deployment on Tomcat 8
            Arnie Morein Novice

            I had a feeling you'd say that. Taking JRebel out of the equation yields:

             

             

             

            SEVERE: ContainerBase.addChild: start:

            org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aamva-mock-ui-1.0.0]]

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

                at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:497)

                at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

                at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

                at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

                at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

                at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

                at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                at java.lang.Thread.run(Thread.java:745)

            Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:

            Exception 0 :

            javax.enterprise.event.ObserverException

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

                at java.lang.Class.newInstance(Class.java:442)

                at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33)

                at java.security.AccessController.doPrivileged(Native Method)

                at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40)

                at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:78)

                at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:103)

                at org.jboss.weld.injection.MethodInvocationStrategy$SpecialParamPlusBeanManagerStrategy.invoke(MethodInvocationStrategy.java:144)

                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)

                at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)

                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)

                at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)

                at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)

                at org.jboss.weld.util.Observers.notify(Observers.java:166)

                at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)

                at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)

                at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)

                at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)

                at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)

                at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:44)

                at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:31)

                at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:242)

                at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:236)

                at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploySpecialized(AbstractBeanDeployer.java:111)

                at org.jboss.weld.bootstrap.BeanDeployment.deploySpecialized(BeanDeployment.java:260)

                at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:434)

                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

                at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:236)

                at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

                at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:497)

                at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

                at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

                at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

                at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

                at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

                at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                at java.lang.Thread.run(Thread.java:745)

            Caused by: java.lang.ExceptionInInitializerError

                at com.sun.faces.cdi.CdiExtension.collect(CdiExtension.java:172)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:497)

                at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)

                ... 67 more

            Caused by: java.lang.reflect.MalformedParameterizedTypeException

                at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)

                at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:51)

                at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)

                at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)

                at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)

                at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)

                at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)

                at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)

                at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)

                at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:87)

                at java.lang.Class.getGenericSuperclass(Class.java:777)

                at javax.enterprise.util.TypeLiteral.getTypeParameter(TypeLiteral.java:104)

                at javax.enterprise.util.TypeLiteral.getType(TypeLiteral.java:67)

                at com.sun.faces.cdi.CdiUtils.<clinit>(CdiUtils.java:84)

                ... 73 more

             

                at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)

                at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:31)

                at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:242)

                at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:236)

                at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploySpecialized(AbstractBeanDeployer.java:111)

                at org.jboss.weld.bootstrap.BeanDeployment.deploySpecialized(BeanDeployment.java:260)

                at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:434)

                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

                at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:236)

                at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                ... 43 more

             

            Jan 19, 2018 7:39:11 AM org.apache.catalina.startup.HostConfig deployWAR

            SEVERE: Error deploying web application archive C:\dev\tomcat\apache-tomcat-8.0.18\webapps\aamva-mock-ui-1.0.0.war

            java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aamva-mock-ui-1.0.0]]

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

                at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:497)

                at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

                at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

                at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

                at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

                at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

                at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

                at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

                at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                at java.lang.Thread.run(Thread.java:745)

             

            Jan 19, 2018 7:39:11 AM org.apache.catalina.startup.HostConfig deployWAR

            INFO: Deployment of web application archive C:\dev\tomcat\apache-tomcat-8.0.18\webapps\aamva-mock-ui-1.0.0.war has finished in 27,067 ms

            • 3. Re: CDI throws exceptions during deployment on Tomcat 8
              Arnie Morein Novice

              last of stacktrace:

               

               

               

              Caused by: java.lang.ExceptionInInitializerError

                  at com.sun.faces.cdi.CdiExtension.collect(CdiExtension.java:172)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:497)

                  at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)

                  ... 67 more

              Caused by: java.lang.reflect.MalformedParameterizedTypeException

                  at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)

                  at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:51)

                  at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)

                  at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)

                  at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)

                  at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)

                  at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)

                  at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)

                  at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)

                  at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:87)

                  at java.lang.Class.getGenericSuperclass(Class.java:777)

                  at javax.enterprise.util.TypeLiteral.getTypeParameter(TypeLiteral.java:104)

                  at javax.enterprise.util.TypeLiteral.getType(TypeLiteral.java:67)

                  at com.sun.faces.cdi.CdiUtils.<clinit>(CdiUtils.java:84)

                  ... 73 more

               

                  at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)

                  at org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl.fire(ProcessManagedBeanImpl.java:31)

                  at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:242)

                  at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessBean(ContainerLifecycleEvents.java:236)

                  at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploySpecialized(AbstractBeanDeployer.java:111)

                  at org.jboss.weld.bootstrap.BeanDeployment.deploySpecialized(BeanDeployment.java:260)

                  at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:434)

                  at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

                  at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:236)

                  at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:62)

                  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)

                  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                  ... 43 more

               

              Jan 19, 2018 7:39:11 AM org.apache.catalina.startup.HostConfig deployWAR

              SEVERE: Error deploying web application archive C:\dev\tomcat\apache-tomcat-8.0.18\webapps\aamva-mock-ui-1.0.0.war

              java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aamva-mock-ui-1.0.0]]

                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)

                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)

                  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)

                  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:461)

                  at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1493)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:497)

                  at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

                  at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

                  at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

                  at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1460)

                  at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:733)

                  at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:432)

                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                  at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)

                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)

                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)

                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)

                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

                  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)

                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)

                  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)

                  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)

                  at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)

                  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)

                  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)

                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

                  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

                  at java.lang.Thread.run(Thread.java:745)

               

              Jan 19, 2018 7:39:11 AM org.apache.catalina.startup.HostConfig deployWAR

              INFO: Deployment of web application archive C:\dev\tomcat\apache-tomcat-8.0.18\webapps\aamva-mock-ui-1.0.0.war has finished in 27,067 ms

              • 4. Re: CDI throws exceptions during deployment on Tomcat 8
                Martin Kouba Master

                Ok, so JRebel is not to blame. Could you please post the output of mvn dependency:tree?

                • 5. Re: CDI throws exceptions during deployment on Tomcat 8
                  Arnie Morein Novice

                  [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ aamva-mock-ui ---

                  [INFO] a.b.c.dls.vls:aamva-mock-ui:war:1.0.0

                  [INFO] +- com.h2database:h2:jar:1.4.196:compile

                  [INFO] +- a.b.c.itd.maven:jboss-hibernate:jar:1.0.0:compile

                  [INFO] |  +- antlr:antlr:jar:2.7.7:compile

                  [INFO] |  +- javax:javaee-api:jar:7.0:compile

                  [INFO] |  |  \- com.sun.mail:javax.mail:jar:1.6.0:compile

                  [INFO] |  +- javax.persistence:javax.persistence-api:jar:2.2:compile

                  [INFO] |  +- org.hibernate:hibernate-core:jar:5.2.12.Final:compile

                  [INFO] |  |  +- org.jboss:jandex:jar:2.0.3.Final:compile

                  [INFO] |  |  \- com.fasterxml:classmate:jar:1.3.0:compile

                  [INFO] |  +- org.javassist:javassist:jar:3.21.0-GA:compile

                  [INFO] |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile

                  [INFO] |  |  \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile

                  [INFO] |  +- org.hibernate:hibernate-envers:jar:5.2.12.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-jpamodelgen:jar:5.2.12.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-search-engine:jar:5.8.2.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-search-orm:jar:5.8.2.Final:compile

                  [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-validator:jar:5.4.2.Final:compile

                  [INFO] |  |  \- javax.validation:validation-api:jar:1.1.0.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-validator-cdi:jar:5.4.2.Final:compile

                  [INFO] |  +- org.hibernate:hibernate-validator-annotation-processor:jar:5.4.2.Final:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-common:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-icu:jar:5.5.4:compile

                  [INFO] |  |  \- com.ibm.icu:icu4j:jar:54.1:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-kuromoji:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-morfologik:jar:5.5.4:compile

                  [INFO] |  |  +- org.carrot2:morfologik-fsa:jar:2.0.1:compile

                  [INFO] |  |  +- org.carrot2:morfologik-polish:jar:2.0.1:compile

                  [INFO] |  |  \- org.carrot2:morfologik-stemming:jar:2.0.1:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-phonetic:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-smartcn:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-stempel:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-analyzers-uima:jar:5.5.4:compile

                  [INFO] |  |  +- org.apache.uima:Tagger:jar:2.3.1:compile

                  [INFO] |  |  +- org.apache.uima:WhitespaceTokenizer:jar:2.3.1:compile

                  [INFO] |  |  \- org.apache.uima:uimaj-core:jar:2.3.1:compile

                  [INFO] |  +- org.apache.lucene:lucene-backward-codecs:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-benchmark:jar:5.5.4:compile

                  [INFO] |  |  +- org.apache.lucene:lucene-spatial:jar:5.5.4:compile

                  [INFO] |  |  +- com.spatial4j:spatial4j:jar:0.5:compile

                  [INFO] |  |  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.17:compile

                  [INFO] |  |  +- org.apache.commons:commons-compress:jar:1.8.1:compile

                  [INFO] |  |  \- xerces:xercesImpl:jar:2.11.0.SP5:compile

                  [INFO] |  +- org.apache.lucene:lucene-classification:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-codecs:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-core:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-demo:jar:5.5.4:compile

                  [INFO] |  |  +- javax.servlet:servlet-api:jar:2.4:compile

                  [INFO] |  |  +- org.antlr:antlr4-runtime:jar:4.5.1-1:compile

                  [INFO] |  |  +- org.ow2.asm:asm:jar:5.0.4:compile

                  [INFO] |  |  \- org.ow2.asm:asm-commons:jar:5.0.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-expressions:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-facet:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-grouping:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-highlighter:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-join:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-memory:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-misc:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-queries:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-queryparser:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-replicator:jar:5.5.4:compile

                  [INFO] |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided

                  [INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.4.1:compile

                  [INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:compile

                  [INFO] |  |  +- org.eclipse.jetty:jetty-continuation:jar:9.2.13.v20150730:compile

                  [INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.2.13.v20150730:compile

                  [INFO] |  |  +- org.eclipse.jetty:jetty-io:jar:9.2.13.v20150730:compile

                  [INFO] |  |  +- org.eclipse.jetty:jetty-server:jar:9.2.13.v20150730:compile

                  [INFO] |  |  +- org.eclipse.jetty:jetty-servlet:jar:9.2.13.v20150730:compile

                  [INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:9.2.13.v20150730:compile

                  [INFO] |  +- org.apache.lucene:lucene-sandbox:jar:5.5.4:compile

                  [INFO] |  |  \- jakarta-regexp:jakarta-regexp:jar:1.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-spatial3d:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-suggest:jar:5.5.4:compile

                  [INFO] |  +- org.apache.lucene:lucene-test-framework:jar:5.5.4:compile

                  [INFO] |  |  \- com.carrotsearch.randomizedtesting:randomizedtesting-runner:jar:2.3.2:compile

                  [INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile

                  [INFO] |  \- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile

                  [INFO] +- a.b.c.itd.maven:jsf-primefaces:jar:1.0.1:compile

                  [INFO] |  +- commons-fileupload:commons-fileupload:jar:1.3.3:compile

                  [INFO] |  +- commons-io:commons-io:jar:2.5:compile

                  [INFO] |  +- com.lowagie:itext:jar:2.1.7:compile

                  [INFO] |  +- net.glxn:qrgen:jar:1.4:compile

                  [INFO] |  |  \- com.google.zxing:javase:jar:3.0.0:compile

                  [INFO] |  |     \- com.google.zxing:core:jar:3.0.0:compile

                  [INFO] |  +- net.sf.barcode4j:barcode4j-light:jar:2.0:compile

                  [INFO] |  +- org.primefaces:primefaces:jar:6.1:compile

                  [INFO] |  +- org.primefaces.extensions:primefaces-extensions:jar:6.1.1:compile

                  [INFO] |  |  \- com.google.code.gson:gson:jar:2.2.4:compile

                  [INFO] |  +- org.primefaces.themes:all-themes:jar:1.0.10:compile

                  [INFO] |  +- org.atmosphere:atmosphere-runtime:jar:2.4.13:compile

                  [INFO] |  +- org.atmosphere:atmosphere-annotations:jar:2.4.13:compile

                  [INFO] |  +- rome:rome:jar:1.0:compile

                  [INFO] |  |  \- jdom:jdom:jar:1.0:compile

                  [INFO] |  \- a.b.c.itd.maven:apache-poi:jar:1.0.0:compile

                  [INFO] |     +- org.apache.poi:poi:jar:3.16:compile

                  [INFO] |     +- org.apache.poi:poi-ooxml:jar:3.16:compile

                  [INFO] |     |  \- com.github.virtuald:curvesapi:jar:1.04:compile

                  [INFO] |     \- org.apache.poi:poi-ooxml-schemas:jar:3.16:compile

                  [INFO] |        \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile

                  [INFO] |           \- stax:stax-api:jar:1.0.1:compile

                  [INFO] +- com.logipath.library:logipath-cdi:jar:1.0.1:compile

                  [INFO] |  +- com.itextpdf:itextpdf:jar:5.5.10:compile

                  [INFO] |  +- com.itextpdf:itext-pdfa:jar:5.5.10:compile

                  [INFO] |  +- com.itextpdf.tool:xmlworker:jar:5.5.10:compile

                  [INFO] |  +- org.bouncycastle:bcpg-jdk15on:jar:1.52:compile

                  [INFO] |  +- org.bouncycastle:bcpkix-jdk15on:jar:1.52:compile

                  [INFO] |  +- org.bouncycastle:bcprov-ext-jdk15on:jar:1.52:compile

                  [INFO] |  +- org.bouncycastle:bcprov-jdk15on:jar:1.52:compile

                  [INFO] |  +- org.bouncycastle:bctsp-jdk15on:jar:1.46:compile

                  [INFO] |  |  \- org.bouncycastle:bcmail-jdk15on:jar:1.46:compile

                  [INFO] |  \- org.apache.commons:commons-lang3:jar:3.6:compile

                  [INFO] +- com.logipath.library:logipath-db-utilities:jar:1.0.1:compile

                  [INFO] +- junit:junit:jar:4.12:compile

                  [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile

                  [INFO] +- a.b.c.itd.maven:apache-commons:jar:1.0.0:compile

                  [INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.3:compile

                  [INFO] |  +- commons-codec:commons-codec:jar:1.4:compile

                  [INFO] |  +- commons-dbcp:commons-dbcp:jar:1.4:compile

                  [INFO] |  |  \- commons-pool:commons-pool:jar:1.5.4:compile

                  [INFO] |  +- org.apache.commons:commons-collections4:jar:4.1:compile

                  [INFO] |  +- org.apache.commons:commons-csv:jar:1.2:compile

                  [INFO] |  +- org.apache.commons:commons-dbcp2:jar:2.2.0:compile

                  [INFO] |  |  \- org.apache.commons:commons-pool2:jar:2.5.0:compile

                  [INFO] |  +- commons-logging:commons-logging:jar:1.2:compile

                  [INFO] |  \- commons-validator:commons-validator:jar:1.5.1:compile

                  [INFO] |     +- commons-digester:commons-digester:jar:1.8.1:compile

                  [INFO] |     \- commons-collections:commons-collections:jar:3.2.2:compile

                  [INFO] +- a.b.c.itd.maven:logging:jar:1.0.0:compile

                  [INFO] |  +- org.apache.logging.log4j:log4j-1.2-api:jar:2.8:compile

                  [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.8:compile

                  [INFO] |  +- org.apache.logging.log4j:log4j-core:jar:2.8.2:compile

                  [INFO] |  +- org.apache.logging.log4j:log4j-web:jar:2.8:compile

                  [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.23:compile

                  [INFO] |  +- org.slf4j:slf4j-log4j12:jar:1.7.23:compile

                  [INFO] |  |  \- log4j:log4j:jar:1.2.17:compile

                  [INFO] |  \- org.slf4j:slf4j-api:jar:1.7.23:compile

                  [INFO] +- a.b.c.itd.maven:java-xml:jar:1.0.0:compile

                  [INFO] |  +- com.sun.xml.bind:jaxb-core:jar:2.2.11:compile

                  [INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile

                  [INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile

                  [INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile

                  [INFO] |  +- javax.xml.parsers:jaxp-api:jar:1.4.5:compile

                  [INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile

                  [INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile

                  [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.13:compile

                  [INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.9:compile

                  [INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.9:compile

                  [INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile

                  [INFO] |  +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.9:compile

                  [INFO] |  +- org.codehaus.jackson:jackson-xc:jar:1.9.13:compile

                  [INFO] |  +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile

                  [INFO] |  +- org.dom4j:dom4j:jar:2.0.1:compile

                  [INFO] |  |  \- jaxen:jaxen:jar:1.1.6:compile

                  [INFO] |  +- org.jboss.resteasy:resteasy-jaxrs:jar:3.1.4.Final:compile

                  [INFO] |  |  +- org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:jar:1.0.1.Beta1:compile

                  [INFO] |  |  +- org.jboss.resteasy:resteasy-jaxrs-services:jar:3.1.4.Final:compile

                  [INFO] |  |  +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final:compile

                  [INFO] |  |  +- javax.activation:activation:jar:1.1.1:compile

                  [INFO] |  |  \- net.jcip:jcip-annotations:jar:1.0:compile

                  [INFO] |  +- org.jboss.resteasy:resteasy-client:jar:3.1.4.Final:compile

                  [INFO] |  +- org.jboss.resteasy:resteasy-jaxb-provider:jar:3.1.4.Final:compile

                  [INFO] |  +- org.jboss.resteasy:jaxrs-api:jar:3.0.12.Final:compile

                  [INFO] |  +- org.jboss.resteasy:resteasy-multipart-provider:jar:3.1.4.Final:compile

                  [INFO] |  |  \- org.apache.james:apache-mime4j:jar:0.6:compile

                  [INFO] |  \- sax:sax:jar:2.0.1:compile

                  [INFO] +- a.b.c.itd.maven:javax-cdi:jar:1.0.1:compile

                  [INFO] |  +- javax.ejb:javax.ejb-api:jar:3.2:compile

                  [INFO] |  |  \- javax.transaction:javax.transaction-api:jar:1.2:compile

                  [INFO] |  +- javax.enterprise:cdi-api:jar:2.0:compile

                  [INFO] |  |  +- javax.el:javax.el-api:jar:2.2.5:compile

                  [INFO] |  |  +- javax.interceptor:javax.interceptor-api:jar:1.2:compile

                  [INFO] |  |  \- javax.inject:javax.inject:jar:1:compile

                  [INFO] |  +- org.jboss.weld:weld-api:jar:3.0.SP2:compile

                  [INFO] |  \- org.jboss.weld.servlet:weld-servlet-core:jar:3.0.2.Final:compile

                  [INFO] |     +- org.jboss.weld.environment:weld-environment-common:jar:3.0.2.Final:compile

                  [INFO] |     |  \- org.jboss.weld:weld-core-impl:jar:3.0.2.Final:compile

                  [INFO] |     |     +- javax.annotation:javax.annotation-api:jar:1.2:compile

                  [INFO] |     |     \- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec:jar:1.0.0.Final:compile

                  [INFO] |     +- org.jboss.weld:weld-spi:jar:3.0.SP2:compile

                  [INFO] |     +- org.jboss.weld.module:weld-jsf:jar:3.0.2.Final:compile

                  [INFO] |     +- org.jboss.weld.module:weld-web:jar:3.0.2.Final:compile

                  [INFO] |     +- org.jboss.spec.javax.el:jboss-el-api_3.0_spec:jar:1.0.7.Final:compile

                  [INFO] |     \- org.jboss.classfilewriter:jboss-classfilewriter:jar:1.2.1.Final:compile

                  [INFO] +- javax.faces:javax.faces-api:jar:2.3:compile

                  [INFO] \- org.glassfish:javax.faces:jar:2.3.3:compile

                  [INFO] ------------------------------------------------------------------------

                  [INFO] BUILD SUCCESS

                  [INFO] ------------------------------------------------------------------------

                  • 6. Re: CDI throws exceptions during deployment on Tomcat 8
                    Martin Kouba Master

                    Your pom contains javax.faces:javax.faces-api and org.glassfish:javax.faces which also bundles JSF API classes. I'm not sure if it helps but it's worth a try

                    • 7. Re: CDI throws exceptions during deployment on Tomcat 8
                      Arnie Morein Novice

                      I thought the former was just the API and the latter the implementation.

                       

                      Removing both results in a different exception:

                       

                      SEVERE: Servlet [Faces Servlet] in web application [/aamva-mock-ui-1.0.0] threw load() exception

                      java.util.MissingResourceException: Can't find javax.faces.LogStrings bundle

                          at java.util.logging.Logger.setupResourceInfo(Logger.java:1945)

                          at java.util.logging.Logger.<init>(Logger.java:380)

                          at java.util.logging.LogManager.demandLogger(LogManager.java:554)

                          at java.util.logging.Logger.demandLogger(Logger.java:455)

                          at java.util.logging.Logger.getLogger(Logger.java:553)

                          at javax.faces.webapp.FacesServlet.<clinit>(FacesServlet.java:274)

                       

                      I found this site (https://javaee.github.io/javaserverfaces-spec/) and installed the org.glassfish::javax.faces module.

                       

                      No change to the error.

                      • 8. Re: CDI throws exceptions during deployment on Tomcat 8
                        Arnie Morein Novice

                        I took my app and removed ALL code, ALL xhtml files, etc. and have a WAR with just a META-INF, WEB-INF folders and subfolders.

                         

                        The same error happens. I tried changing the log4j2.xml file to show more detail from the reflect etc classes but no luck.

                        • 9. Re: CDI throws exceptions during deployment on Tomcat 8
                          Martin Kouba Master

                          AFAIK MalformedParameterizedTypeException is usually thrown if multiple incompatible class definitions are on the class path. In this case, there is an incompatible change in JSF 2.3 - javax.faces.convert.Converter is now a parameterized type! Generaly speking it should not cause problems here because the TypeLiteral is defined in JSF 2.3 impl. But it seems there is some older JSF API on the class path. Unforunately, you project contains a lot of dependencies and so it's not easy to find it. I would try to analyze the dependency tree and also shared libraries.

                          • 10. Re: CDI throws exceptions during deployment on Tomcat 8
                            Arnie Morein Novice

                            Yes, but currently, this test project has NO custom code, NO xhtml files, no JSF xml files (beyond a minimal one that defines EN as the language code), and STILL the error persists. I just down-graded to Weld 2.4.6.Final with no change to the error shown (see tree below). The error isn't in anything I have written; supplied maybe, but not written. I have included the latest (2.3) JSF. If CDI is blowing up on a class it is finding on the classpath, just how am I to determine which one????

                             

                            [INFO] Scanning for projects...

                            [INFO]                                                                        

                            [INFO] ------------------------------------------------------------------------

                            [INFO] Building AAMVA Mock Web Service UI 1.0.0

                            [INFO] ------------------------------------------------------------------------

                            [INFO]

                            [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ aamva-mock-ui-test ---

                            [INFO] a.b.c.dls.vls:aamva-mock-ui-test:war:1.0.0

                            [INFO] +- com.h2database:h2:jar:1.4.196:compile

                            [INFO] +- a.b.c.itd.maven:jboss-hibernate:jar:1.0.0:compile

                            [INFO] |  +- antlr:antlr:jar:2.7.7:compile

                            [INFO] |  +- javax:javaee-api:jar:7.0:compile

                            [INFO] |  +- javax.persistence:javax.persistence-api:jar:2.2:compile

                            [INFO] |  +- javax.validation:validation-api:jar:2.0.1.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-core:jar:5.2.12.Final:compile

                            [INFO] |  |  +- org.jboss:jandex:jar:2.0.3.Final:compile

                            [INFO] |  |  \- com.fasterxml:classmate:jar:1.3.0:compile

                            [INFO] |  +- org.javassist:javassist:jar:3.21.0-GA:compile

                            [INFO] |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile

                            [INFO] |  |  \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile

                            [INFO] |  +- org.hibernate:hibernate-envers:jar:5.2.12.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-jpamodelgen:jar:5.2.12.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-search-engine:jar:5.8.2.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-search-orm:jar:5.8.2.Final:compile

                            [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-validator:jar:5.4.2.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-validator-cdi:jar:5.4.2.Final:compile

                            [INFO] |  +- org.hibernate:hibernate-validator-annotation-processor:jar:5.4.2.Final:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-common:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-icu:jar:5.5.4:compile

                            [INFO] |  |  \- com.ibm.icu:icu4j:jar:54.1:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-kuromoji:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-morfologik:jar:5.5.4:compile

                            [INFO] |  |  +- org.carrot2:morfologik-fsa:jar:2.0.1:compile

                            [INFO] |  |  +- org.carrot2:morfologik-polish:jar:2.0.1:compile

                            [INFO] |  |  \- org.carrot2:morfologik-stemming:jar:2.0.1:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-phonetic:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-smartcn:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-stempel:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-analyzers-uima:jar:5.5.4:compile

                            [INFO] |  |  +- org.apache.uima:Tagger:jar:2.3.1:compile

                            [INFO] |  |  +- org.apache.uima:WhitespaceTokenizer:jar:2.3.1:compile

                            [INFO] |  |  \- org.apache.uima:uimaj-core:jar:2.3.1:compile

                            [INFO] |  +- org.apache.lucene:lucene-backward-codecs:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-benchmark:jar:5.5.4:compile

                            [INFO] |  |  +- org.apache.lucene:lucene-spatial:jar:5.5.4:compile

                            [INFO] |  |  +- com.spatial4j:spatial4j:jar:0.5:compile

                            [INFO] |  |  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.17:compile

                            [INFO] |  |  +- org.apache.commons:commons-compress:jar:1.8.1:compile

                            [INFO] |  |  \- xerces:xercesImpl:jar:2.11.0.SP5:compile

                            [INFO] |  +- org.apache.lucene:lucene-classification:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-codecs:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-core:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-demo:jar:5.5.4:compile

                            [INFO] |  |  +- org.antlr:antlr4-runtime:jar:4.5.1-1:compile

                            [INFO] |  |  +- org.ow2.asm:asm:jar:5.0.4:compile

                            [INFO] |  |  \- org.ow2.asm:asm-commons:jar:5.0.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-expressions:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-facet:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-grouping:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-highlighter:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-join:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-memory:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-misc:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-queries:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-queryparser:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-sandbox:jar:5.5.4:compile

                            [INFO] |  |  \- jakarta-regexp:jakarta-regexp:jar:1.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-spatial3d:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-suggest:jar:5.5.4:compile

                            [INFO] |  +- org.apache.lucene:lucene-test-framework:jar:5.5.4:compile

                            [INFO] |  |  \- com.carrotsearch.randomizedtesting:randomizedtesting-runner:jar:2.3.2:compile

                            [INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile

                            [INFO] |  \- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.1.Final:compile

                            [INFO] +- a.b.c.itd.maven:jsf-primefaces:jar:1.0.1:compile

                            [INFO] |  +- commons-fileupload:commons-fileupload:jar:1.3.3:compile

                            [INFO] |  +- commons-io:commons-io:jar:2.5:compile

                            [INFO] |  +- com.lowagie:itext:jar:2.1.7:compile

                            [INFO] |  +- com.sun.mail:javax.mail:jar:1.6.0:compile

                            [INFO] |  |  \- javax.activation:activation:jar:1.1.1:compile

                            [INFO] |  +- a.b.c.itd.maven:apache-poi:jar:1.0.0:compile

                            [INFO] |  |  +- org.apache.poi:poi:jar:3.16:compile

                            [INFO] |  |  +- org.apache.poi:poi-ooxml:jar:3.16:compile

                            [INFO] |  |  |  \- com.github.virtuald:curvesapi:jar:1.04:compile

                            [INFO] |  |  \- org.apache.poi:poi-ooxml-schemas:jar:3.16:compile

                            [INFO] |  |     \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile

                            [INFO] |  |        \- stax:stax-api:jar:1.0.1:compile

                            [INFO] |  +- javax.faces:javax.faces-api:jar:2.3:compile

                            [INFO] |  +- javax.servlet:jstl:jar:1.2:compile

                            [INFO] |  +- net.glxn:qrgen:jar:1.4:compile

                            [INFO] |  |  \- com.google.zxing:javase:jar:3.0.0:compile

                            [INFO] |  |     \- com.google.zxing:core:jar:3.0.0:compile

                            [INFO] |  +- net.sf.barcode4j:barcode4j-light:jar:2.0:compile

                            [INFO] |  +- org.atmosphere:atmosphere-runtime:jar:2.4.13:compile

                            [INFO] |  +- org.atmosphere:atmosphere-annotations:jar:2.4.13:compile

                            [INFO] |  +- org.glassfish:javax.faces:jar:2.3.3:compile

                            [INFO] |  +- org.primefaces:primefaces:jar:6.1:compile

                            [INFO] |  +- org.primefaces.extensions:primefaces-extensions:jar:6.1.1:compile

                            [INFO] |  |  \- com.google.code.gson:gson:jar:2.2.4:compile

                            [INFO] |  +- org.primefaces.themes:all-themes:jar:1.0.10:compile

                            [INFO] |  \- rome:rome:jar:1.0:compile

                            [INFO] |     \- jdom:jdom:jar:1.0:compile

                            [INFO] +- junit:junit:jar:4.12:compile

                            [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile

                            [INFO] +- a.b.c.itd.maven:apache-commons:jar:1.0.1:compile

                            [INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.3:compile

                            [INFO] |  +- commons-codec:commons-codec:jar:1.4:compile

                            [INFO] |  +- org.apache.commons:commons-collections4:jar:4.1:compile

                            [INFO] |  +- org.apache.commons:commons-csv:jar:1.2:compile

                            [INFO] |  +- org.apache.commons:commons-dbcp2:jar:2.2.0:compile

                            [INFO] |  |  \- org.apache.commons:commons-pool2:jar:2.5.0:compile

                            [INFO] |  +- org.apache.commons:commons-lang3:jar:3.6:compile

                            [INFO] |  +- commons-logging:commons-logging:jar:1.2:compile

                            [INFO] |  \- commons-validator:commons-validator:jar:1.5.1:compile

                            [INFO] |     +- commons-digester:commons-digester:jar:1.8.1:compile

                            [INFO] |     \- commons-collections:commons-collections:jar:3.2.2:compile

                            [INFO] +- a.b.c.itd.maven:logging:jar:1.0.0:compile

                            [INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile

                            [INFO] |  +- org.apache.logging.log4j:log4j-core:jar:2.10.0:compile

                            [INFO] |  +- org.apache.logging.log4j:log4j-web:jar:2.10.0:compile

                            [INFO] |  \- org.slf4j:slf4j-api:jar:1.7.23:compile

                            [INFO] +- a.b.c.itd.maven:java-xml:jar:1.0.0:compile

                            [INFO] |  +- com.sun.xml.bind:jaxb-core:jar:2.2.11:compile

                            [INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile

                            [INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile

                            [INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile

                            [INFO] |  +- javax.xml.parsers:jaxp-api:jar:1.4.5:compile

                            [INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile

                            [INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile

                            [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.13:compile

                            [INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.9:compile

                            [INFO] |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.9:compile

                            [INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile

                            [INFO] |  +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.9:compile

                            [INFO] |  +- org.codehaus.jackson:jackson-xc:jar:1.9.13:compile

                            [INFO] |  +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile

                            [INFO] |  +- org.dom4j:dom4j:jar:2.0.1:compile

                            [INFO] |  |  \- jaxen:jaxen:jar:1.1.6:compile

                            [INFO] |  +- org.jboss.resteasy:resteasy-jaxrs:jar:3.1.4.Final:compile

                            [INFO] |  |  +- org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:jar:1.0.1.Beta1:compile

                            [INFO] |  |  +- org.jboss.resteasy:resteasy-jaxrs-services:jar:3.1.4.Final:compile

                            [INFO] |  |  +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final:compile

                            [INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile

                            [INFO] |  |  |  \- org.apache.httpcomponents:httpcore:jar:4.4.4:compile

                            [INFO] |  |  \- net.jcip:jcip-annotations:jar:1.0:compile

                            [INFO] |  +- org.jboss.resteasy:resteasy-client:jar:3.1.4.Final:compile

                            [INFO] |  +- org.jboss.resteasy:resteasy-jaxb-provider:jar:3.1.4.Final:compile

                            [INFO] |  +- org.jboss.resteasy:jaxrs-api:jar:3.0.12.Final:compile

                            [INFO] |  +- org.jboss.resteasy:resteasy-multipart-provider:jar:3.1.4.Final:compile

                            [INFO] |  |  \- org.apache.james:apache-mime4j:jar:0.6:compile

                            [INFO] |  \- sax:sax:jar:2.0.1:compile

                            [INFO] \- a.b.c.itd.maven:javax-cdi:jar:1.0.1:compile

                            [INFO]    +- javax.ejb:javax.ejb-api:jar:3.2:compile

                            [INFO]    |  \- javax.transaction:javax.transaction-api:jar:1.2:compile

                            [INFO]    +- javax.enterprise:cdi-api:jar:1.2:compile

                            [INFO]    |  +- javax.el:javax.el-api:jar:2.2.5:compile

                            [INFO]    |  +- javax.interceptor:javax.interceptor-api:jar:1.2:compile

                            [INFO]    |  \- javax.inject:javax.inject:jar:1:compile

                            [INFO]    +- org.jboss.weld:weld-api:jar:2.4.SP2:compile

                            [INFO]    +- org.jboss.weld:weld-core:jar:2.4.6.Final:compile

                            [INFO]    |  +- org.jboss.classfilewriter:jboss-classfilewriter:jar:1.1.2.Final:compile

                            [INFO]    |  +- org.jboss.spec.javax.el:jboss-el-api_3.0_spec:jar:1.0.0.Alpha1:compile

                            [INFO]    |  \- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec:jar:1.0.0.Final:compile

                            [INFO]    +- org.jboss.weld:weld-core-impl:jar:2.4.6.Final:compile

                            [INFO]    +- org.jboss.weld:weld-core-jsf:jar:2.4.6.Final:compile

                            [INFO]    +- org.jboss.weld.environment:weld-environment-common:jar:2.4.6.Final:compile

                            [INFO]    +- org.jboss.weld.probe:weld-probe-core:jar:2.4.6.Final:compile

                            [INFO]    +- org.jboss.weld.servlet:weld-servlet-core:jar:2.4.6.Final:compile

                            [INFO]    \- org.jboss.weld:weld-spi:jar:2.4.SP2:compile

                            [INFO] ------------------------------------------------------------------------

                            [INFO] BUILD SUCCESS

                            [INFO] ------------------------------------------------------------------------

                            [INFO] Total time: 2.783 s

                            [INFO] Finished at: 2018-01-22T08:23:51-06:00

                            [INFO] Final Memory: 31M/434M

                            [INFO] ------------------------------------------------------------------------

                            • 11. Re: CDI throws exceptions during deployment on Tomcat 8
                              Martin Kouba Master

                              Yes, the error is not in your code but in the class path configuration. And it actually does not blow up in CDI but in JSF 2.3 class which attempts to create a type literal. By the way, a.b.c.itd.maven:jsf-primefaces still brings in the JSF 2.3 API artifact. You may try to import your project in your IDE and lookup javax.faces.convert.Converter class - you should see all the artifacts from the classpath which contain this class.

                              • 12. Re: CDI throws exceptions during deployment on Tomcat 8
                                Arnie Morein Novice

                                You were right, the error was in JSF 2.3 implementation. Downgrading to 2.2.15 removes the error. I'll let them know.

                                 

                                Thanks for the guidance.