Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1769

org.jboss.arquillian.warp.spi.exception.StoreHasAssociatedObjectsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • warp_1.0.0.Beta1
    • warp_1.0.0.Alpha7, 1.1.3.Final, 1.1.4.Final
    • Extension - Warp
    • None
    • Hide

      When running a simple test case like the following:

      import static org.jboss.arquillian.warp.client.filter.http.HttpFilters.request;
      import static org.junit.Assert.assertEquals;
      import static org.junit.Assert.assertFalse;
      import static org.junit.Assert.assertTrue;
      
      import java.io.File;
      import java.io.IOException;
      import java.net.URL;
      
      import javax.faces.context.FacesContext;
      import javax.servlet.http.HttpServletResponse;
      
      import org.apache.log4j.Logger;
      import org.jboss.arquillian.container.test.api.Deployment;
      import org.jboss.arquillian.container.test.api.RunAsClient;
      import org.jboss.arquillian.drone.api.annotation.Drone;
      import org.jboss.arquillian.junit.Arquillian;
      import org.jboss.arquillian.test.api.ArquillianResource;
      import org.jboss.arquillian.warp.Activity;
      import org.jboss.arquillian.warp.Inspection;
      import org.jboss.arquillian.warp.Warp;
      import org.jboss.arquillian.warp.WarpTest;
      import org.jboss.arquillian.warp.jsf.AfterPhase;
      import org.jboss.arquillian.warp.jsf.Phase;
      import org.jboss.arquillian.warp.servlet.AfterServlet;
      import org.jboss.arquillian.warp.servlet.BeforeServlet;
      import org.jboss.shrinkwrap.api.Filters;
      import org.jboss.shrinkwrap.api.GenericArchive;
      import org.jboss.shrinkwrap.api.ShrinkWrap;
      import org.jboss.shrinkwrap.api.importer.ExplodedImporter;
      import org.jboss.shrinkwrap.api.spec.WebArchive;
      import org.jboss.shrinkwrap.resolver.api.DependencyResolvers;
      import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver;
      import org.junit.Test;
      import org.junit.runner.RunWith;
      import org.openqa.selenium.By;
      import org.openqa.selenium.WebDriver;
      import org.openqa.selenium.WebElement;
      import org.springframework.validation.Errors;
      
      @WarpTest
      @RunWith(Arquillian.class)
      @RunAsClient
      public class MyTestClass {
       @Drone
       WebDriver browser;
      ...
       @Deployment
        public static WebArchive createDeployment() {
         WebArchive war = ShrinkWrap
          .create(WebArchive.class, "losingthis.war")
          .setWebXML(new File("web.xml"))
          .addPackages(true,
           new Package[] { Package.getPackage("com.shrinkwrap.me.please") })
            .addAsLibraries(
             DependencyResolvers.use(MavenDependencyResolver.class)
              .configureFrom("settings.xml")
              .artifact("com.sun.faces:jsf-api:jar:2.1.17").artifact(com.sun.faces:jsf-impl:jar:2.1.17)
              .resolveAs(GenericArchive.class));
         war.merge(ShrinkWrap.create(GenericArchive.class)
          .as(ExplodedImporter.class).importDirectory("src/main/webapp")
          .as(GenericArchive.class), "/",
           Filters.includeAll());
         return war;
        }
      
       @Test
       public void test() {
        browser.navigate().to("http://localhost:8080/test/" + INITIAL_PAGE);
        Warp.initiate(new Activity() {
         public void perform() {
         WebElement element = browser.findElement(By.name("f"));
         element.submit();
      });
      
      Show
      When running a simple test case like the following: import static org.jboss.arquillian.warp.client.filter.http.HttpFilters.request; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; import java.net.URL; import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.warp.Activity; import org.jboss.arquillian.warp.Inspection; import org.jboss.arquillian.warp.Warp; import org.jboss.arquillian.warp.WarpTest; import org.jboss.arquillian.warp.jsf.AfterPhase; import org.jboss.arquillian.warp.jsf.Phase; import org.jboss.arquillian.warp.servlet.AfterServlet; import org.jboss.arquillian.warp.servlet.BeforeServlet; import org.jboss.shrinkwrap.api.Filters; import org.jboss.shrinkwrap.api.GenericArchive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.importer.ExplodedImporter; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.shrinkwrap.resolver.api.DependencyResolvers; import org.jboss.shrinkwrap.resolver.api.maven.MavenDependencyResolver; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.springframework.validation.Errors; @WarpTest @RunWith(Arquillian.class) @RunAsClient public class MyTestClass { @Drone WebDriver browser; ... @Deployment public static WebArchive createDeployment() { WebArchive war = ShrinkWrap .create(WebArchive.class, "losingthis.war" ) .setWebXML( new File( "web.xml" )) .addPackages( true , new Package[] { Package.getPackage( "com.shrinkwrap.me.please" ) }) .addAsLibraries( DependencyResolvers.use(MavenDependencyResolver.class) .configureFrom( "settings.xml" ) .artifact( "com.sun.faces:jsf-api:jar:2.1.17" ).artifact(com.sun.faces:jsf-impl:jar:2.1.17) .resolveAs(GenericArchive.class)); war.merge(ShrinkWrap.create(GenericArchive.class) .as(ExplodedImporter.class).importDirectory( "src/main/webapp" ) .as(GenericArchive.class), "/" , Filters.includeAll()); return war; } @Test public void test() { browser.navigate().to( "http: //localhost:8080/test/" + INITIAL_PAGE); Warp.initiate( new Activity() { public void perform() { WebElement element = browser.findElement(By.name( "f" )); element.submit(); });

      I am using the following:

      Arquillian Core: 1.1.4.Final (as well as 1.1.3.Final)
      Arquillian Drone: 1.2.4.Final (I've tried Drone 2 as well)
      Arquillian Warp: 1.0.0.Alpha7 (as well as 1.0.0.Beta1-SNAPSHOT)
      Arquillian Transaction: 1.0.1.Final
      Arquillian Tomcat 7 Embedded Container using Tomcat 7.0.27: 1.0.0.Final-SNAPSHOT

      Spring: 3.2.4.RELEASE
      Spring Web: 3.2.2.RELEASE
      Spring Security: 3.1.4.RELEASE
      Spring WebFlow: 2.4.0.RC1
      PrimeFaces 3.4.2
      JUnit: 4.8.2
      Mojarra 2.1.17

      I am receiving this exception:

      java.lang.IllegalStateException: org.jboss.arquillian.warp.spi.exception.StoreHasAssociatedObjectsException 
      at org.jboss.arquillian.warp.impl.server.lifecycle.LifecycleManagerObserver.finalizeManager(LifecycleManagerObserver.java:69)
      ...
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      at org.jboss.arquillian.warp.impl.server.test.LifecycleTestClassExecutor.afterRequest(LifecycleTestClassExecutor.java:78)
      ...
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
      at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      at org.jboss.arquillian.warp.impl.server.request.RequestContextHandler.handleRequestContext(RequestContextHandler.java:93)
      ...
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
      at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilterWarp(WarpFilter.java:151)
      at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilterHttp(WarpFilter.java:120)
      at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilter(WarpFilter.java:93)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      ...
      Caused by: org.jboss.arquillian.warp.spi.exception.StoreHasAssociatedObjectsException
      at org.jboss.arquillian.warp.impl.server.lifecycle.LifecycleManagerStoreImpl.checkUnbound(LifecycleManagerStoreImpl.java:126)
      at org.jboss.arquillian.warp.spi.LifecycleManager.checkUnbound(LifecycleManager.java:158)
      at org.jboss.arquillian.warp.impl.server.lifecycle.LifecycleManagerObserver.finalizeManager(LifecycleManagerObserver.java:67)
      ... 74 more
      

              Unassigned Unassigned
              bcrowell2 William Crowell (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: