8 Replies Latest reply on Oct 7, 2008 2:13 AM by fastnsilver

    Seam Integration Test Problem

    fastnsilver

      First the environment...
      WinXP SP2, Eclipse 3.4, JBossTools, Seam 2.0.2.SP1, Spring 2.0.7, RichFaces 3.2.2.GA, Tomcat 6.0.18, Ant 1.7, TestNG.


      I'm trying to run a Seam integration test. 


      Caveats:  1) jboss-embedded jars not in the classpath and 2) a non seam-gen structured project.  I reference this article and this forum post for proof that such a config can work.


      My bean under test depends on Spring to inject a command.


      Here's the test...


      public class LoginBeanTestNGTest extends SeamTest{     
           
           private Command<LoginResult, LoginAction> loginCommand;
      
           @BeforeTest
           public void createLoginCommand() {
                loginCommand = new Command<LoginResult, LoginAction>(){
      
                     public ResponseToken<LoginResult> execute(LoginAction action) {
                          ResponseToken<LoginResult> response = new ApplicationResponseToken<LoginResult>();
                          LoginResult result = new LoginResult();
                          response.setResult(result);
                          return response;
                     }
                     
                };
           }
           
           @Test
           public void login() throws Exception{
                
                new FacesRequest("/login.xhtml") {
                     
                     @Override
                     protected void updateModelValues() {
                          setValue("#{identity.username}", "qa-ramyac");
                          setValue("#{identity.password}", "expeditors");
                                    
                     }
                     
                     @Override
                     protected void invokeApplication() {
                          setValue("#{loginBean.loginCommand}", loginCommand);
                          boolean isLoginSuccess = new Boolean(invokeMethod("#{loginBean.login}").toString());
                          assert isLoginSuccess;
                     }
                }.run();
           }
      }



      Here's the bean...



      @Name("loginBean")
      @Scope(ScopeType.SESSION)
      public class LoginBean implements LoginAction, Serializable {
           
           private String username;
           private String password;
           
           @In(required=false) 
           FacesMessages facesMessages;     
           
           @In(value="#{loginCommand}")
           private Command<LoginResult, LoginAction> loginCommand;
           
              @In(value="#{logoutCommand}")
           private Command<Void, Action> logoutCommand;
      
           public boolean login(){
                this.username = Identity.instance().getUsername();
                this.password = Identity.instance().getPassword();
                ResponseToken<LoginResult> response = this.loginCommand.execute(this);
                if(response.isSuccessful()){          
                     LoginResult loginResult = response.getResult();
                     
                     if(null == loginResult) {
                          return false;
                     }
                     
                     return true;               
                } else {
                     
                     facesMessages = ResponseTokenTranslator.getFacesMessagesFromResponse(response, MessageTranslator.getMessage("login_invalid"));
                     
                     Identity.instance().setUsername(null);
                     Identity.instance().setPassword(null);
                     return false;
                }
           }     
           
           public void logout() {
                ResponseToken<Void> response = this.logoutCommand.execute(null);
           }
           
           public String getUsername() {
                return username;
           }
      
           public String getPassword() {
                return password;
           }
      }



      Note the injection.  These Spring bean commands are indeed defined in the application context.


      Here's the kicker, a snippet of the exception...


      [testng] FAILED: login
         [testng] java.lang.AssertionError: javax.el.PropertyNotFoundException: Property 'loginCommand' not found on type com.expd.app.tar.login.backing.LoginBean_$$_javassist_11
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.onException(BaseSeamTest.java:488)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:537)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
         [testng]      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         [testng]      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         [testng]      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         [testng]      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
         [testng]      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
         [testng]      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
         [testng]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
         [testng]      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         [testng]      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
         [testng]      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:524)
         [testng]      at com.expd.app.tar.login.backing.LoginBeanTestNGTest.login(LoginBeanTestNGTest.java:48)
         [testng] Caused by: javax.el.PropertyNotFoundException: Property 'loginCommand' not found on type com.expd.app.tar.login.backing.LoginBean_$$_javassist_11
         [testng]      at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
         [testng]      at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
         [testng]      at javax.el.BeanELResolver.property(BeanELResolver.java:279)
         [testng]      at javax.el.BeanELResolver.setValue(BeanELResolver.java:106)
         [testng]      at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
         [testng]      at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
         [testng]      at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
         [testng]      at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
         [testng]      at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.setValue(BaseSeamTest.java:463)
         [testng]      at com.expd.app.tar.login.backing.LoginBeanTestNGTest$2.invokeApplication(LoginBeanTestNGTest.java:59)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.invokeApplicationPhase(BaseSeamTest.java:660)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:609)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:184)
         [testng]      at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:530)
         [testng]      ... 40 more
         [testng] ... Removed 22 stack frames



      Just before this exception in the debug output I see stuff that makes me nervous like...


      [testng] 2008-10-01 17:39:05,401 INFO  *main* DefaultListableBeanFactory.destroySingletons:282 [] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7d2796: defining beans [userProfileDataProvider,userProfileDataFactory,userProfileBusinessProvider,userProfileBusinessFactory,versionReader,adminSessionProvider,accessControlStrategy,authenticationStrategy,authorizationStrategy,securityService,dataSource,entityManagerFactorySpring,entityManagerFactory,txManager,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor,loginCommand,logoutCommand,eulaSignedCommand,forcedLoginCommand,passwordForceChangedCommand,isAuthenticatedCommand,isSessionExpiredCommand,reportDefinitionLookupStrategy,searchSubmissionStrategy,summarySearchSubmissionStrategy,searchCommand,emailReportCommand,summaryCommand,metaDataCommand,referenceTabCommand,searchDetailsCommand,promptCommand,platformProfile]; root of factory hierarchy
         [testng] 2008-10-01 17:39:05,401 INFO  *main* SeamManagedEntityManagerFactoryBean.destroy:340 [] Closing JPA EntityManagerFactory for persistence unit 'tartest:seam'
         [testng] 2008-10-01 17:39:05,401 INFO  *main* LocalContainerEntityManagerFactoryBean.destroy:340 [] Closing JPA EntityManagerFactory for persistence unit 'tartest'
         [testng] 2008-10-01 17:39:05,417 INFO  *main* SessionFactoryImpl.close:769 [] closing
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.ioc.spring.springELResolver
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,417 DEBUG *main* Events.raiseEvent:61 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.ioc.spring.springELResolver
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.framework.currentTime.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.captcha.captchaImage.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.init.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.faces.renderer.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.international.messagesFactory.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.ui.hibernateEntityLoader.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.conversation.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: promptBean.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.security.identity.component
         [testng] 2008-10-01 17:39:05,433 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.ConversationIdGenerator.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.conversationEntries.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: eulaBean.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.international.timeZoneSelector.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.ui.entityIdentifierStore.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.faces.validation.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.springframework.web.context.WebApplicationContext.ROOT
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.expressions.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.faces.facesContext.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.transaction.transaction.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.web.ajax4jsfFilter.component
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Contexts.destroy:244 [] destroying: envBean
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,448 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Events.raiseEvent:61 [] Processing event:org.jboss.seam.preDestroy.envBean
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.mail.mailSession.component
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.faces.uiComponent.component
         [testng] 2008-10-01 17:39:05,464 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.contexts.component
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.security.facesSecurityEvents.component
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.expressions
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Events.raiseEvent:61 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.expressions
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.web.loggingFilter.component
         [testng] 2008-10-01 17:39:05,480 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.init
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Events.raiseEvent:61 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.init
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.ui.resource.safeStyleResources.component
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.locale.component
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.resourceBundle.component
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.newInstance:1965 [] instantiating Seam component: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,495 DEBUG *main* Component.initialize:1385 [] initializing new instance of: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,511 DEBUG *main* Component.initialize:1402 [] done initializing: org.jboss.seam.core.events
         [testng] 2008-10-01 17:39:05,511 DEBUG *main* Events.raiseEvent:61 [] Processing event:org.jboss.seam.postDestroyContext.APPLICATION



      Seems like stuff the test needs to run is getting destroyed before it can make use of it.


      I am happy to provide any additional information you may need to help me successfully troubleshoot this issue (e.g., web.xml, components.xml, faces-config.xml, other source if that will help).


      I will say a few things more...


      Where I work we have a rigid project structure and build policy.  We use Ant to build, deploy and run our app and tests.  And we do not use EJBs.  Therefore, we go to the trouble of configuring Seam with Spring managed transactions deployed on Tomcat.  Simply falling back on a seam-gen project structure is not an option.


      Here's the project structure...


      C:\development\workspaces\rp\tar>ls -la
      total 249
      drwxr-xr-x+ 15 4294967295 mkpasswd      0 Oct  1 17:37 .
      drwxr-xr-x+ 19 4294967295 mkpasswd      0 Sep 24 14:00 ..
      -rwxr-xr-x   1 4294967295 mkpasswd   1030 Oct  1 16:48 .classpath
      -rwxr-xr-x   1 4294967295 mkpasswd     67 Jul  7 16:23 .cvsignore
      -rwxr-xr-x   1 4294967295 mkpasswd    873 Sep 25 16:07 .project
      drwxr-xr-x+  3 4294967295 mkpasswd      0 Sep 26 09:17 .settings
      -rwxr-xr-x   1 4294967295 mkpasswd 158720 Oct  5  2007 BuildHowTo_ReleaseNotes-2_0_0.doc
      drwxr-xr-x+  2 4294967295 mkpasswd      0 Sep 23 16:30 CVS
      -rwxr-xr-x   1 4294967295 mkpasswd      0 Aug 29 15:41 DO_METRICS
      drwxr-xr-x+  3 4294967295 mkpasswd      0 Oct  1 16:24 archive
      drwxr-xr-x+ 10 4294967295 mkpasswd      0 Oct  1 16:25 build
      -rwxr-xr-x   1 4294967295 mkpasswd   4534 Jul 11 14:32 build.properties
      -rwxr-xr-x   1 4294967295 mkpasswd  73917 Oct  1 16:36 build.xml
      drwxr-xr-x+  6 4294967295 mkpasswd      0 Sep 23 16:30 codegen
      drwxr-xr-x+  7 4294967295 mkpasswd      0 Oct  1 17:37 dist
      drwxr-xr-x+  7 4294967295 mkpasswd      0 Sep 23 16:29 doc
      drwxr-xr-x+  3 4294967295 mkpasswd      0 Sep 23 16:29 fitTest
      drwxr-xr-x+  2 4294967295 mkpasswd      0 Oct  1 17:38 logs
      drwxr-xr-x+  4 4294967295 mkpasswd      0 Sep 23 16:29 src
      drwxr-xr-x+  7 4294967295 mkpasswd      0 Oct  1 17:37 test
      drwxr-xr-x+  2 4294967295 mkpasswd      0 Oct  1 16:02 test-output
      drwxr-xr-x+  8 4294967295 mkpasswd      0 Oct  1 17:17 web



      web is basically structured like the webapps/${project.name} directory in a Tomcat deployment.  src/java and test/src/java trees are compiled into web/WEB-INF/classes.



      I am still a novice with the Seam framework.  It is a vast and powerful framework, but there still seems to be a lack of good material on integration testing best practices with Seam (e.g., configuring, running via Ant or Eclipse's TestNG plugin, troubleshooting problems).


      I have only been able to setup the classpath and run my tests via Ant.  Cannot get individual tests to run via the TestNG plugin.  I cannot help but feel a little suspicious that something may be missing from the classpath, but I can successfully deploy and run the application... so why doesn't the test run and work?


      Thanks in advance for your time and patience.


      Chris.


        • 1. Re: Seam Integration Test Problem
          fastnsilver

          Does the SeamTest framework in 2.0.2.SP1 work with Spring bean injections?  I am trying to initialize the Spring bean before the test begins, with @BeforeTest, could this be the problem?

          • 2. Re: Seam Integration Test Problem
            fastnsilver

            I'll report on my troubleshooting progress to-date in three replies.


            First, I upgraded the libs in my classpath to those found in Seam 2.1.0.CR1.  I made no changes to the deployment descriptor, component descriptor, or application contexts.  When I attempted to redeploy, start up and login to the app, I receive an exception.  But nevermind that.


            Next I tried to run the same test I mentioned above (among others).  Still, I get the same exception...


            [testng] FAILED: login
               [testng] java.lang.AssertionError: javax.el.PropertyNotFoundException: Property 'loginCommand' not found on type com.expd.app.tar.login.backing.LoginBean_$$_javassist_8
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.onException(AbstractSeamTest.java:456)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request$2.doFilter(AbstractSeamTest.java:505)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
               [testng]      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               [testng]      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               [testng]      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               [testng]      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               [testng]      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
               [testng]      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
               [testng]      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
               [testng]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
               [testng]      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               [testng]      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
               [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
               [testng]      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.run(AbstractSeamTest.java:492)
               [testng]      at com.expd.app.tar.login.backing.LoginBeanTestNGTest.login(LoginBeanTestNGTest.java:49)
               [testng] Caused by: javax.el.PropertyNotFoundException: Property 'loginCommand' not found on type com.expd.app.tar.login.backing.LoginBean_$$_javassist_8
               [testng]      at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
               [testng]      at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
               [testng]      at javax.el.BeanELResolver.property(BeanELResolver.java:279)
               [testng]      at javax.el.BeanELResolver.setValue(BeanELResolver.java:106)
               [testng]      at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
               [testng]      at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
               [testng]      at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
               [testng]      at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
               [testng]      at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.setValue(AbstractSeamTest.java:431)
               [testng]      at com.expd.app.tar.login.backing.LoginBeanTestNGTest$2.invokeApplication(LoginBeanTestNGTest.java:60)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.invokeApplicationPhase(AbstractSeamTest.java:647)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.emulateJsfLifecycle(AbstractSeamTest.java:596)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.access$300(AbstractSeamTest.java:178)
               [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request$2.doFilter(AbstractSeamTest.java:498)
               [testng]      ... 42 more
               [testng] ... Removed 22 stack frames


            • 3. Re: Seam Integration Test Problem
              fastnsilver

              Here's a snippet from how my tests start up...


              run_testng_sub:
                 [testng] [Parser] Running:
                 [testng]   C:\development\workspaces\rp\tar\test\classes\com\expd\app\tar\login\backing\testng.xml
                 [testng] 2008-10-06 11:21:23,805 DEBUG *main* DeploymentStrategy.addHandler:271 [] Adding org.jboss.seam.bpm.PageflowDeploymentHandler as a deployment handler
                 [testng] 2008-10-06 11:21:23,821 DEBUG *main* DeploymentStrategy.initScanner:207 [] Using default URLScanner
                 [testng] 2008-10-06 11:21:23,836 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-ioc.jar
                 [testng] 2008-10-06 11:21:23,836 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-ioc.jar
                 [testng] 2008-10-06 11:21:24,165 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-excel.jar
                 [testng] 2008-10-06 11:21:24,165 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-excel.jar
                 [testng] 2008-10-06 11:21:24,711 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-mail.jar
                 [testng] 2008-10-06 11:21:24,711 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-mail.jar
                 [testng] 2008-10-06 11:21:24,821 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-ui.jar
                 [testng] 2008-10-06 11:21:24,821 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-ui.jar
                 [testng] 2008-10-06 11:21:25,961 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-resteasy.jar
                 [testng] 2008-10-06 11:21:25,961 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-resteasy.jar
                 [testng] 2008-10-06 11:21:26,024 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam.jar
                 [testng] 2008-10-06 11:21:26,024 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam.jar
                 [testng] 2008-10-06 11:21:29,508 DEBUG *main* ComponentDeploymentHandler.handle:72 [] could not load class (missing dependency): org.jboss.seam.transaction.EjbSynchronizations
                 [testng] java.lang.NoClassDefFoundError: javax/ejb/SessionSynchronization
                 [testng]      at java.lang.ClassLoader.defineClass1(Native Method)
                 [testng]      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
                 [testng]      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
                 [testng]      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
                 [testng]      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
                 [testng]      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
                 [testng]      at java.security.AccessController.doPrivileged(Native Method)
                 [testng]      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                 [testng]      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                 [testng]      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
                 [testng]      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                 [testng]      at org.jboss.seam.deployment.ComponentDeploymentHandler.handle(ComponentDeploymentHandler.java:63)
                 [testng]      at org.jboss.seam.deployment.DeploymentStrategy.handle(DeploymentStrategy.java:190)
                 [testng]      at org.jboss.seam.deployment.AbstractScanner.handleItem(AbstractScanner.java:30)
                 [testng]      at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScanner.java:123)
                 [testng]      at org.jboss.seam.deployment.URLScanner.handle(URLScanner.java:101)
                 [testng]      at org.jboss.seam.deployment.URLScanner.scanResources(URLScanner.java:84)
                 [testng]      at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:105)
                 [testng]      at org.jboss.seam.init.Initialization.create(Initialization.java:114)
                 [testng]      at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:920)
                 [testng]      at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
                 [testng]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 [testng]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 [testng]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 [testng]      at java.lang.reflect.Method.invoke(Method.java:585)
                 [testng]      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
                 [testng]      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
                 [testng]      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
                 [testng]      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                 [testng]      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:261)
                 [testng]      at org.testng.SuiteRunner.run(SuiteRunner.java:190)
                 [testng]      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
                 [testng]      at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
                 [testng]      at org.testng.TestNG.run(TestNG.java:699)
                 [testng]      at org.testng.TestNG.privateMain(TestNG.java:824)
                 [testng]      at org.testng.TestNG.main(TestNG.java:802)
                 [testng] 2008-10-06 11:21:30,102 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/vrui.jar
                 [testng] 2008-10-06 11:21:30,102 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\vrui.jar
                 [testng] 2008-10-06 11:21:30,805 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-pdf.jar
                 [testng] 2008-10-06 11:21:30,805 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-pdf.jar
                 [testng] 2008-10-06 11:21:31,133 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-rss.jar
                 [testng] 2008-10-06 11:21:31,133 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-rss.jar
                 [testng] 2008-10-06 11:21:31,165 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-remoting.jar
                 [testng] 2008-10-06 11:21:31,165 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-remoting.jar
                 [testng] 2008-10-06 11:21:31,508 DEBUG *main* URLScanner.handle:93 [] scanning: /C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-debug.jar
                 [testng] 2008-10-06 11:21:31,508 DEBUG *main* URLScanner.handleArchiveByFile:115 [] archive: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\lib\jboss-seam-debug.jar
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handle:93 [] scanning: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\backing
                 [testng] 2008-10-06 11:21:31,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\core
                 [testng] 2008-10-06 11:21:31,571 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\core\constants
                 [testng] 2008-10-06 11:21:31,571 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\core\version
                 [testng] 2008-10-06 11:21:31,587 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\i18n
                 [testng] 2008-10-06 11:21:31,602 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\login
                 [testng] 2008-10-06 11:21:31,602 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\login\backing
                 [testng] 2008-10-06 11:21:31,618 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\login\constants
                 [testng] 2008-10-06 11:21:31,633 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\login\logging
                 [testng] 2008-10-06 11:21:31,633 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\util
                 [testng] 2008-10-06 11:21:31,665 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\common
                 [testng] 2008-10-06 11:21:31,680 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\META-INF
                 [testng] 2008-10-06 11:21:31,680 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/document, package: org.jboss.seam.document, prefix: org.jboss.seam.document
                 [testng] 2008-10-06 11:21:31,680 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/persistence, package: org.jboss.seam.persistence, prefix: org.jboss.seam.persistence
                 [testng] 2008-10-06 11:21:31,680 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/ui, package: org.jboss.seam.ui, prefix: org.jboss.seam.ui
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/core, package: org.jboss.seam.core, prefix: org.jboss.seam.core
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security.permission, prefix: org.jboss.seam.security
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/resteasy, package: org.jboss.seam.resteasy, prefix: 
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/captcha, package: org.jboss.seam.captcha, prefix: org.jboss.seam.captcha
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/spring, package: org.jboss.seam.ioc.spring, prefix: org.jboss.seam.ioc.spring
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/transaction, package: org.jboss.seam.transaction, prefix: org.jboss.seam.transaction
                 [testng] 2008-10-06 11:21:31,696 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/excel, package: org.jboss.seam.excel, prefix: org.jboss.seam.excel
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/navigation, package: org.jboss.seam.navigation, prefix: org.jboss.seam.navigation
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/bpm, package: org.jboss.seam.bpm, prefix: org.jboss.seam.bpm
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/international, package: org.jboss.seam.international, prefix: org.jboss.seam.international
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security, prefix: org.jboss.seam.security
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/cache, package: org.jboss.seam.cache, prefix: org.jboss.seam.cache
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/remoting, package: org.jboss.seam.remoting, prefix: org.jboss.seam.remoting
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: org.jboss.seam.drools
                 [testng] 2008-10-06 11:21:31,712 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/async, package: org.jboss.seam.async, prefix: org.jboss.seam.async
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/pdf, package: org.jboss.seam.pdf, prefix: 
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/mail, package: org.jboss.seam.mail, prefix: org.jboss.seam.mail
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/web, package: org.jboss.seam.web, prefix: org.jboss.seam.web
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security.management, prefix: org.jboss.seam.security
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: org.jboss.seam.theme
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, prefix: org.jboss.seam.core.framework
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.addNamespace:866 [] Namespace: http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: org.jboss.seam.jms
                 [testng] 2008-10-06 11:21:31,727 INFO  *main* Initialization.initComponentsFromXmlDocument:159 [] reading /WEB-INF/components.xml
                 [testng] 2008-10-06 11:21:31,852 INFO  *main* Initialization.initComponentsFromXmlDocuments:143 [] reading jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-ioc.jar!/META-INF/components.xml
                 [testng] 2008-10-06 11:21:31,883 INFO  *main* Initialization.initComponentsFromXmlDocuments:143 [] reading jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-remoting.jar!/META-INF/components.xml
                 [testng] 2008-10-06 11:21:31,883 INFO  *main* Initialization.initComponentsFromXmlDocuments:143 [] reading jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/components.xml
                 [testng] 2008-10-06 11:21:31,899 INFO  *main* Initialization.initComponentsFromXmlDocuments:143 [] reading jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/jboss-seam.jar!/META-INF/components.xml
                 [testng] 2008-10-06 11:21:31,915 INFO  *main* Initialization.loadFromResource:926 [] reading properties from: /seam.properties
                 [testng] 2008-10-06 11:21:31,930 DEBUG *main* Initialization.loadFromResource:947 [] not found: /jndi.properties
                 [testng] 2008-10-06 11:21:31,930 DEBUG *main* Initialization.loadFromResource:947 [] not found: /seam-jndi.properties
                 [testng] 2008-10-06 11:21:31,930 INFO  *main* Initialization.init:605 [] initializing Seam
                 [testng] 2008-10-06 11:21:31,930 DEBUG *main* ServletLifecycle.beginInitialization:78 [] >>> Begin initialization
                 [testng] 2008-10-06 11:21:32,055 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,055 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,055 DEBUG *main* Initialization.createHotDeployment:727 [] Using Java hot deploy
                 [testng] 2008-10-06 11:21:32,149 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.core.resourceLoader
                 [testng] 2008-10-06 11:21:32,180 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.core.manager
                 [testng] 2008-10-06 11:21:32,196 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.web.parameters
                 [testng] 2008-10-06 11:21:32,196 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.transaction.transaction
                 [testng] 2008-10-06 11:21:32,196 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.web.userPrincipal
                 [testng] 2008-10-06 11:21:32,227 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.core.locale
                 [testng] 2008-10-06 11:21:32,227 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider
                 [testng] 2008-10-06 11:21:32,227 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.core.expressions
                 [testng] 2008-10-06 11:21:32,243 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.web.isUserInRole
                 [testng] 2008-10-06 11:21:32,243 INFO  *main* Initialization.addComponentDescriptor:513 [] two components with same name, higher precedence wins: org.jboss.seam.core.locale
                 [testng] 2008-10-06 11:21:32,321 INFO  *main* Component.<init>:230 [] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
                 [testng] 2008-10-06 11:21:32,352 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.newInstance:2022 [] instantiating Seam component: org.jboss.seam.core.init
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.initialize:1440 [] initializing new instance of: org.jboss.seam.core.init
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.initialize:1457 [] done initializing: org.jboss.seam.core.init
                 [testng] 2008-10-06 11:21:32,368 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.events
                 [testng] 2008-10-06 11:21:32,383 DEBUG *main* DeploymentStrategy.addHandler:271 [] Adding org.jboss.seam.bpm.PageflowDeploymentHandler as a deployment handler
                 [testng] 2008-10-06 11:21:32,383 DEBUG *main* DeploymentStrategy.initScanner:207 [] Using default URLScanner
                 [testng] 2008-10-06 11:21:32,399 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web
                 [testng] 2008-10-06 11:21:32,399 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\CVS
                 [testng] 2008-10-06 11:21:32,399 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images
                 [testng] 2008-10-06 11:21:32,399 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\corporate
                 [testng] 2008-10-06 11:21:32,415 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\corporate\CVS
                 [testng] 2008-10-06 11:21:32,415 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\CVS
                 [testng] 2008-10-06 11:21:32,415 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\icons
                 [testng] 2008-10-06 11:21:32,430 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\icons\CVS
                 [testng] 2008-10-06 11:21:32,430 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\login
                 [testng] 2008-10-06 11:21:32,430 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\images\login\CVS
                 [testng] 2008-10-06 11:21:32,446 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\pages
                 [testng] 2008-10-06 11:21:32,446 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\pages\CVS
                 [testng] 2008-10-06 11:21:32,462 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\pages\includes
                 [testng] 2008-10-06 11:21:32,462 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\pages\includes\CVS
                 [testng] 2008-10-06 11:21:32,477 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\pages\templates
                 [testng] 2008-10-06 11:21:32,477 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\pages\templates\CVS
                 [testng] 2008-10-06 11:21:32,477 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\scripts
                 [testng] 2008-10-06 11:21:32,477 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\scripts\corporate
                 [testng] 2008-10-06 11:21:32,477 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\scripts\corporate\CVS
                 [testng] 2008-10-06 11:21:32,477 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\scripts\CVS
                 [testng] 2008-10-06 11:21:32,493 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\scripts\login
                 [testng] 2008-10-06 11:21:32,493 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\scripts\login\CVS
                 [testng] 2008-10-06 11:21:32,493 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\styles
                 [testng] 2008-10-06 11:21:32,493 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\styles\CVS
                 [testng] 2008-10-06 11:21:32,493 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\styles\login
                 [testng] 2008-10-06 11:21:32,508 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\styles\login\CVS
                 [testng] 2008-10-06 11:21:32,508 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF
                 [testng] 2008-10-06 11:21:32,524 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes
                 [testng] 2008-10-06 11:21:32,524 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com
                 [testng] 2008-10-06 11:21:32,524 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd
                 [testng] 2008-10-06 11:21:32,524 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app
                 [testng] 2008-10-06 11:21:32,524 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar
                 [testng] 2008-10-06 11:21:32,540 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\backing
                 [testng] 2008-10-06 11:21:32,540 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\core
                 [testng] 2008-10-06 11:21:32,540 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\core\constants
                 [testng] 2008-10-06 11:21:32,540 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\core\version
                 [testng] 2008-10-06 11:21:32,540 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\i18n
                 [testng] 2008-10-06 11:21:32,540 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\login
                 [testng] 2008-10-06 11:21:32,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\login\backing
                 [testng] 2008-10-06 11:21:32,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\login\constants
                 [testng] 2008-10-06 11:21:32,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\login\logging
                 [testng] 2008-10-06 11:21:32,555 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\app\tar\util
                 [testng] 2008-10-06 11:21:32,571 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\com\expd\common
                 [testng] 2008-10-06 11:21:32,571 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\META-INF
                 [testng] 2008-10-06 11:21:32,571 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\classes\resources
                 [testng] 2008-10-06 11:21:32,587 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\CVS
                 [testng] 2008-10-06 11:21:32,587 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\lib
                 [testng] 2008-10-06 11:21:32,587 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\lib\CVS
                 [testng] 2008-10-06 11:21:32,618 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\resources
                 [testng] 2008-10-06 11:21:32,633 DEBUG *main* URLScanner.handleDirectory:134 [] directory: C:\development\workspaces\rp\tar\web\WEB-INF\resources\CVS



              Fairly straight-forward, huh?

              • 4. Re: Seam Integration Test Problem
                fastnsilver

                I also note that Seam is successfully loading multiple contexts...


                 [testng] 2008-10-06 11:21:35,087 INFO  *main* Contexts.startup:303 [] starting up: org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,087 DEBUG *main* Component.newInstance:2022 [] instantiating Seam component: org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,087 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,087 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,087 DEBUG *main* Component.initialize:1440 [] initializing new instance of: org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,102 DEBUG *main* Component.initialize:1457 [] done initializing: org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,290 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postCreate.org.jboss.seam.ioc.spring.springELResolver
                   [testng] 2008-10-06 11:21:35,290 INFO  *main* Contexts.startup:303 [] starting up: org.jboss.seam.ioc.spring.contextLoader
                   [testng] 2008-10-06 11:21:35,290 DEBUG *main* Component.newInstance:2022 [] instantiating Seam component: org.jboss.seam.ioc.spring.contextLoader
                   [testng] 2008-10-06 11:21:35,290 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.ioc.spring.contextLoader
                   [testng] 2008-10-06 11:21:35,290 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.ioc.spring.contextLoader
                   [testng] 2008-10-06 11:21:35,290 DEBUG *main* Component.initialize:1440 [] initializing new instance of: org.jboss.seam.ioc.spring.contextLoader
                   [testng] 2008-10-06 11:21:35,290 DEBUG *main* Component.initialize:1457 [] done initializing: org.jboss.seam.ioc.spring.contextLoader
                   [testng] 2008-10-06 11:21:35,477 INFO  *main* XmlWebApplicationContext.prepareRefresh:378 [] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1f6f27b: display name [Root WebApplicationContext]; startup date [Mon Oct 06 11:21:35 PDT 2008]; root of context hierarchy
                   [testng] 2008-10-06 11:21:35,743 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from file [C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\login\logging\applicationContext-logging.xml]
                   [testng] 2008-10-06 11:21:36,743 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from URL [jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/tar-core.jar!/com/expd/app/tar/core/provider/userprofile/applicationContext-persistence-provider.xml]
                   [testng] 2008-10-06 11:21:36,821 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from URL [jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/tar-core.jar!/com/expd/app/tar/core/version/applicationContext-version.xml]
                   [testng] 2008-10-06 11:21:36,837 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from URL [jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/tar-core.jar!/com/expd/app/tar/login/strategy/applicationContext-strategy.xml]
                   [testng] 2008-10-06 11:21:36,868 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from URL [jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/tar-core.jar!/com/expd/app/tar/security/service/applicationContext-security.xml]
                   [testng] 2008-10-06 11:21:37,009 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from file [C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\applicationContext.xml]
                   [testng] 2008-10-06 11:21:37,071 INFO  *main* DefaultListableBeanFactory.registerBeanDefinition:324 [] Overriding bean definition for bean 'versionReader': replacing [Root bean: class [com.expd.app.tar.core.version.VersionReader]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/tar-core.jar!/com/expd/app/tar/core/version/applicationContext-version.xml]] with [Root bean: class [com.expd.app.tar.core.version.VersionReader]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [C:\development\workspaces\rp\tar\dist\exploded\WEB-INF\classes\com\expd\app\tar\applicationContext.xml]]
                   [testng] 2008-10-06 11:21:37,071 INFO  *main* XmlBeanDefinitionReader.loadBeanDefinitions:293 [] Loading XML bean definitions from URL [jar:file:/C:/development/workspaces/rp/tar/dist/exploded/WEB-INF/lib/vrui.jar!/com/expd/app/applicationContext.xml]
                   [testng] 2008-10-06 11:21:37,149 INFO  *main* XmlWebApplicationContext.obtainFreshBeanFactory:393 [] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1f6f27b]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1302fc5
                   [testng] 2008-10-06 11:21:37,399 INFO  *main* XmlWebApplicationContext.postProcessAfterInitialization:1006 [] Bean 'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
                   [testng] 2008-10-06 11:21:37,415 INFO  *main* DefaultListableBeanFactory.preInstantiateSingletons:275 [] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1302fc5: defining beans [userProfileDataProvider,userProfileDataFactory,userProfileBusinessProvider,userProfileBusinessFactory,versionReader,adminSessionProvider,accessControlStrategy,authenticationStrategy,authorizationStrategy,securityService,dataSource,entityManagerFactorySpring,entityManagerFactory,txManager,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor,loginCommand,logoutCommand,eulaSignedCommand,forcedLoginCommand,passwordForceChangedCommand,isAuthenticatedCommand,isSessionExpiredCommand,reportDefinitionLookupStrategy,searchSubmissionStrategy,summarySearchSubmissionStrategy,searchCommand,emailReportCommand,summaryCommand,metaDataCommand,referenceTabCommand,searchDetailsCommand,promptCommand,platformProfile]; root of factory hierarchy



                So far so good.  Note the last line, loginCommand is but one of several initialized beans.


                And a little later on before the exception I see this...


                 [testng] 2008-10-06 11:21:50,806 DEBUG *main* Component.getValueToInject:2195 [] trying to inject with EL expression: #{loginCommand}
                   [testng] 2008-10-06 11:21:50,806 DEBUG *main* Component.getInstance:1927 [] seam component not found: loginCommand
                   [testng] 2008-10-06 11:21:50,806 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.core.loginCommand
                   [testng] 2008-10-06 11:21:50,806 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.cache.loginCommand
                   [testng] 2008-10-06 11:21:50,806 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.transaction.loginCommand
                   [testng] 2008-10-06 11:21:50,806 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.framework.loginCommand
                   [testng] 2008-10-06 11:21:50,821 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.web.loginCommand
                   [testng] 2008-10-06 11:21:50,821 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.faces.loginCommand
                   [testng] 2008-10-06 11:21:50,821 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.international.loginCommand
                   [testng] 2008-10-06 11:21:50,821 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.theme.loginCommand
                   [testng] 2008-10-06 11:21:50,821 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.pageflow.loginCommand
                   [testng] 2008-10-06 11:21:50,821 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.bpm.loginCommand
                   [testng] 2008-10-06 11:21:50,837 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.jms.loginCommand
                   [testng] 2008-10-06 11:21:50,837 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.mail.loginCommand
                   [testng] 2008-10-06 11:21:50,837 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.security.loginCommand
                   [testng] 2008-10-06 11:21:50,837 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.security.management.loginCommand
                   [testng] 2008-10-06 11:21:50,837 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.security.permission.loginCommand
                   [testng] 2008-10-06 11:21:50,853 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.captcha.loginCommand
                   [testng] 2008-10-06 11:21:50,853 DEBUG *main* Component.getInstance:1927 [] seam component not found: org.jboss.seam.excel.exporter.loginCommand
                   [testng] 2008-10-06 11:21:50,853 DEBUG *main* SpringELResolver.getValue:100 [] Successfully resolved property 'loginCommand' in root WebApplicationContext



                The last line above is comforting.


                But the following is what has me worried...


                 [testng] 2008-10-06 11:21:52,415 DEBUG *main* Contexts.flushAndDestroyContexts:355 [] destroying business process context
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroyContext.BUSINESS_PROCESS
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postDestroyContext.BUSINESS_PROCESS
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Contexts.flushAndDestroyContexts:362 [] destroying conversation context
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroyContext.CONVERSATION
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.international.statusMessages
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.international.statusMessages
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postDestroyContext.CONVERSATION
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Contexts.flushAndDestroyContexts:370 [] flushing server-side conversation context
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Component.newInstance:2022 [] instantiating Seam component: org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,431 DEBUG *main* Component.initialize:1440 [] initializing new instance of: org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Component.initialize:1457 [] done initializing: org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Contexts.flushAndDestroyContexts:384 [] flushing session context
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preSetVariable.sessionListener
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postSetVariable.sessionListener
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Contexts.flushAndDestroyContexts:393 [] destroying event context
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroyContext.EVENT
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.manager
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.manager
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.transaction.synchronizations
                   [testng] 2008-10-06 11:21:52,446 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.transaction.synchronizations
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.conversationPropagation
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.conversationPropagation
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.faces.validation
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.faces.validation
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: param
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.web.requestContextPath
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.transaction.transaction
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.transaction.transaction
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.web.servletContexts
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.web.servletContexts
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.web.requestServletPath
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postDestroyContext.EVENT
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* FacesLifecycle.endRequest:143 [] <<< End JSF request for /project/page.seam
                   [testng] 2008-10-06 11:21:52,462 DEBUG *main* Lifecycle.endSession:213 [] End of session, destroying contexts
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Lifecycle.endSession:237 [] destroying conversation contexts: []
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Lifecycle.endSession:248 [] destroying session context
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Component.newInstance:2022 [] instantiating Seam component: org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Component.initialize:1440 [] initializing new instance of: org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Component.initialize:1457 [] done initializing: org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroyContext.SESSION
                   [testng] 2008-10-06 11:21:52,478 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.security.credentials
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.security.credentials
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.security.ruleBasedPermissionResolver
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.security.ruleBasedPermissionResolver
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.security.identity
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.security.identity
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.web.session
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.web.session
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.security.rememberMe
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.security.rememberMe
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Contexts.destroy:244 [] destroying: sessionListener
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.sessionListener
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,493 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.conversationEntries
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postDestroyContext.SESSION
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroyContext.CONVERSATION
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postDestroyContext.CONVERSATION
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroyContext.EVENT
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Contexts.destroy:244 [] destroying: org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.events
                   [testng] 2008-10-06 11:21:52,509 DEBUG *main* Events.raiseEvent:62 [] Processing event:org.jboss.seam.postDestroyContext.EVENT



                Is the SeamTest framework pre-maturely destroying context before the test executes?

                • 5. Re: Seam Integration Test Problem
                  youngm
                  I'm not the best at Seam Integration Tests but your configuration looks fine.
                  Looking at the test the key line of code appears to be:

                  setValue("#{loginBean.loginCommand}", loginCommand);

                  So it appears to me that the line of code above is attempting to set "loginCommand" to the expression #{loginBean.loginCommand}.  Does EL Require a bean property or at least a "setter" to set a value in #{loginBean.loginCommand}?

                  Wouldn't you need a:
                  public String setLoginCommand(LoginCommand loginCommand) {
                  this.loginCommand = loginCommand
                  }

                  Now if you added this Seam would screw it up.  As soon as #{loginBean.login} is invoked Seam will ReInject loginCommand with @In(value="#{loginCommand}") which will overwrite your property.

                  I don't know if you can possibly do:

                  setValue("#{loginCommand}", loginCommand); to override what #{loginCommand} evaluates too or if you need to put login command in a scope that gets evaluated in the EL before Spring gets checked?  Maybe in the Event scope?  "ScopeType.EVENT.getContext().set("loginCommand", loginCommand)?

                  Does any of that help?

                  Mike
                  • 6. Re: Seam Integration Test Problem
                    fastnsilver

                    Thanks for your reply Mike.


                    I did try to add a setter but that didn't work.


                    I was looking here, particularly at how to configure Seam scoped Spring beans.


                    I will attach the applicationContext.xml I use for LoginBean and its dependents (I've asterisked out certain parts to protect the innocent ;) )...


                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
                    <beans>
                    
                         <bean id="dataSource"
                              class="org.springframework.jdbc.datasource.DriverManagerDataSource">
                              <!-- <property name="driverClassName" value="com.ibm.db2.jcc.DB2Driver" />
                              <property name="url"
                                   value="jdbc:db2://*********:*****/*****" /> -->
                              <property name="driverClassName" value="COM.ibm.db2.jdbc.app.DB2Driver" />
                              <property name="url"
                                   value="jdbc:db2:tartest" />
                              <property name="username" value="****" />
                              <property name="password" value="****" />
                         </bean>
                         
                         <bean id="entityManagerFactorySpring"
                              class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                              <property name="persistenceUnitName" value="*****" />
                              <property name="dataSource" ref="dataSource" />
                              <property name="jpaDialect">
                                   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect"/>
                              </property>
                              <property name="jpaVendorAdapter">
                                   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                                        <property name="showSql" value="true" />
                                        <property name="generateDdl" value="false" />
                                        <property name="databasePlatform" value="org.hibernate.dialect.DB2Dialect"/>
                                   </bean>
                              </property>
                         </bean>
                         
                         <bean id="entityManagerFactory" class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBean">
                               <property name="persistenceContextName" value="entityManager"/>
                               <property name="persistenceUnitName" value="*****:seam"/>
                         </bean>
                    
                         <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
                                <property name="dataSource" ref="dataSource"/>
                         </bean>
                    
                         <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor">
                               <property name="defaultPersistenceUnitName" value="tartest:seam"/>
                         </bean>
                    
                         <bean id="loginCommand" class="com.expd.app.tar.login.command.LoginCommand">
                              <property name="accessControlStrategy" ref="accessControlStrategy" />
                              <property name="authenticationStrategy" ref="authenticationStrategy" />
                              <property name="authorizationStrategy" ref="authorizationStrategy" />
                         </bean>
                         <bean id="logoutCommand" class="com.expd.app.tar.login.command.LogoutCommand">
                              <property name="accessControlStrategy" ref="accessControlStrategy" />
                         </bean>
                         <bean id="eulaSignedCommand" class="com.expd.app.tar.login.command.EulaSignedCommand">
                              <property name="accessControlStrategy" ref="accessControlStrategy" />
                         </bean>
                         <bean id="forcedLoginCommand" class="com.expd.app.tar.login.command.ForcedLoginCommand">
                              <property name="accessControlStrategy" ref="accessControlStrategy" />
                              <property name="authenticationStrategy" ref="authenticationStrategy" />
                              <property name="authorizationStrategy" ref="authorizationStrategy" />
                         </bean>
                         <bean id="passwordForceChangedCommand"
                              class="com.expd.app.tar.login.command.PasswordForceChangedCommand">
                              <property name="accessControlStrategy" ref="accessControlStrategy" />
                              <property name="authenticationStrategy" ref="authenticationStrategy" />
                         </bean>
                         <bean id="isAuthenticatedCommand" class="com.expd.app.tar.login.command.IsAuthenticatedCommand" />
                         <bean id="isSessionExpiredCommand" class="com.expd.app.tar.login.command.IsSessionExpiredCommand" />
                         <bean id="versionReader" class="com.expd.app.tar.core.version.VersionReader" />
                    </beans>



                    Note I'm not including the

                    <seam:configure-scopes/>

                    instruction, nor a
                    scope

                    attribute on each bean, i.e., loginCommand.


                    Could this be the problem? The loginCommand bean depends upon a couple of strategy beans.  I'm going to experiment.

                    • 7. Re: Seam Integration Test Problem
                      youngm
                      The setter isn't going to work because:

                           @In(value="#{loginCommand}")
                           private Command<LoginResult, LoginAction> loginCommand;

                      Is going to override what was set when login() gets invoked.  But you should at least get a different error.  The problem will be that when login() gets invoked it will replace loginCommand with the resolution of #{loginCommand} and will replace your stubbed loginCommand...

                      Did you try:

                      ScopeType.EVENT.getContext().set("loginCommand", loginCommand);

                      instead of

                      setValue("#{loginBean.loginCommand}", loginCommand);
                      • 8. Re: Seam Integration Test Problem
                        fastnsilver

                        Mike.  You rock!  Your suggestion was spot on!


                        I was a little worried about having to scope Spring beans for use in Seam components.


                        Clearly, I'll have to shore my understanding of Seam's enhancements to the JSF lifecycle.  What I want to cement is when it's best to use one approach versus the other (set vs. setValue).


                        Thanks again.