Getting exceptions in using TOMEE

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting exceptions in using TOMEE

Karen Goh
Hi,

I am a beginner in using tomEE.  So, I'd like to check if there is any conflicts in the dependencies I used.

Basically, I would like to use CDI for dependency injection.

This is a Maven based java web app with DAO design design pattern cum MVC.

Here's the exception I received :

SEVERE: CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
        at org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
        at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
        at org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
        at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
        at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
        ... 17 more

Dec 19, 2018 4:05:44 PM org.apache.tomee.catalina.TomcatWebAppBuilder startInternal
SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]
javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansDeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
        ... 15 more
Caused by: org.apache.webbeans.exception.WebBeansDeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
        ... 16 more
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
        at org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
        at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
        at org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
        at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
        at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
        ... 17 more

Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: ContainerBase.removeChild: destroy:
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]] in state [STARTING_PREP]
        at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
        at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1627)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1607)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1307)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        ... 6 more
Caused by: org.apache.tomee.catalina.TomEERuntimeException: javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1310)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 more
Caused by: javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
        ... 11 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansDeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
        ... 15 more
Caused by: org.apache.webbeans.exception.WebBeansDeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
        ... 16 more
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [model.Subject] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  subjt, Bean Owner : [Tutor, WebBeansType:MANAGED, Name:null, API Types:[model.Tutor,java.lang.Object,java.io.Serializable], Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
        at org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
        at org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
        at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
        at org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
        at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
        at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
        ... 17 more

Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
        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:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 more

Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
        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:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 11 more

And here's my pom.xml

<build>
                <finalName>webApp-hi5</finalName>
                <resources>
                        <resource>
                                <directory>src/main/webapp</directory>
                        </resource>
                </resources>
                <pluginManagement><!-- lock down plugins versions to avoid using Maven
                                defaults (may be moved to parent pom) -->
                        <plugins>
                                <plugin>
                                        <artifactId>maven-clean-plugin</artifactId>
                                        <version>3.0.0</version>
                                </plugin>
                                <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
                                <plugin>
                                        <artifactId>maven-resources-plugin</artifactId>
                                        <version>3.0.2</version>
                                </plugin>
                                <plugin>
                                        <artifactId>maven-compiler-plugin</artifactId>
                                        <version>3.7.0</version>
                                </plugin>
                                <plugin>
                                        <artifactId>maven-surefire-plugin</artifactId>
                                        <version>2.20.1</version>
                                </plugin>
                                <plugin>
                                        <artifactId>maven-war-plugin</artifactId>
                                        <version>3.2.0</version>
                                        <configuration>
                                                <warName>webApp-hi5</warName>
                                        </configuration>
                                </plugin>
                                <plugin>
                                        <artifactId>maven-install-plugin</artifactId>
                                        <version>2.5.2</version>
                                </plugin>
                                <plugin>
                                        <artifactId>maven-deploy-plugin</artifactId>
                                        <version>2.8.2</version>
                                </plugin>
                        </plugins>
                </pluginManagement>
        </build>
        <dependencies>
                <dependency>
                        <groupId>javax.servlet.jsp</groupId>
                        <artifactId>javax.servlet.jsp-api</artifactId>
                        <version>2.3.1</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>jsp-api</artifactId>
                        <version>2.0</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/javax.inject/javax.inject -->
                <dependency>
                        <groupId>javax.inject</groupId>
                        <artifactId>javax.inject</artifactId>
                        <version>1</version>
                </dependency>
                <dependency>
                        <groupId>jstl</groupId>
                        <artifactId>jstl</artifactId>
                        <scope>provided</scope>
                        <version>1.2</version>
                </dependency>
                <!-- LOG4J for JDBC -->
                <dependency>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-core</artifactId>
                        <version>2.11.1</version>
                </dependency>
                <dependency>
                        <groupId>javax.enterprise</groupId>
                        <artifactId>cdi-api</artifactId>
                        <version>2.0</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>8.0.13</version>
                        <scope>provided</scope>
                </dependency>
                <!-- https://mvnrepository.com/artifact/org.apache.tomee/openejb-core -->
                <dependency>
                        <groupId>org.apache.tomee</groupId>
                        <artifactId>openejb-core</artifactId>
                        <version>8.0.0-M1</version>
                </dependency>
                <dependency>
                        <groupId>org.jboss.weld.servlet</groupId>
                        <artifactId>weld-servlet</artifactId>
                        <version>2.4.5.Final</version>
                        <scope>runtime</scope>
                </dependency>
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                        <version>3.1.0</version>
                        <scope>provided</scope>
                </dependency>
                <!-- https://mvnrepository.com/artifact/com.googlecode.log4jdbc/log4jdbc -->
                <dependency>
                        <groupId>com.googlecode.log4jdbc</groupId>
                        <artifactId>log4jdbc</artifactId>
                        <version>1.2</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
                <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
                <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>1.7.25</version>
                </dependency>

                <dependency>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-slf4j-impl</artifactId>
                        <version>2.11.1</version>
                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>4.11</version>
                        <scope>test</scope>
                </dependency>
                <!-- https://mvnrepository.com/artifact/javax/javaee-api -->
                <dependency>
                        <groupId>javax</groupId>
                        <artifactId>javaee-api</artifactId>
                        <version>8.0</version>
                        <scope>provided</scope>
                </dependency>
        </dependencies>
</project>
Tks.
Reply | Threaded
Open this post in threaded view
|

Re: Getting exceptions in using TOMEE

Luis Rodríguez Fernández
Hello Karen,

mmm, perhaps you could provide some more details about your setup, like
java and tomee version. I can see that you are using javaee-api 8.0 and
openejb 8.0.0-M1, so I assume that you are tomee-8-1 [1] :)

I am not sure if it is going to solve your issue, but as you are already
declaring...

                <dependency>
                        <groupId>javax</groupId>
                        <artifactId>javaee-api</artifactId>
                        <version>8.0</version>
                        <scope>provided</scope>
                </dependency>

... perhaps you could delete some of the others, like the cdi-api 2.0.
Probably just with the javaee-api one + junit and the specific login ones
could be enough.

You mentioned MVC, perhaps the microprofile is enough then for you.

Hope it helps,

Luis

[1] https://www.tomitribe.com/blog/tomee-announcing-tomee-8-m1/









El mié., 19 dic. 2018 a las 9:20, Karen Goh (<[hidden email]>)
escribió:

> Hi,
>
> I am a beginner in using tomEE.  So, I'd like to check if there is any
> conflicts in the dependencies I used.
>
> Basically, I would like to use CDI for dependency injection.
>
> This is a Maven based java web app with DAO design design pattern cum MVC.
>
> Here's the exception I received :
>
> SEVERE: CDI Beans module deployment failed
> org.apache.webbeans.exception.WebBeansDeploymentException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
>         at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
>         at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
>         at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
> type [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
>         at
> org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
>         at
> org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
>         at
> org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
>         at
> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
>         at
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
>         at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
>         ... 17 more
>
> Dec 19, 2018 4:05:44 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> startInternal
> SEVERE: Unable to deploy collapsed ear in war
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]
> javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
>         at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
>         at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.openejb.OpenEJBRuntimeException:
> org.apache.webbeans.exception.WebBeansDeploymentException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
>         at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
>         ... 15 more
> Caused by: org.apache.webbeans.exception.WebBeansDeploymentException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
>         at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
>         ... 16 more
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
> type [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
>         at
> org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
>         at
> org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
>         at
> org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
>         at
> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
>         at
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
>         at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
>         ... 17 more
>
> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
> SEVERE: ContainerBase.removeChild: destroy:
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition
> was attempted ([before_destroy]) for component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
> in state [STARTING_PREP]
>         at
> org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402)
>         at
> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
>         at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1627)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1607)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1307)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
>
> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
> SEVERE: A child container failed during start
> java.util.concurrent.ExecutionException:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
>         at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>         at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>         at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
>         at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>         ... 6 more
> Caused by: org.apache.tomee.catalina.TomEERuntimeException:
> javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1310)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>         at
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 6 more
> Caused by: javax.enterprise.inject.spi.DeploymentException: couldn't start
> owb context
>         at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
>         at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
>         at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>         at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
>         ... 11 more
> Caused by: org.apache.openejb.OpenEJBRuntimeException:
> org.apache.webbeans.exception.WebBeansDeploymentException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
>         at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
>         ... 15 more
> Caused by: org.apache.webbeans.exception.WebBeansDeploymentException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
>         at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
>         ... 16 more
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
> type [model.Subject] is not found with the qualifiers
> Qualifiers: [@javax.enterprise.inject.Default()]
> for injection into Field Injection Point, field name :  subjt, Bean Owner
> : [Tutor, WebBeansType:MANAGED, Name:null, API
> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>         at
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
>         at
> org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
>         at
> org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
>         at
> org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
>         at
> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
>         at
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
>         at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
>         ... 17 more
>
> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
> SEVERE: A child container failed during start
> java.util.concurrent.ExecutionException:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost]]
>         at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>         at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>         at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
>         at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
>         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:498)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component [StandardEngine[Catalina].StandardHost[localhost]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>         at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.catalina.LifecycleException: A child container
> failed during start
>         at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
>         at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 6 more
>
> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
> SEVERE: The required Server component failed to start so Tomcat is unable
> to start.
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardServer[8005]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
>         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:498)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component [StandardService[Catalina]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>         at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 7 more
> Caused by: org.apache.catalina.LifecycleException: Failed to start
> component [StandardEngine[Catalina]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>         at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 9 more
> Caused by: org.apache.catalina.LifecycleException: A child container
> failed during start
>         at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
>         at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         ... 11 more
>
> And here's my pom.xml
>
> <build>
>                 <finalName>webApp-hi5</finalName>
>                 <resources>
>                         <resource>
>                                 <directory>src/main/webapp</directory>
>                         </resource>
>                 </resources>
>                 <pluginManagement><!-- lock down plugins versions to avoid
> using Maven
>                                 defaults (may be moved to parent pom) -->
>                         <plugins>
>                                 <plugin>
>
> <artifactId>maven-clean-plugin</artifactId>
>                                         <version>3.0.0</version>
>                                 </plugin>
>                                 <!-- see
> http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging
> -->
>                                 <plugin>
>
> <artifactId>maven-resources-plugin</artifactId>
>                                         <version>3.0.2</version>
>                                 </plugin>
>                                 <plugin>
>
> <artifactId>maven-compiler-plugin</artifactId>
>                                         <version>3.7.0</version>
>                                 </plugin>
>                                 <plugin>
>
> <artifactId>maven-surefire-plugin</artifactId>
>                                         <version>2.20.1</version>
>                                 </plugin>
>                                 <plugin>
>
> <artifactId>maven-war-plugin</artifactId>
>                                         <version>3.2.0</version>
>                                         <configuration>
>
> <warName>webApp-hi5</warName>
>                                         </configuration>
>                                 </plugin>
>                                 <plugin>
>
> <artifactId>maven-install-plugin</artifactId>
>                                         <version>2.5.2</version>
>                                 </plugin>
>                                 <plugin>
>
> <artifactId>maven-deploy-plugin</artifactId>
>                                         <version>2.8.2</version>
>                                 </plugin>
>                         </plugins>
>                 </pluginManagement>
>         </build>
>         <dependencies>
>                 <dependency>
>                         <groupId>javax.servlet.jsp</groupId>
>                         <artifactId>javax.servlet.jsp-api</artifactId>
>                         <version>2.3.1</version>
>                         <scope>provided</scope>
>                 </dependency>
>                 <dependency>
>                         <groupId>javax.servlet</groupId>
>                         <artifactId>jsp-api</artifactId>
>                         <version>2.0</version>
>                 </dependency>
>                 <!--
> https://mvnrepository.com/artifact/javax.inject/javax.inject -->
>                 <dependency>
>                         <groupId>javax.inject</groupId>
>                         <artifactId>javax.inject</artifactId>
>                         <version>1</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>jstl</groupId>
>                         <artifactId>jstl</artifactId>
>                         <scope>provided</scope>
>                         <version>1.2</version>
>                 </dependency>
>                 <!-- LOG4J for JDBC -->
>                 <dependency>
>                         <groupId>org.apache.logging.log4j</groupId>
>                         <artifactId>log4j-core</artifactId>
>                         <version>2.11.1</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>javax.enterprise</groupId>
>                         <artifactId>cdi-api</artifactId>
>                         <version>2.0</version>
>                         <scope>provided</scope>
>                 </dependency>
>                 <dependency>
>                         <groupId>mysql</groupId>
>                         <artifactId>mysql-connector-java</artifactId>
>                         <version>8.0.13</version>
>                         <scope>provided</scope>
>                 </dependency>
>                 <!--
> https://mvnrepository.com/artifact/org.apache.tomee/openejb-core -->
>                 <dependency>
>                         <groupId>org.apache.tomee</groupId>
>                         <artifactId>openejb-core</artifactId>
>                         <version>8.0.0-M1</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.jboss.weld.servlet</groupId>
>                         <artifactId>weld-servlet</artifactId>
>                         <version>2.4.5.Final</version>
>                         <scope>runtime</scope>
>                 </dependency>
>                 <dependency>
>                         <groupId>javax.servlet</groupId>
>                         <artifactId>javax.servlet-api</artifactId>
>                         <version>3.1.0</version>
>                         <scope>provided</scope>
>                 </dependency>
>                 <!--
> https://mvnrepository.com/artifact/com.googlecode.log4jdbc/log4jdbc -->
>                 <dependency>
>                         <groupId>com.googlecode.log4jdbc</groupId>
>                         <artifactId>log4jdbc</artifactId>
>                         <version>1.2</version>
>                 </dependency>
>                 <!--
> https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
>                 <!--
> https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
>                 <dependency>
>                         <groupId>org.slf4j</groupId>
>                         <artifactId>slf4j-api</artifactId>
>                         <version>1.7.25</version>
>                 </dependency>
>
>                 <dependency>
>                         <groupId>org.apache.logging.log4j</groupId>
>                         <artifactId>log4j-slf4j-impl</artifactId>
>                         <version>2.11.1</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>junit</groupId>
>                         <artifactId>junit</artifactId>
>                         <version>4.11</version>
>                         <scope>test</scope>
>                 </dependency>
>                 <!-- https://mvnrepository.com/artifact/javax/javaee-api
> -->
>                 <dependency>
>                         <groupId>javax</groupId>
>                         <artifactId>javaee-api</artifactId>
>                         <version>8.0</version>
>                         <scope>provided</scope>
>                 </dependency>
>         </dependencies>
> </project>
> Tks.
>


--

"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."

- Samuel Beckett
Reply | Threaded
Open this post in threaded view
|

Re: Getting exceptions in using TOMEE

Roberto Cortez
Hi Karen,

Thank you for reaching out.

Indeed, it seems you adding a lot of dependencies to your project that you don’t need. The javaee-api should be enough. For TomEE you would actually use the following:

        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>javaee-api</artifactId>
            <version>8.0</version>
            <scope>provided</scope>
        </dependency>

You could also take a quick look into this example to see how it was setup:
https://github.com/apache/tomee/tree/master/examples/rest-cdi <https://github.com/apache/tomee/tree/master/examples/rest-cdi>

Hope it helps!

Cheers,
Roberto

> On 19 Dec 2018, at 09:24, Luis Rodríguez Fernández <[hidden email]> wrote:
>
> Hello Karen,
>
> mmm, perhaps you could provide some more details about your setup, like
> java and tomee version. I can see that you are using javaee-api 8.0 and
> openejb 8.0.0-M1, so I assume that you are tomee-8-1 [1] :)
>
> I am not sure if it is going to solve your issue, but as you are already
> declaring...
>
>                <dependency>
>                        <groupId>javax</groupId>
>                        <artifactId>javaee-api</artifactId>
>                        <version>8.0</version>
>                        <scope>provided</scope>
>                </dependency>
>
> ... perhaps you could delete some of the others, like the cdi-api 2.0.
> Probably just with the javaee-api one + junit and the specific login ones
> could be enough.
>
> You mentioned MVC, perhaps the microprofile is enough then for you.
>
> Hope it helps,
>
> Luis
>
> [1] https://www.tomitribe.com/blog/tomee-announcing-tomee-8-m1/
>
>
>
>
>
>
>
>
>
> El mié., 19 dic. 2018 a las 9:20, Karen Goh (<[hidden email]>)
> escribió:
>
>> Hi,
>>
>> I am a beginner in using tomEE.  So, I'd like to check if there is any
>> conflicts in the dependencies I used.
>>
>> Basically, I would like to use CDI for dependency injection.
>>
>> This is a Maven based java web app with DAO design design pattern cum MVC.
>>
>> Here's the exception I received :
>>
>> SEVERE: CDI Beans module deployment failed
>> org.apache.webbeans.exception.WebBeansDeploymentException:
>> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
>> [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
>>        at
>> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
>>        at
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
>>        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>>        at
>> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>>        at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>>        at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>        at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>        at java.lang.Thread.run(Thread.java:748)
>> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
>> type [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
>>        at
>> org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
>>        at
>> org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
>>        at
>> org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
>>        at
>> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
>>        at
>> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
>>        at
>> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
>>        ... 17 more
>>
>> Dec 19, 2018 4:05:44 PM org.apache.tomee.catalina.TomcatWebAppBuilder
>> startInternal
>> SEVERE: Unable to deploy collapsed ear in war
>> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]
>> javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
>>        at
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
>>        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>>        at
>> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>>        at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>>        at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>        at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>        at java.lang.Thread.run(Thread.java:748)
>> Caused by: org.apache.openejb.OpenEJBRuntimeException:
>> org.apache.webbeans.exception.WebBeansDeploymentException:
>> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
>> [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
>>        at
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
>>        ... 15 more
>> Caused by: org.apache.webbeans.exception.WebBeansDeploymentException:
>> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
>> [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
>>        at
>> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
>>        ... 16 more
>> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
>> type [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
>>        at
>> org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
>>        at
>> org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
>>        at
>> org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
>>        at
>> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
>>        at
>> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
>>        at
>> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
>>        ... 17 more
>>
>> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
>> SEVERE: ContainerBase.removeChild: destroy:
>> org.apache.catalina.LifecycleException: An invalid Lifecycle transition
>> was attempted ([before_destroy]) for component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
>> in state [STARTING_PREP]
>>        at
>> org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402)
>>        at
>> org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
>>        at
>> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1627)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1607)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1307)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>>        at
>> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>>        at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>>        at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>        at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>        at java.lang.Thread.run(Thread.java:748)
>>
>> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
>> SEVERE: A child container failed during start
>> java.util.concurrent.ExecutionException:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
>>        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>>        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>>        at
>> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
>>        at
>> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>        at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>        at java.lang.Thread.run(Thread.java:748)
>> Caused by: org.apache.catalina.LifecycleException: Failed to start
>> component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webApp-hi5]]
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>>        ... 6 more
>> Caused by: org.apache.tomee.catalina.TomEERuntimeException:
>> javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1310)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
>>        at
>> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
>>        at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
>>        at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        ... 6 more
>> Caused by: javax.enterprise.inject.spi.DeploymentException: couldn't start
>> owb context
>>        at
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:191)
>>        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:913)
>>        at
>> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
>>        at
>> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
>>        ... 11 more
>> Caused by: org.apache.openejb.OpenEJBRuntimeException:
>> org.apache.webbeans.exception.WebBeansDeploymentException:
>> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
>> [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
>>        at
>> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
>>        ... 15 more
>> Caused by: org.apache.webbeans.exception.WebBeansDeploymentException:
>> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
>> [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
>>        at
>> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
>>        ... 16 more
>> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Api
>> type [model.Subject] is not found with the qualifiers
>> Qualifiers: [@javax.enterprise.inject.Default()]
>> for injection into Field Injection Point, field name :  subjt, Bean Owner
>> : [Tutor, WebBeansType:MANAGED, Name:null, API
>> Types:[model.Tutor,java.lang.Object,java.io.Serializable],
>> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>>        at
>> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:65)
>>        at
>> org.apache.webbeans.container.InjectionResolver.checkInjectionPoint(InjectionResolver.java:234)
>>        at
>> org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1199)
>>        at
>> org.apache.webbeans.util.WebBeansUtil.validate(WebBeansUtil.java:1709)
>>        at
>> org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:913)
>>        at
>> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:824)
>>        at
>> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:307)
>>        ... 17 more
>>
>> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
>> SEVERE: A child container failed during start
>> java.util.concurrent.ExecutionException:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost]]
>>        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>>        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>>        at
>> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
>>        at
>> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at
>> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at
>> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
>>        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:498)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
>> Caused by: org.apache.catalina.LifecycleException: Failed to start
>> component [StandardEngine[Catalina].StandardHost[localhost]]
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
>>        at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>        at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>        at java.lang.Thread.run(Thread.java:748)
>> Caused by: org.apache.catalina.LifecycleException: A child container
>> failed during start
>>        at
>> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
>>        at
>> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        ... 6 more
>>
>> Dec 19, 2018 4:05:44 PM sun.reflect.NativeMethodAccessorImpl invoke
>> SEVERE: The required Server component failed to start so Tomcat is unable
>> to start.
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardServer[8005]]
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
>>        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:498)
>>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
>> Caused by: org.apache.catalina.LifecycleException: Failed to start
>> component [StandardService[Catalina]]
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>>        at
>> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:791)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        ... 7 more
>> Caused by: org.apache.catalina.LifecycleException: Failed to start
>> component [StandardEngine[Catalina]]
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
>>        at
>> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        ... 9 more
>> Caused by: org.apache.catalina.LifecycleException: A child container
>> failed during start
>>        at
>> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
>>        at
>> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
>>        at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>        ... 11 more
>>
>> And here's my pom.xml
>>
>> <build>
>>                <finalName>webApp-hi5</finalName>
>>                <resources>
>>                        <resource>
>>                                <directory>src/main/webapp</directory>
>>                        </resource>
>>                </resources>
>>                <pluginManagement><!-- lock down plugins versions to avoid
>> using Maven
>>                                defaults (may be moved to parent pom) -->
>>                        <plugins>
>>                                <plugin>
>>
>> <artifactId>maven-clean-plugin</artifactId>
>>                                        <version>3.0.0</version>
>>                                </plugin>
>>                                <!-- see
>> http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging
>> -->
>>                                <plugin>
>>
>> <artifactId>maven-resources-plugin</artifactId>
>>                                        <version>3.0.2</version>
>>                                </plugin>
>>                                <plugin>
>>
>> <artifactId>maven-compiler-plugin</artifactId>
>>                                        <version>3.7.0</version>
>>                                </plugin>
>>                                <plugin>
>>
>> <artifactId>maven-surefire-plugin</artifactId>
>>                                        <version>2.20.1</version>
>>                                </plugin>
>>                                <plugin>
>>
>> <artifactId>maven-war-plugin</artifactId>
>>                                        <version>3.2.0</version>
>>                                        <configuration>
>>
>> <warName>webApp-hi5</warName>
>>                                        </configuration>
>>                                </plugin>
>>                                <plugin>
>>
>> <artifactId>maven-install-plugin</artifactId>
>>                                        <version>2.5.2</version>
>>                                </plugin>
>>                                <plugin>
>>
>> <artifactId>maven-deploy-plugin</artifactId>
>>                                        <version>2.8.2</version>
>>                                </plugin>
>>                        </plugins>
>>                </pluginManagement>
>>        </build>
>>        <dependencies>
>>                <dependency>
>>                        <groupId>javax.servlet.jsp</groupId>
>>                        <artifactId>javax.servlet.jsp-api</artifactId>
>>                        <version>2.3.1</version>
>>                        <scope>provided</scope>
>>                </dependency>
>>                <dependency>
>>                        <groupId>javax.servlet</groupId>
>>                        <artifactId>jsp-api</artifactId>
>>                        <version>2.0</version>
>>                </dependency>
>>                <!--
>> https://mvnrepository.com/artifact/javax.inject/javax.inject -->
>>                <dependency>
>>                        <groupId>javax.inject</groupId>
>>                        <artifactId>javax.inject</artifactId>
>>                        <version>1</version>
>>                </dependency>
>>                <dependency>
>>                        <groupId>jstl</groupId>
>>                        <artifactId>jstl</artifactId>
>>                        <scope>provided</scope>
>>                        <version>1.2</version>
>>                </dependency>
>>                <!-- LOG4J for JDBC -->
>>                <dependency>
>>                        <groupId>org.apache.logging.log4j</groupId>
>>                        <artifactId>log4j-core</artifactId>
>>                        <version>2.11.1</version>
>>                </dependency>
>>                <dependency>
>>                        <groupId>javax.enterprise</groupId>
>>                        <artifactId>cdi-api</artifactId>
>>                        <version>2.0</version>
>>                        <scope>provided</scope>
>>                </dependency>
>>                <dependency>
>>                        <groupId>mysql</groupId>
>>                        <artifactId>mysql-connector-java</artifactId>
>>                        <version>8.0.13</version>
>>                        <scope>provided</scope>
>>                </dependency>
>>                <!--
>> https://mvnrepository.com/artifact/org.apache.tomee/openejb-core -->
>>                <dependency>
>>                        <groupId>org.apache.tomee</groupId>
>>                        <artifactId>openejb-core</artifactId>
>>                        <version>8.0.0-M1</version>
>>                </dependency>
>>                <dependency>
>>                        <groupId>org.jboss.weld.servlet</groupId>
>>                        <artifactId>weld-servlet</artifactId>
>>                        <version>2.4.5.Final</version>
>>                        <scope>runtime</scope>
>>                </dependency>
>>                <dependency>
>>                        <groupId>javax.servlet</groupId>
>>                        <artifactId>javax.servlet-api</artifactId>
>>                        <version>3.1.0</version>
>>                        <scope>provided</scope>
>>                </dependency>
>>                <!--
>> https://mvnrepository.com/artifact/com.googlecode.log4jdbc/log4jdbc -->
>>                <dependency>
>>                        <groupId>com.googlecode.log4jdbc</groupId>
>>                        <artifactId>log4jdbc</artifactId>
>>                        <version>1.2</version>
>>                </dependency>
>>                <!--
>> https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
>>                <!--
>> https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
>>                <dependency>
>>                        <groupId>org.slf4j</groupId>
>>                        <artifactId>slf4j-api</artifactId>
>>                        <version>1.7.25</version>
>>                </dependency>
>>
>>                <dependency>
>>                        <groupId>org.apache.logging.log4j</groupId>
>>                        <artifactId>log4j-slf4j-impl</artifactId>
>>                        <version>2.11.1</version>
>>                </dependency>
>>                <dependency>
>>                        <groupId>junit</groupId>
>>                        <artifactId>junit</artifactId>
>>                        <version>4.11</version>
>>                        <scope>test</scope>
>>                </dependency>
>>                <!-- https://mvnrepository.com/artifact/javax/javaee-api
>> -->
>>                <dependency>
>>                        <groupId>javax</groupId>
>>                        <artifactId>javaee-api</artifactId>
>>                        <version>8.0</version>
>>                        <scope>provided</scope>
>>                </dependency>
>>        </dependencies>
>> </project>
>> Tks.
>>
>
>
> --
>
> "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."
>
> - Samuel Beckett