[jboss-user] [JBoss Seam] - problem with Integration test in Seam 2.0.0 GA

seamdev do-not-reply at jboss.com
Tue Dec 18 16:21:03 EST 2007


I am trying to use integration test in Seam 2.0.0GA and getting authenticator not found error. Please tell me what is wrong in my setup? I had tried to setup classpath for testing by reverse engineering the build.xml in examples dir and info in readme.txt - pls let me know if something is wrong there..


  | Test case:
  | 
  | public class LoginTest extends SeamTest{
  | 	
  | 	@Test(groups = { "login" })
  | 	public void testSuccessfulLogin() throws Exception{
  | 		
  | 		new FacesRequest(){
  | 			
  | 			@Override
  | 			protected void processValidations() throws Exception{
  | 				validateValue("#{identity.username}","testaccount");
  | 				validateValue("#{identity.password}","password");
  | 			}
  | 			
  | 			@Override
  | 			protected void updateModelValues() throws Exception{
  | 				setValue("#{identity.username}","testaccount");
  | 				setValue("#{identity.password}","password");				
  | 			}
  | 			
  | 			@Override 
  | 			protected void invokeApplication(){
  | 				invokeMethod("#{identity.login}");	
  | 				assert getValue("#{identity.loggedIn}").equals(Boolean.TRUE);
  | 			}
  | 					
  | 		}.run();
  | 	}
  | }
  | 



  | Log:
  | 
  | [testng]   C:\proj\testsrc\com\login\test\testng.xml
  |    [testng] 14:45:03,541 WARN  [UnifiedLoaderRepository3] Tried to add non-URLClassLoader.  Ignored
  |    [testng] 14:45:04,494 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
  |    [testng] 14:45:04,494 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
  |    [testng] 14:45:04,557 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TxControl_1] - Name of XA node not defined. Using -639de6b2:c2d6:47683150:0
  |    [testng] 14:45:04,588 INFO  [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_1] - Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 49878
  |    [testng] 14:45:04,588 INFO  [arjLogger] TransactionStatusManagerItem - host: 127.0.0.1 port: 49878
  |    [testng] 14:45:04,619 INFO  [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_3] - TransactionStatusManager started on port 49878 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
  |    [testng] 14:45:04,619 INFO  [tsmxLogger] Registering mbean for module 'arjuna'
  |    [testng] 14:45:04,635 INFO  [tsmxLogger] Initialising JMX agent com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
  |    [testng] 14:45:04,650 INFO  [TransactionManagerService] Starting recovery manager
  |    [testng] 14:45:04,650 INFO  [arjLogger] 
  |    [testng]   --- Start RecoveryActivators 
  |    [testng] 14:45:04,650 INFO  [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.recovery.ready] RecoveryManagerImple is ready on port 49,879
  |    [testng] 14:45:04,650 INFO  [TransactionManagerService] Recovery manager started
  |    [testng] 14:45:04,666 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
  |    [testng] 14:45:06,322 INFO  [RARDeployment] Required license terms exist, view vfsfile:/C:/proj/lib/bootstrap/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
  |    [testng] 14:45:06,385 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
  |    [testng] 14:45:06,385 INFO  [RARDeployment] Required license terms exist, view vfsfile:/C:/proj/lib/bootstrap/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
  |    [testng] 14:45:06,385 INFO  [RARDeployment] Required license terms exist, view vfsfile:/C:/proj/lib/bootstrap/deploy/jms-ra.rar/META-INF/ra.xml
  |    [testng] 14:45:06,854 WARN  [JDBCPersistenceManager] 
  |    [testng] JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently NONE.
  |    [testng]                          Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
  |    [testng]                          Using an isolation level more strict than READ_COMMITTED may lead to deadlock.
  |    [testng] 14:45:06,979 INFO  [ServerPeer] ServerPeer[0] creating server peer with ID 0
  |    [testng] 14:45:07,338 INFO  [ServerPeer] JBoss Messaging 1.2.0.sp1 server [0] started
  |    [testng] 14:45:07,369 INFO  [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,369 INFO  [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,369 INFO  [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,369 INFO  [QueueService] Queue[/queue/PrivateDLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,369 INFO  [QueueService] Queue[/queue/QueueWithOwnDLQAndExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,416 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
  |    [testng] 14:45:07,416 INFO  [ConnectionFactory] [/ConnectionFactory, /XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory] started
  |    [testng] 14:45:07,416 INFO  [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,416 INFO  [QueueService] Queue[/queue/PrivateExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,416 INFO  [QueueService] Queue[/queue/QueueWithOwnRedeliveryDelay] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  |    [testng] 14:45:07,432 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JmsXA' to JNDI name 'java:JmsXA'
  |    [testng] 14:45:07,885 INFO  [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3 with dependencies:
  |    [testng] 14:45:08,010 INFO  [EJBContainer] STARTED EJB: org.jboss.seam.async.TimerServiceDispatcher ejbName: TimerServiceDispatcher
  |    [testng] 14:45:08,041 WARN  [JBossTimerServiceFactory] TIMER SERVICE IS NOT INSTALLED
  |    [testng] 14:45:08,041 INFO  [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3 with dependencies:
  |    [testng] 14:45:08,088 INFO  [EJBContainer] STARTED EJB: org.jboss.seam.transaction.EjbSynchronizations ejbName: EjbSynchronizations
  |    [testng] 14:45:10,010 ERROR [SeamLoginModule] Error invoking login method
  |    [testng] javax.el.PropertyNotFoundException: Target Unreachable, identifier 'authenticator' resolved to null
  |    [testng] 	at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38)
  |    [testng] 	at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
  |    [testng] 	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |    [testng] 	at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
  |    [testng] 	at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:108)
  |    [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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
  |    [testng] 	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
  |    [testng] 	at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
  |    [testng] 	at java.security.AccessController.doPrivileged(Native Method)
  |    [testng] 	at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
  |    [testng] 	at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
  |    [testng] 	at org.jboss.seam.security.Identity.authenticate(Identity.java:335)
  |    [testng] 	at org.jboss.seam.security.Identity.authenticate(Identity.java:324)
  |    [testng] 	at org.jboss.seam.security.Identity.quietLogin(Identity.java:265)
  |    [testng] 	at org.jboss.seam.security.Identity.isLoggedIn(Identity.java:182)
  |    [testng] 	at org.jboss.seam.security.Identity.isLoggedIn(Identity.java:172)
  |    [testng] 	at org.jboss.seam.security.Identity.authenticate(Identity.java:322)
  |    [testng] 	at org.jboss.seam.security.Identity.login(Identity.java:237)
  |    [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.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
  |    [testng] 	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
  |    [testng] 	at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
  |    [testng] 	at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
  |    [testng] 	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.invokeMethod(BaseSeamTest.java:483)
  |    [testng] 	at com.login.test.LoginTest$1.invokeApplication(LoginTest.java:45)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.invokeApplicationPhase(BaseSeamTest.java:652)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:598)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:185)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:519)
  |    [testng] 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  |    [testng] 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
  |    [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.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:44)
  |    [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:514)
  |    [testng] 	at com.login.test.LoginTest.testSuccessfulLogin(LoginTest.java:29)
  |    [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.invokeMethod(Invoker.java:470)
  |    [testng] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:564)
  |    [testng] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:830)
  |    [testng] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
  |    [testng] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
  |    [testng] 	at org.testng.TestRunner.runWorkers(TestRunner.java:678)
  |    [testng] 	at org.testng.TestRunner.privateRun(TestRunner.java:624)
  |    [testng] 	at org.testng.TestRunner.run(TestRunner.java:495)
  |    [testng] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
  |    [testng] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
  |    [testng] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
  |    [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] 14:45:10,025 ERROR [SeamLoginModule] Error invoking login method
  |    [testng] javax.el.PropertyNotFoundException: Target Unreachable, identifier 'authenticator' resolved to null
  |    [testng] 	at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38)
  |    [testng] 	at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
  |    [testng] 	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |    [testng] 	at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
  |    [testng] 	at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:108)
  |    [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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
  |    [testng] 	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
  |    [testng] 	at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
  |    [testng] 	at java.security.AccessController.doPrivileged(Native Method)
  |    [testng] 	at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
  |    [testng] 	at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
  |    [testng] 	at org.jboss.seam.security.Identity.authenticate(Identity.java:335)
  |    [testng] 	at org.jboss.seam.security.Identity.authenticate(Identity.java:324)
  |    [testng] 	at org.jboss.seam.security.Identity.login(Identity.java:237)
  |    [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.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
  |    [testng] 	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
  |    [testng] 	at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
  |    [testng] 	at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
  |    [testng] 	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.invokeMethod(BaseSeamTest.java:483)
  |    [testng] 	at com.login.test.LoginTest$1.invokeApplication(LoginTest.java:45)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.invokeApplicationPhase(BaseSeamTest.java:652)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:598)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:185)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:519)
  |    [testng] 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  |    [testng] 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
  |    [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.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:44)
  |    [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:514)
  |    [testng] 	at com.login.test.LoginTest.testSuccessfulLogin(LoginTest.java:29)
  |    [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.invokeMethod(Invoker.java:470)
  |    [testng] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:564)
  |    [testng] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:830)
  |    [testng] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
  |    [testng] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
  |    [testng] 	at org.testng.TestRunner.runWorkers(TestRunner.java:678)
  |    [testng] 	at org.testng.TestRunner.privateRun(TestRunner.java:624)
  |    [testng] 	at org.testng.TestRunner.run(TestRunner.java:495)
  |    [testng] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
  |    [testng] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
  |    [testng] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
  |    [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] FAILED: testSuccessfulLogin
  |    [testng] java.lang.AssertionError
  |    [testng] 	at com.login.test.LoginTest$1.invokeApplication(LoginTest.java:46)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.invokeApplicationPhase(BaseSeamTest.java:652)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:598)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:185)
  |    [testng] 	at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:519)
  |    [testng] 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
  |    [testng] 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
  |    [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.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:44)
  |    [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:514)
  |    [testng] 	at com.login.test.LoginTest.testSuccessfulLogin(LoginTest.java:29)
  |    [testng] ... Removed 22 stack frames
  |    [testng] ===============================================
  |    [testng]     Login
  |    [testng]     Tests run: 1, Failures: 1, Skips: 0
  |    [testng] ===============================================
  |    [testng] ===============================================
  |    [testng] Security
  |    [testng] Total tests run: 1, Failures: 1, Skips: 0
  |    [testng] ===============================================
  | 



  | Classpath:
  | 
  | 	C:\proj\lib\jaxws\FastInfoset.jar
  | 	C:\proj\lib\jaxws\activation.jar
  | 	C:\proj\lib\jaxws\http.jar
  | 	C:\proj\lib\jaxws\jaxb-api.jar
  | 	C:\proj\lib\jaxws\jaxb-impl.jar
  | 	C:\proj\lib\jaxws\jaxb-xjc.jar
  | 	C:\proj\lib\jaxws\jaxws-api.jar
  | 	C:\proj\lib\jaxws\jaxws-rt.jar
  | 	C:\proj\lib\jaxws\jaxws-tools.jar
  | 	C:\proj\lib\jaxws\jsr173_api.jar
  | 	C:\proj\lib\jaxws\jsr181-api.jar
  | 	C:\proj\lib\jaxws\jsr250-api.jar
  | 	C:\proj\lib\jaxws\resolver.jar
  | 	C:\proj\lib\jaxws\saaj-api.jar
  | 	C:\proj\lib\jaxws\saaj-impl.jar
  | 	C:\proj\lib\jaxws\servlet.jar
  | 	C:\proj\lib\jaxws\sjsxp.jar
  | 	C:\proj\lib\jaxws\stax-ex.jar
  | 	C:\proj\lib\jaxws\streambuffer.jar
  | 	C:\proj\src
  | 	C:\proj\build\classes
  | 	C:\proj\WebContent\WEB-INF\classes
  | 	C:\proj\lib\bootstrap
  | 	C:\proj\WebContent
  | 	C:\proj\lib\test\hibernate-all.jar
  | 	C:\proj\lib\test\jboss-embedded-all.jar
  | 	C:\proj\lib\test\thirdparty-all.jar
  | 	C:\proj\lib\seam\activation.jar
  | 	C:\proj\lib\seam\antlr.jar
  | 	C:\proj\lib\seam\cglib.jar
  | 	C:\proj\lib\seam\commons-beanutils.jar
  | 	C:\proj\lib\seam\commons-collections.jar
  | 	C:\proj\lib\seam\commons-digester.jar
  | 	C:\proj\lib\seam\commons-logging.jar
  | 	C:\proj\lib\seam\dom4j.jar
  | 	C:\proj\lib\seam\el-api.jar
  | 	C:\proj\lib\seam\el-ri.jar
  | 	C:\proj\lib\seam\hibernate-commons-annotations.jar
  | 	C:\proj\lib\seam\hibernate-entitymanager.jar
  | 	C:\proj\lib\seam\hibernate-search.jar
  | 	C:\proj\lib\seam\hibernate-validator.jar
  | 	C:\proj\lib\seam\javassist.jar
  | 	C:\proj\lib\seam\jboss-common-core.jar
  | 	C:\proj\lib\seam\jboss-dependency.jar
  | 	C:\proj\lib\seam\jboss-deployers.jar
  | 	C:\proj\lib\seam\jboss-el.jar
  | 	C:\proj\lib\seam\jboss-embedded-api.jar
  | 	C:\proj\lib\seam\jboss-jmx.jar
  | 	C:\proj\lib\seam\jboss-kernel.jar
  | 	C:\proj\lib\seam\jboss-logging-spi.jar
  | 	C:\proj\lib\seam\jboss-seam-debug.jar
  | 	C:\proj\lib\seam\jboss-seam-gen.jar
  | 	C:\proj\lib\seam\jboss-seam-ioc.jar
  | 	C:\proj\lib\seam\jboss-seam-mail.jar
  | 	C:\proj\lib\seam\jboss-seam-pdf.jar
  | 	C:\proj\lib\seam\jboss-seam-remoting.jar
  | 	C:\proj\lib\seam\jboss-seam.jar
  | 	C:\proj\lib\seam\jboss-system.jar
  | 	C:\proj\lib\seam\jsf-api.jar
  | 	C:\proj\lib\seam\jsf-facelets.jar
  | 	C:\proj\lib\seam\jsf-impl.jar
  | 	C:\proj\lib\seam\jsr181-api.jar
  | 	C:\proj\lib\seam\jsr250-api.jar
  | 	C:\proj\lib\seam\jstl.jar
  | 	C:\proj\lib\seam\persistence-api.jar
  | 	C:\proj\lib\seam\richfaces-api.jar
  | 	C:\proj\lib\seam\richfaces-impl.jar
  | 	C:\proj\lib\seam\richfaces-ui.jar
  | 	C:\proj\lib\seam\servlet-api.jar
  | 	C:\proj\lib\testng-5.6-jdk15.jar	
  | 	C:\proj\WebContent\WEB-INF\lib\log4j.jar	
  | 	C:\proj\lib\xerces\resolver.jar
  | 	C:\proj\lib\xerces\serializer.jar
  | 	C:\proj\lib\xerces\xercesImpl.jar
  | 	C:\proj\lib\xerces\xml-apis.jar
  | 	C:\proj\lib\bootstrap\log4j.xml
  | 


  | testng.xml
  | 
  | <!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
  | 
  | <suite name="Security" verbose="2" parallel="false">
  | 
  |    <test name="Login">
  |      <classes>
  |        <class name="com.login.test.LoginTest"/>     
  |      </classes>
  |    </test> 
  | 
  |    	 
  | </suite>
  | 


