1 Reply Latest reply on Jun 2, 2006 4:40 PM by nugyentv

    Please help - TestNG Failed

    nugyentv Newbie

      Hi There,
      I checked out the latest jboss-seam code and followed the instruction to run testng. It runs ok if I run it through ant. When I run using testng plugin, everything seem function ok. But, the test failed when it tried to retreive the object from the contex.

      I also follow the instruction in the readme.txt to created a separated project and go the same error as when I run in in the jboss-seam project.

      Please help.

      Thanks,
      Robert

      This is the log:

      INFO 01-06 23:02:01,006 (Log4JLogger.java:info:94) -reading properties from: /seam.properties
      INFO 01-06 23:02:01,056 (Log4JLogger.java:info:94) -reading properties from: /jndi.properties
      INFO 01-06 23:02:01,096 (Log4JLogger.java:info:94) -initializing Seam
      INFO 01-06 23:02:01,616 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      INFO 01-06 23:02:02,428 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
      INFO 01-06 23:02:02,498 (Log4JLogger.java:info:94) -Component: events, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Events
      INFO 01-06 23:02:02,538 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
      INFO 01-06 23:02:02,628 (Log4JLogger.java:info:94) -Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
      INFO 01-06 23:02:02,668 (Log4JLogger.java:info:94) -Component: redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Redirect
      INFO 01-06 23:02:02,688 (Log4JLogger.java:info:94) -Component: httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.HttpError
      INFO 01-06 23:02:02,758 (Log4JLogger.java:info:94) -Component: userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.UserPrincipal
      INFO 01-06 23:02:02,818 (Log4JLogger.java:info:94) -Component: isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.IsUserInRole
      INFO 01-06 23:02:02,868 (Log4JLogger.java:info:94) -Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
      INFO 01-06 23:02:02,908 (Log4JLogger.java:info:94) -Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationList
      INFO 01-06 23:02:02,948 (Log4JLogger.java:info:94) -Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
      INFO 01-06 23:02:02,968 (Log4JLogger.java:info:94) -Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
      INFO 01-06 23:02:03,039 (Log4JLogger.java:info:94) -Component: pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext
      INFO 01-06 23:02:03,059 (Log4JLogger.java:info:94) -Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
      INFO 01-06 23:02:03,079 (Log4JLogger.java:info:94) -Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
      INFO 01-06 23:02:03,099 (Log4JLogger.java:info:94) -Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
      INFO 01-06 23:02:03,139 (Log4JLogger.java:info:94) -Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
      INFO 01-06 23:02:03,159 (Log4JLogger.java:info:94) -Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
      INFO 01-06 23:02:03,199 (Log4JLogger.java:info:94) -Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
      INFO 01-06 23:02:03,219 (Log4JLogger.java:info:94) -Component: locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
      INFO 01-06 23:02:03,269 (Log4JLogger.java:info:94) -Component: messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
      INFO 01-06 23:02:03,319 (Log4JLogger.java:info:94) -Component: interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
      INFO 01-06 23:02:03,359 (Log4JLogger.java:info:94) -Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMessages
      INFO 01-06 23:02:03,409 (Log4JLogger.java:info:94) -Component: resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle
      INFO 01-06 23:02:03,439 (Log4JLogger.java:info:94) -Component: localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelector
      INFO 01-06 23:02:03,489 (Log4JLogger.java:info:94) -Component: uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiComponent
      INFO 01-06 23:02:03,509 (Log4JLogger.java:info:94) -Component: org.jboss.seam.remoting.messaging.subscriptionRegistry, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
      INFO 01-06 23:02:03,579 (Log4JLogger.java:info:94) -Component: treeCache, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.TreeCache
      INFO 01-06 23:02:03,780 (Log4JLogger.java:info:94) -Component: org.jboss.seam.core.ejb, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Ejb
      INFO 01-06 23:02:03,910 (Log4JLogger.java:info:94) -scanning: T:\Apps\EclipseWorkspace\jboss-seam\examples\registration\resources
      INFO 01-06 23:02:04,100 (Log4JLogger.java:info:94) -starting the embedded EJB container
      WARN 01-06 23:02:06,934 (BeanSchemaBinding.java:init:227) -You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
      INFO 01-06 23:02:08,767 (LocalTxDataSource.java:bindConnectionFactory:117) -Bound datasource to JNDI name 'java:/DefaultDS'
      INFO 01-06 23:02:11,901 (Ejb3Deployment.java:create:467) -EJB3 deployment time took: 1652
      INFO 01-06 23:02:11,931 (MCKernelAbstraction.java:install:84) -installing bean: persistence.units:unitName=userDatabase with dependencies:
      INFO 01-06 23:02:11,931 (MCKernelAbstraction.java:install:87) - AbstractDependencyMetaData@15d8d75{dependency=DefaultDS}
      INFO 01-06 23:02:12,322 (Log4JLogger.java:info:94) -Hibernate EntityManager 3.2.0.CR1
      INFO 01-06 23:02:12,512 (Log4JLogger.java:info:94) -Hibernate Annotations 3.2.0.CR1
      INFO 01-06 23:02:12,542 (Log4JLogger.java:info:94) -Hibernate 3.2 cr2
      INFO 01-06 23:02:12,592 (Log4JLogger.java:info:94) -hibernate.properties not found
      INFO 01-06 23:02:12,592 (Log4JLogger.java:info:94) -Bytecode provider name : cglib
      INFO 01-06 23:02:12,692 (Log4JLogger.java:info:94) -using JDK 1.4 java.sql.Timestamp handling
      INFO 01-06 23:02:13,233 (Log4JLogger.java:info:94) -Processing PersistenceUnitInfo [
      name: userDatabase
      ...]
      WARN 01-06 23:02:13,524 (Log4JLogger.java:warn:104) -Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
      WARN 01-06 23:02:13,584 (Log4JLogger.java:warn:104) -Defining hibernate.transaction.flush_before_completion=true ignored in HEM
      INFO 01-06 23:02:13,594 (Log4JLogger.java:info:94) -Reading mappings from resource: META-INF/orm.xml
      INFO 01-06 23:02:13,614 (Log4JLogger.java:info:94) -[PersistenceUnit: userDatabase] no META-INF/orm.xml found
      WARN 01-06 23:02:14,004 (Log4JLogger.java:warn:104) -Property [hibernate.cglib.use_reflection_optimizer] has been renamed to [hibernate.bytecode.use_reflection_optimizer]; update your properties appropriately
      INFO 01-06 23:02:14,014 (Log4JLogger.java:info:94) -Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      INFO 01-06 23:02:14,144 (Log4JLogger.java:info:94) -Using provided datasource
      INFO 01-06 23:02:15,116 (Log4JLogger.java:info:94) -RDBMS: HSQL Database Engine, version: 1.8.0
      INFO 01-06 23:02:15,116 (Log4JLogger.java:info:94) -JDBC driver: HSQL Database Engine Driver, version: 1.8.0
      INFO 01-06 23:02:15,466 (Log4JLogger.java:info:94) -Using dialect: org.hibernate.dialect.HSQLDialect
      INFO 01-06 23:02:15,707 (Log4JLogger.java:info:94) -Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
      INFO 01-06 23:02:15,717 (Log4JLogger.java:info:94) -instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      INFO 01-06 23:02:15,737 (Log4JLogger.java:info:94) -instantiated TransactionManagerLookup
      INFO 01-06 23:02:15,737 (Log4JLogger.java:info:94) -Automatic flush during beforeCompletion(): disabled
      INFO 01-06 23:02:15,737 (Log4JLogger.java:info:94) -Automatic session close at end of transaction: disabled
      INFO 01-06 23:02:15,737 (Log4JLogger.java:info:94) -JDBC batch size: 15
      INFO 01-06 23:02:15,737 (Log4JLogger.java:info:94) -JDBC batch updates for versioned data: disabled
      INFO 01-06 23:02:15,747 (Log4JLogger.java:info:94) -Scrollable result sets: enabled
      INFO 01-06 23:02:15,747 (Log4JLogger.java:info:94) -JDBC3 getGeneratedKeys(): disabled
      INFO 01-06 23:02:15,747 (Log4JLogger.java:info:94) -Connection release mode: after_statement
      INFO 01-06 23:02:15,757 (Log4JLogger.java:info:94) -Default batch fetch size: 1
      INFO 01-06 23:02:15,757 (Log4JLogger.java:info:94) -Generate SQL with comments: disabled
      INFO 01-06 23:02:15,757 (Log4JLogger.java:info:94) -Order SQL updates by primary key: disabled
      INFO 01-06 23:02:15,757 (Log4JLogger.java:info:94) -Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      INFO 01-06 23:02:15,817 (Log4JLogger.java:info:94) -Using ASTQueryTranslatorFactory
      INFO 01-06 23:02:15,817 (Log4JLogger.java:info:94) -Query language substitutions: {}
      INFO 01-06 23:02:15,817 (Log4JLogger.java:info:94) -Second-level cache: enabled
      INFO 01-06 23:02:15,817 (Log4JLogger.java:info:94) -Query cache: disabled
      INFO 01-06 23:02:15,827 (Log4JLogger.java:info:94) -Cache provider: org.hibernate.cache.HashtableCacheProvider
      INFO 01-06 23:02:15,847 (Log4JLogger.java:info:94) -Optimize cache for minimal puts: disabled
      INFO 01-06 23:02:15,847 (Log4JLogger.java:info:94) -Structured second-level cache entries: disabled
      INFO 01-06 23:02:15,897 (Log4JLogger.java:info:94) -Statistics: disabled
      INFO 01-06 23:02:15,897 (Log4JLogger.java:info:94) -Deleted entity synthetic identifier rollback: disabled
      INFO 01-06 23:02:15,897 (Log4JLogger.java:info:94) -Default entity-mode: pojo
      INFO 01-06 23:02:16,147 (Log4JLogger.java:info:94) -building session factory
      INFO 01-06 23:02:16,177 (Log4JLogger.java:info:94) -Not binding factory to JNDI, no JNDI name configured
      INFO 01-06 23:02:16,187 (Log4JLogger.java:info:94) -Running hbm2ddl schema export
      INFO 01-06 23:02:16,217 (Log4JLogger.java:info:94) -exporting generated schema to database
      INFO 01-06 23:02:16,247 (Log4JLogger.java:info:94) -schema export complete
      INFO 01-06 23:02:16,268 (Log4JLogger.java:info:94) -JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      INFO 01-06 23:02:16,328 (Log4JLogger.java:info:94) -done initializing Seam
      INFO 01-06 23:02:16,758 (Log4JLogger.java:info:94) -stopping the embedded EJB container
      INFO 01-06 23:02:16,758 (Log4JLogger.java:info:94) -closing
      INFO 01-06 23:02:16,758 (Log4JLogger.java:info:94) -Running hbm2ddl schema export
      INFO 01-06 23:02:16,788 (Log4JLogger.java:info:94) -exporting generated schema to database
      INFO 01-06 23:02:16,798 (Log4JLogger.java:info:94) -schema export complete
      FAILED: testLogin
      java.lang.AssertionError
      at org.jboss.seam.example.registration.test.RegisterTest$1.updateModelValues(RegisterTest.java:26)
      at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:235)
      at org.jboss.seam.example.registration.test.RegisterTest.testLogin(RegisterTest.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:407)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:778)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
      at org.testng.TestRunner.privateRun(TestRunner.java:682)
      at org.testng.TestRunner.run(TestRunner.java:566)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:220)
      at org.testng.SuiteRunner.run(SuiteRunner.java:146)
      at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:98)
      at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)


      ===============================================
      Register
      Tests run: 1, Failures: 1, Skips: 0
      ===============================================


      ===============================================
      Registration
      Total tests run: 1, Failures: 1, Skips: 0
      ===============================================