2 Replies Latest reply on Jan 21, 2006 5:05 PM by Dan Maher

    Running the Seam example TestNG tests

    Dan Maher Newbie

      Hi there. I come humbly, hat in hand, to ask for help running the TestNG tests with the seam 1.0 beta distribution.

      I have successfully run the apps in as jboss-4.0.3SP1 and even added my own beans to the app. Very impressive.

      However I need help running the TestNG tests, as I am a junit guy.

      I have the jboss-seam-1.0beta1 filesystem set up in Eclipse 3.1.1. I have the TestNG plug-in installed, and I also made sure that the jboss-seam-1.0beta1\microcontainer\conf directory was on the source path.

      When I right-click the jboss-seam-1.0beta1\examples\booking\src\org\jboss\seam\example\booking\test\testng.xml file to run as a TestNG test, I get:






      INFO 20-01 15:59:43,889 (Initialization.java:init:58) -initializing Seam
      INFO 20-01 15:59:43,920 (Component.java:<init>:144) -Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      INFO 20-01 15:59:44,200 (Component.java:<init>:144) -Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
      INFO 20-01 15:59:44,240 (Component.java:<init>:144) -Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
      INFO 20-01 15:59:44,250 (Component.java:<init>:144) -Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
      INFO 20-01 15:59:44,260 (Component.java:<init>:144) -Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
      INFO 20-01 15:59:44,290 (Component.java:<init>:144) -Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
      INFO 20-01 15:59:44,300 (Component.java:<init>:144) -Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
      INFO 20-01 15:59:44,300 (Component.java:<init>:144) -Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
      INFO 20-01 15:59:44,310 (Component.java:<init>:144) -Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
      INFO 20-01 15:59:44,320 (Component.java:<init>:144) -Component: org.jboss.seam.core.ejb, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Ejb
      INFO 20-01 15:59:44,350 (Component.java:<init>:144) -Component: bookingDatabase, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
      INFO 20-01 15:59:44,370 (Ejb.java:startup:39) -starting the embedded EJB container
      INFO 20-01 15:59:45,672 (TransactionManagerFactory.java:getTransactionManager:27) -starting JTA transaction manager
      INFO 20-01 15:59:45,933 (DataSourceFactory.java:getDataSource:40) -starting Datasource at JNDI name: java:/noejbDatasource
      INFO 20-01 15:59:45,943 (LocalTxDataSource.java:bindConnectionFactory:102) -Bound datasource to JNDI name 'java:/noejbDatasource'
      INFO 20-01 15:59:46,013 (Environment.java:<clinit>:470) -Hibernate 3.1 beta 3
      INFO 20-01 15:59:46,013 (Environment.java:<clinit>:500) -hibernate.properties not found
      INFO 20-01 15:59:46,023 (Environment.java:<clinit>:516) -using CGLIB reflection optimizer
      INFO 20-01 15:59:46,023 (Environment.java:<clinit>:546) -using JDK 1.4 java.sql.Timestamp handling
      INFO 20-01 15:59:46,093 (Configuration.java:configure:1239) -configuring from resource: /hibernate.cfg.xml
      INFO 20-01 15:59:46,093 (Configuration.java:getConfigurationInputStream:1216) -Configuration resource: /hibernate.cfg.xml
      ERROR 20-01 15:59:46,103 (AbstractController.java:incrementState:332) -Error installing to Instantiated: name=bookingDatabase state=Described
      org.hibernate.HibernateException: /hibernate.cfg.xml not found
       at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:140)
       at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1218)
       at org.hibernate.cfg.Configuration.configure(Configuration.java:1240)
       at org.hibernate.cfg.Configuration.configure(Configuration.java:1227)
       at org.jboss.seam.microcontainer.HibernateFactory.getSessionFactory(HibernateFactory.java:21)
       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.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:57)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$InstantiateAction.installAction(KernelControllerContextActions.java:152)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:84)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:36)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:211)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:560)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:328)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:411)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:361)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:207)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:133)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:257)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:236)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:87)
       at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:70)
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:54)
       at org.jboss.seam.core.Ejb.deploy(Ejb.java:59)
       at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callCreateMethod(Component.java:872)
       at org.jboss.seam.Component.newInstance(Component.java:853)
       at org.jboss.seam.Component.getInstance(Component.java:818)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:67)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:47)
       at org.jboss.seam.init.Initialization.init(Initialization.java:62)
       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:150)
       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:427)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:301)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:147)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:78)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      FAILED: org.jboss.seam.mock.SeamTest.init()
      java.lang.RuntimeException: java.lang.IllegalStateException: Incompletely deployed:
      
      *** DEPLOYMENTS IN ERROR:
      bookingDatabase -> org.hibernate.HibernateException: /hibernate.cfg.xml not found
      
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:59)
       at org.jboss.seam.core.Ejb.deploy(Ejb.java:59)
       at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callCreateMethod(Component.java:872)
       at org.jboss.seam.Component.newInstance(Component.java:853)
       at org.jboss.seam.Component.getInstance(Component.java:818)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:67)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:47)
       at org.jboss.seam.init.Initialization.init(Initialization.java:62)
       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:150)
       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:427)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:301)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:147)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:78)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      Caused by: java.lang.IllegalStateException: Incompletely deployed:
      
      *** DEPLOYMENTS IN ERROR:
      bookingDatabase -> org.hibernate.HibernateException: /hibernate.cfg.xml not found
      
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:216)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:134)
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:55)
       ... 29 more
      
      FAILED: org.jboss.seam.example.booking.test.LoginTest.testLogin()
      java.lang.NullPointerException
       at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:75)
       at org.jboss.seam.example.booking.test.LoginTest.testLogin(LoginTest.java:45)
       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:427)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:378)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:546)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:89)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      
      SKIPPED: begin
      SKIPPED: end
      SKIPPED: cleanup
      
      ===============================================
       Login
       Tests run: 5, Failures: 2, Skips: 3
      ===============================================
      
      INFO 20-01 15:59:46,273 (Initialization.java:init:58) -initializing Seam
      INFO 20-01 15:59:46,273 (Component.java:<init>:144) -Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      INFO 20-01 15:59:46,313 (Component.java:<init>:144) -Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
      INFO 20-01 15:59:46,363 (Component.java:<init>:144) -Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
      INFO 20-01 15:59:46,383 (Component.java:<init>:144) -Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
      INFO 20-01 15:59:46,413 (Component.java:<init>:144) -Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
      INFO 20-01 15:59:46,444 (Component.java:<init>:144) -Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
      INFO 20-01 15:59:46,454 (Component.java:<init>:144) -Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
      INFO 20-01 15:59:46,464 (Component.java:<init>:144) -Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
      INFO 20-01 15:59:46,474 (Component.java:<init>:144) -Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
      INFO 20-01 15:59:46,514 (Component.java:<init>:144) -Component: org.jboss.seam.core.ejb, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Ejb
      INFO 20-01 15:59:46,524 (Component.java:<init>:144) -Component: bookingDatabase, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
      INFO 20-01 15:59:46,554 (Ejb.java:startup:39) -starting the embedded EJB container
      INFO 20-01 15:59:46,824 (TransactionManagerFactory.java:getTransactionManager:27) -starting JTA transaction manager
      INFO 20-01 15:59:46,834 (DataSourceFactory.java:getDataSource:40) -starting Datasource at JNDI name: java:/noejbDatasource
      INFO 20-01 15:59:46,834 (LocalTxDataSource.java:bindConnectionFactory:102) -Bound datasource to JNDI name 'java:/noejbDatasource'
      INFO 20-01 15:59:46,834 (Configuration.java:configure:1239) -configuring from resource: /hibernate.cfg.xml
      INFO 20-01 15:59:46,834 (Configuration.java:getConfigurationInputStream:1216) -Configuration resource: /hibernate.cfg.xml
      ERROR 20-01 15:59:46,844 (AbstractController.java:incrementState:332) -Error installing to Instantiated: name=bookingDatabase state=Described
      org.hibernate.HibernateException: /hibernate.cfg.xml not found
       at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:140)
       at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1218)
       at org.hibernate.cfg.Configuration.configure(Configuration.java:1240)
       at org.hibernate.cfg.Configuration.configure(Configuration.java:1227)
       at org.jboss.seam.microcontainer.HibernateFactory.getSessionFactory(HibernateFactory.java:21)
       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.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:57)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$InstantiateAction.installAction(KernelControllerContextActions.java:152)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:84)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:36)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:211)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:560)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:328)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:411)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:361)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:207)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:133)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:257)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:236)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:87)
       at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:70)
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:54)
       at org.jboss.seam.core.Ejb.deploy(Ejb.java:59)
       at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callCreateMethod(Component.java:872)
       at org.jboss.seam.Component.newInstance(Component.java:853)
       at org.jboss.seam.Component.getInstance(Component.java:818)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:67)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:47)
       at org.jboss.seam.init.Initialization.init(Initialization.java:62)
       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:150)
       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:427)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:301)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:147)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:78)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      FAILED: org.jboss.seam.mock.SeamTest.init()
      java.lang.RuntimeException: java.lang.IllegalStateException: Incompletely deployed:
      
      *** DEPLOYMENTS IN ERROR:
      bookingDatabase -> org.hibernate.HibernateException: /hibernate.cfg.xml not found
      
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:59)
       at org.jboss.seam.core.Ejb.deploy(Ejb.java:59)
       at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callCreateMethod(Component.java:872)
       at org.jboss.seam.Component.newInstance(Component.java:853)
       at org.jboss.seam.Component.getInstance(Component.java:818)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:67)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:47)
       at org.jboss.seam.init.Initialization.init(Initialization.java:62)
       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:150)
       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:427)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:301)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:147)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:78)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      Caused by: java.lang.IllegalStateException: Incompletely deployed:
      
      *** DEPLOYMENTS IN ERROR:
      bookingDatabase -> org.hibernate.HibernateException: /hibernate.cfg.xml not found
      
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:216)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:134)
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:55)
       ... 29 more
      
      FAILED: org.jboss.seam.example.booking.test.BookingTest.testBookHotel()
      java.lang.NullPointerException
       at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:75)
       at org.jboss.seam.example.booking.test.BookingTest.testBookHotel(BookingTest.java:67)
       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:427)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:378)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:546)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:89)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      
      SKIPPED: begin
      SKIPPED: end
      SKIPPED: cleanup
      
      ===============================================
       Booking
       Tests run: 5, Failures: 2, Skips: 3
      ===============================================
      
      INFO 20-01 15:59:46,864 (Initialization.java:init:58) -initializing Seam
      INFO 20-01 15:59:46,864 (Component.java:<init>:144) -Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      INFO 20-01 15:59:46,884 (Component.java:<init>:144) -Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
      INFO 20-01 15:59:46,894 (Component.java:<init>:144) -Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
      INFO 20-01 15:59:46,904 (Component.java:<init>:144) -Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
      INFO 20-01 15:59:46,914 (Component.java:<init>:144) -Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
      INFO 20-01 15:59:46,974 (Component.java:<init>:144) -Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
      INFO 20-01 15:59:46,984 (Component.java:<init>:144) -Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
      INFO 20-01 15:59:46,994 (Component.java:<init>:144) -Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
      INFO 20-01 15:59:46,994 (Component.java:<init>:144) -Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
      INFO 20-01 15:59:47,004 (Component.java:<init>:144) -Component: org.jboss.seam.core.ejb, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Ejb
      INFO 20-01 15:59:47,004 (Component.java:<init>:144) -Component: bookingDatabase, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
      INFO 20-01 15:59:47,014 (Ejb.java:startup:39) -starting the embedded EJB container
      INFO 20-01 15:59:47,065 (TransactionManagerFactory.java:getTransactionManager:27) -starting JTA transaction manager
      INFO 20-01 15:59:47,075 (DataSourceFactory.java:getDataSource:40) -starting Datasource at JNDI name: java:/noejbDatasource
      INFO 20-01 15:59:47,075 (LocalTxDataSource.java:bindConnectionFactory:102) -Bound datasource to JNDI name 'java:/noejbDatasource'
      INFO 20-01 15:59:47,075 (Configuration.java:configure:1239) -configuring from resource: /hibernate.cfg.xml
      INFO 20-01 15:59:47,075 (Configuration.java:getConfigurationInputStream:1216) -Configuration resource: /hibernate.cfg.xml
      ERROR 20-01 15:59:47,085 (AbstractController.java:incrementState:332) -Error installing to Instantiated: name=bookingDatabase state=Described
      org.hibernate.HibernateException: /hibernate.cfg.xml not found
       at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:140)
       at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1218)
       at org.hibernate.cfg.Configuration.configure(Configuration.java:1240)
       at org.hibernate.cfg.Configuration.configure(Configuration.java:1227)
       at org.jboss.seam.microcontainer.HibernateFactory.getSessionFactory(HibernateFactory.java:21)
       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.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:57)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$InstantiateAction.installAction(KernelControllerContextActions.java:152)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:84)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:36)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:211)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:560)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:328)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:411)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:361)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:207)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:133)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:257)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:236)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:87)
       at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:70)
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:54)
       at org.jboss.seam.core.Ejb.deploy(Ejb.java:59)
       at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callCreateMethod(Component.java:872)
       at org.jboss.seam.Component.newInstance(Component.java:853)
       at org.jboss.seam.Component.getInstance(Component.java:818)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:67)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:47)
       at org.jboss.seam.init.Initialization.init(Initialization.java:62)
       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:150)
       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:427)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:301)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:147)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:78)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      FAILED: org.jboss.seam.mock.SeamTest.init()
      java.lang.RuntimeException: java.lang.IllegalStateException: Incompletely deployed:
      
      *** DEPLOYMENTS IN ERROR:
      bookingDatabase -> org.hibernate.HibernateException: /hibernate.cfg.xml not found
      
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:59)
       at org.jboss.seam.core.Ejb.deploy(Ejb.java:59)
       at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
       at org.jboss.seam.Component.callCreateMethod(Component.java:872)
       at org.jboss.seam.Component.newInstance(Component.java:853)
       at org.jboss.seam.Component.getInstance(Component.java:818)
       at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:67)
       at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:47)
       at org.jboss.seam.init.Initialization.init(Initialization.java:62)
       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:150)
       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:427)
       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:301)
       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:147)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:78)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      Caused by: java.lang.IllegalStateException: Incompletely deployed:
      
      *** DEPLOYMENTS IN ERROR:
      bookingDatabase -> org.hibernate.HibernateException: /hibernate.cfg.xml not found
      
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:216)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:134)
       at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.deployXmlResource(EJB3StandaloneBootstrap.java:55)
       ... 29 more
      
      FAILED: org.jboss.seam.example.booking.test.ChangePasswordTest.testChangePassword()
      java.lang.NullPointerException
       at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:75)
       at org.jboss.seam.example.booking.test.ChangePasswordTest.testChangePassword(ChangePasswordTest.java:62)
       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:427)
       at org.testng.internal.Invoker.invokeMethod(Invoker.java:378)
       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:546)
       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:89)
       at org.testng.TestRunner.privateRun(TestRunner.java:620)
       at org.testng.TestRunner.run(TestRunner.java:503)
       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:201)
       at org.testng.SuiteRunner.run(SuiteRunner.java:128)
       at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:99)
       at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
      
      SKIPPED: begin
      SKIPPED: end
      SKIPPED: cleanup
      
      ===============================================
       ChangePassword
       Tests run: 5, Failures: 2, Skips: 3
      ===============================================
      
      Creating C:\dpm\java\randd\jboss-seam-1.0beta1\testng-failures.xml
      
      ===============================================
      Hotel Booking
      Total tests run: 15, Failures: 6, Skips: 9
      ===============================================
      
      
      
      



      Not sure how to get around this. I have written hibernate apps in the past and this file is of course essential. But in a new ejb3 app? I'm left scratching my head. Thanks in advance.