Components.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <components xmlns="http://jboss.com/products/seam/components"
  |             xmlns:core="http://jboss.com/products/seam/core"
  |             xmlns:security="http://jboss.com/products/seam/security"
  |             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |             xsi:schemaLocation=
  |                 "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
  |                  http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
  |                  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
  | 
  |     <core:init debug="true"/>    
  | 
  |     <core:manager conversation-timeout="120000" 
  |                   concurrent-request-timeout="500"
  |                   conversation-id-parameter="cid"/>
  |                                     
  |     <security:identity authenticate-method="#{authenticator.authenticate}"/>  
  |     
  | </components>
  | 
  | 


AuthenticatorAction

  | 
  | @Name("authenticator")
  | public class AuthenticatorAction {
  | 
  | 	@Out(required = false, scope = SESSION)
  | 	private User user;
  | 	
  | 	@In(create=true)
  | 	private BO bo;
  | 
  | 	private static final Log log = LogFactory.getLog(AuthenticatorAction.class);
  | 	
  | 	public AuthenticatorAction(){		
  | 		super();
  | 	}
  | 	
  | 	public boolean authenticate() {
  | 		String username = Identity.instance().getUsername();
  | 		String password = Identity.instance().getPassword();
  | 		boolean success = authenticate(username, password);	
  | 		return success;
  | 	}
  | 	
  | 	public boolean authenticate(String username, String password) {
  | 				
  | 		try{
  | 			bo.authenticateUser(username, password);
  | 		}catch(AuthenticationException e){
  | 			log.error(e); 			
  | 			return false;
  | 		}
  |                 
  |                 .... create session scoped objects like User
  | 
  |                 return true;
  |         }
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113977#4113977

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113977



More information about the jboss-user mailing list