Re: NPE with CODI, OWB and JUNIT
Hi Gerhard, thanks, it works! 2011/10/17 Gerhard Petracek gerhard.petra...@gmail.com hi thomas, i see. in this case you need the cditest-owb module of owb (it's in the same example). regards, gerhard http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/10/17 Thomas Andraschko zoi...@googlemail.com Also i don't want to include jsf/web dependencies to this module, i only need a CDI aware test. This is just for my business logic layer. 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi Gerhard, do i really need this when i just want to test my business logic without web and jsf? Best regards, Thomas 2011/10/17 Gerhard Petracek gerhard.petra...@gmail.com hi thomas, you also need other dependencies like myfaces-test and the jsf-support-module. you can have a look e.g. at [1]. regards, gerhard [1] http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/community/pom.xml http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi, my junit tests extends from AbstractCdiAwareTest and i'm trying to inject one of my DAO's. The NPE occurs in TestContainerFactory.isServletContextAwareContainer because testContainer is null. Here is my list with depenedencies: artifactIdjunit/artifactId artifactIdcdi-api/artifactId artifactIdopenwebbeans-impl/artifactId artifactIdopenwebbeans-spi/artifactId artifactIdopenwebbeans-resource/artifactId artifactIdmyfaces-extcdi-core-api/artifactId artifactIdmyfaces-extcdi-core-impl/artifactId artifactIdmyfaces-extcdi-base-test-infrastructure/artifactId artifactIdmyfaces-extcdi-junit-support-module/artifactId artifactIdmyfaces-extcdi-owb-support-module/artifactId OWB 1.1.1, CODI 1.0.1, JUnit 4.6 How can i fix this? Thanks and best regards Thomas
NPE with CODI, OWB and JUNIT
Hi, my junit tests extends from AbstractCdiAwareTest and i'm trying to inject one of my DAO's. The NPE occurs in TestContainerFactory.isServletContextAwareContainer because testContainer is null. Here is my list with depenedencies: artifactIdjunit/artifactId artifactIdcdi-api/artifactId artifactIdopenwebbeans-impl/artifactId artifactIdopenwebbeans-spi/artifactId artifactIdopenwebbeans-resource/artifactId artifactIdmyfaces-extcdi-core-api/artifactId artifactIdmyfaces-extcdi-core-impl/artifactId artifactIdmyfaces-extcdi-base-test-infrastructure/artifactId artifactIdmyfaces-extcdi-junit-support-module/artifactId artifactIdmyfaces-extcdi-owb-support-module/artifactId OWB 1.1.1, CODI 1.0.1, JUnit 4.6 How can i fix this? Thanks and best regards Thomas
Re: NPE with CODI, OWB and JUNIT
hi thomas, you also need other dependencies like myfaces-test and the jsf-support-module. you can have a look e.g. at [1]. regards, gerhard [1] http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/community/pom.xml http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi, my junit tests extends from AbstractCdiAwareTest and i'm trying to inject one of my DAO's. The NPE occurs in TestContainerFactory.isServletContextAwareContainer because testContainer is null. Here is my list with depenedencies: artifactIdjunit/artifactId artifactIdcdi-api/artifactId artifactIdopenwebbeans-impl/artifactId artifactIdopenwebbeans-spi/artifactId artifactIdopenwebbeans-resource/artifactId artifactIdmyfaces-extcdi-core-api/artifactId artifactIdmyfaces-extcdi-core-impl/artifactId artifactIdmyfaces-extcdi-base-test-infrastructure/artifactId artifactIdmyfaces-extcdi-junit-support-module/artifactId artifactIdmyfaces-extcdi-owb-support-module/artifactId OWB 1.1.1, CODI 1.0.1, JUnit 4.6 How can i fix this? Thanks and best regards Thomas
Re: NPE with CODI, OWB and JUNIT
Also i don't want to include jsf/web dependencies to this module, i only need a CDI aware test. This is just for my business logic layer. 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi Gerhard, do i really need this when i just want to test my business logic without web and jsf? Best regards, Thomas 2011/10/17 Gerhard Petracek gerhard.petra...@gmail.com hi thomas, you also need other dependencies like myfaces-test and the jsf-support-module. you can have a look e.g. at [1]. regards, gerhard [1] http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/community/pom.xml http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi, my junit tests extends from AbstractCdiAwareTest and i'm trying to inject one of my DAO's. The NPE occurs in TestContainerFactory.isServletContextAwareContainer because testContainer is null. Here is my list with depenedencies: artifactIdjunit/artifactId artifactIdcdi-api/artifactId artifactIdopenwebbeans-impl/artifactId artifactIdopenwebbeans-spi/artifactId artifactIdopenwebbeans-resource/artifactId artifactIdmyfaces-extcdi-core-api/artifactId artifactIdmyfaces-extcdi-core-impl/artifactId artifactIdmyfaces-extcdi-base-test-infrastructure/artifactId artifactIdmyfaces-extcdi-junit-support-module/artifactId artifactIdmyfaces-extcdi-owb-support-module/artifactId OWB 1.1.1, CODI 1.0.1, JUnit 4.6 How can i fix this? Thanks and best regards Thomas
Re: NPE with CODI, OWB and JUNIT
hi thomas, i see. in this case you need the cditest-owb module of owb (it's in the same example). regards, gerhard http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/10/17 Thomas Andraschko zoi...@googlemail.com Also i don't want to include jsf/web dependencies to this module, i only need a CDI aware test. This is just for my business logic layer. 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi Gerhard, do i really need this when i just want to test my business logic without web and jsf? Best regards, Thomas 2011/10/17 Gerhard Petracek gerhard.petra...@gmail.com hi thomas, you also need other dependencies like myfaces-test and the jsf-support-module. you can have a look e.g. at [1]. regards, gerhard [1] http://code.google.com/a/apache-extras.org/p/myfaces-codi-examples/source/browse/community/pom.xml http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2011/10/17 Thomas Andraschko zoi...@googlemail.com Hi, my junit tests extends from AbstractCdiAwareTest and i'm trying to inject one of my DAO's. The NPE occurs in TestContainerFactory.isServletContextAwareContainer because testContainer is null. Here is my list with depenedencies: artifactIdjunit/artifactId artifactIdcdi-api/artifactId artifactIdopenwebbeans-impl/artifactId artifactIdopenwebbeans-spi/artifactId artifactIdopenwebbeans-resource/artifactId artifactIdmyfaces-extcdi-core-api/artifactId artifactIdmyfaces-extcdi-core-impl/artifactId artifactIdmyfaces-extcdi-base-test-infrastructure/artifactId artifactIdmyfaces-extcdi-junit-support-module/artifactId artifactIdmyfaces-extcdi-owb-support-module/artifactId OWB 1.1.1, CODI 1.0.1, JUnit 4.6 How can i fix this? Thanks and best regards Thomas