0 Replies Latest reply on Oct 8, 2014 6:10 AM by omid pourhadi

    Arquillian Seam no active session context

    omid pourhadi Apprentice

      I'm trying to use Arquillian with Seam 2 when I try to reach a Seam Component I get this error


      java.lang.IllegalStateException: No active session context


      I know it's because of Seam life cycle has not started I wonder why ?


      I'm using




      here is my code


      public class DbUtilTest
          @Deployment(testable = false)
          public static Archive<?> createDeployment()
              //TODO : get from System.getProperties(testDeployment)
              String testDeployment = "/home/omidbiz/blog-ear/target/blog.ear";//can not deploy exploded archive
              String deploymentName = testDeployment.substring(testDeployment.lastIndexOf("/") + 1);
              Class<? extends Archive<?>> deploymentClass = EnterpriseArchive.class;
              return ShrinkWrap.create(ZipImporter.class, deploymentName).importFrom(new File(testDeployment)).as(deploymentClass);
      //    @InSequence(1)
          public void simpleEntryTest() {
              String id = "simpleBlogEntry";
              String title = "Simple blog entry";
              String excerpt = "This is an excerpt";
              String body = "This is a simple blog entry posted for testing purposes.";
             DBUtil dbUtil = DBUtil.instance();
             List<Blog> list = dbUtil.getBlogFilterByPermissionDate();



      BTW Arquillian can not deploy exploded archive is it correct ? aslak.aslak.conduct.no