10 Replies Latest reply on Apr 7, 2009 9:26 PM by Dan Allen

    Running tests using Mysql Database

    Ulises Fasoli Newbie

      Hello all,
                I'm new to seam and I'm trying to follow the open18 example that comes with the Seam in action book but i'm having some troubles when I try to run a simple test using a Mysql Database instead of HSQLDB.


      I followed the instructions these instructions in order to create a DataSource and then copy the file inside the bootstrap/deploy folder but now I get the following error message :



      [testng] java.lang.AssertionError: javax.el.ELException: javax.ejb.EJBTransactionRolledbackException: EntityManagerFactory not found in JNDI : java:/open18EntityManagerFactory
         [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.onException(AbstractSeamTest.java:455)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request$2.doFilter(AbstractSeamTest.java:504)
         [testng]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
         [testng]      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
         [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.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
         [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:491)
         [testng]      at org.open18.test.RegisterGolfIntegrationTest.registerValidGolfer(RegisterGolfIntegrationTest.java:24)
         [testng] Caused by: javax.el.ELException: javax.ejb.EJBTransactionRolledbackException: EntityManagerFactory not found in JNDI : java:/open18EntityManagerFactory
         [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
         [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
         [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.AbstractSeamTest$Request.invokeMethod(AbstractSeamTest.java:463)
         [testng]      at org.open18.test.RegisterGolfIntegrationTest$2.invokeApplication(RegisterGolfIntegrationTest.java:42)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.invokeApplicationPhase(AbstractSeamTest.java:646)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.emulateJsfLifecycle(AbstractSeamTest.java:595)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request.access$300(AbstractSeamTest.java:177)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest$Request$2.doFilter(AbstractSeamTest.java:497)
         [testng]      ... 44 more
         [testng] Caused by: javax.ejb.EJBTransactionRolledbackException: EntityManagerFactory not found in JNDI : java:/open18EntityManagerFactory
         [testng]      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:91)
         [testng]      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
         [testng]      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:86)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:166)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:261)
         [testng]      at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
         [testng]      at $Proxy88.register(Unknown Source)
         [testng]      at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
         [testng]      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
         [testng]      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
         [testng]      at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         [testng]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
         [testng]      at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
         [testng]      at org.javassist.tmp.java.lang.Object_$$_javassist_2.register(Object_$$_javassist_2.java)
         [testng]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
         [testng]      ... 54 more
         [testng] Caused by: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:/open18EntityManagerFactory
         [testng]      at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:245)
         [testng]      at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:78)
         [testng]      at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107)
         [testng]      at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
         [testng]      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
         [testng]      at org.jboss.seam.Component.callComponentMethod(Component.java:2211)
         [testng]      at org.jboss.seam.Component.unwrap(Component.java:2237)
         [testng]      at org.jboss.seam.Component.getInstance(Component.java:2004)
         [testng]      at org.jboss.seam.Component.getInstance(Component.java:1950)
         [testng]      at org.jboss.seam.Component.getInstance(Component.java:1944)
         [testng]      at org.jboss.seam.Component.getInstance(Component.java:1939)
         [testng]      at org.open18.session.RegisterActionBean.register(RegisterActionBean.java:59)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
         [testng]      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
         [testng]      at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
         [testng]      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         [testng]      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         [testng]      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         [testng]      at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:29)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         [testng]      at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:31)
         [testng]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
         [testng]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
         [testng]      at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
         [testng]      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
         [testng]      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
         [testng]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         [testng]      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
         [testng]      ... 89 more
         [testng] Caused by: javax.naming.NameNotFoundException: open18EntityManagerFactory not bound
         [testng]      at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)
         [testng]      at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)
         [testng]      at org.jnp.server.NamingServer.getObject(NamingServer.java:556)
         [testng]      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
         [testng]      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:669)
         [testng]      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
         [testng]      at javax.naming.InitialContext.lookup(InitialContext.java:351)
         [testng]      at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:241)
         [testng]      ... 139 more
         [testng] ... Removed 42 stack frames
         [testng] 
         [testng] ===============================================
         [testng]     RegisterAction Test
         [testng]     Tests run: 2, Failures: 1, Skips: 0
         [testng] ===============================================
         [testng] 
         [testng] 
         [testng] ===============================================
         [testng] RegisterAction Tests
         [testng] Total tests run: 2, Failures: 1, Skips: 0
         [testng] ===============================================
         [testng] 
      



      Here is the test that I'm trying to run




       @Test
          public void registerValidGolfer() throws Exception{
      
              new FacesRequest("/register.xhtml"){
      
                  @Override
                  protected void updateModelValues(){
      
                          Golfer g = (Golfer) Component.getInstance("newGolfer");
                              g.setFirstName("Tommy");
                              g.setLastName("TwoPutt");
                              g.setUsername("TwoPutt");
                              g.setEmailAddress("twoputt@open18.org");
                              setValue("#{passwordBean.password}", "ilovegolf");
                              setValue("#{passwordBean.confirm}", "ilovegolf");
      
                    }
      
                  @Override
                  protected void invokeApplication(){
      
                      String result = (String) invokeMethod("#{registerAction.register}");
                      //assert result != null && result.equals("success");
                  }
              }.run();




      Do I need to copy another file inside the deploy folder?


      Thanks in advance


      ufasoli


      Ps: I'm using Seam 2.1.1GA and jboss 4.2.2GA and running MAC OS Leopard







       

        • 1. Re: Running tests using Mysql Database
          d sailer Newbie

          dbl check your persistence.xml and yourdatasource-ds.xml file with a working example (or post the content here).

          • 2. Re: Running tests using Mysql Database
            Marcio Endo Newbie

            I followed the instructions these instructions in order to create a DataSource and then copy the file inside the bootstrap/deploy folder but now I get the following error message :


            Check the file you moved into bootstrap/deploy.


            My guess is that you need to make sure the -ds.xml you moved into bootstrap/deploy contains the following tag


            <jndi-name>open18EntityManagerFactory</jndi-name>



            Or perhaps you can edit your persistence.xml in the testing environment so it points to the correct jndi name.

            • 3. Re: Running tests using Mysql Database
              Ulises Fasoli Newbie

              Hi guys thant you for your answers i've tried what Marcio Endo sugested (adding the jndi-name line to the -ds.xml file) but it didn't work.


              Here are my persistance and datasource files :


              open18-test-ds.xml


              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
                 "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
              <datasources>
                 <local-tx-datasource>
                    <jndi-name>MySQLDS</jndi-name>
                    <connection-url>jdbc:mysql://localhost/open18</connection-url>
                    <driver-class>com.mysql.jdbc.Driver</driver-class>
                    <user-name>root</user-name>
                    <password>root</password>
                    
                 </local-tx-datasource>
              </datasources>



              and my persistance-test.xml



              <?xml version="1.0" encoding="UTF-8"?>
              <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                 version="1.0">
                 <persistence-unit name="open18" >
                    <provider>org.hibernate.ejb.HibernatePersistence</provider>
                    <jta-data-source>java:/MySQLDS</jta-data-source>
                    <properties>
                       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
                       <property name="hibernate.hbm2ddl.auto" value="none"/>
                       <property name="hibernate.transaction.manager_lookup_class"
                          value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
                    </properties>
                 </persistence-unit>
              </persistence>



              are there any mistakes in my config files??


              • 4. Re: Running tests using Mysql Database
                Marcio Endo Newbie

                They all seem ok to me.


                Perhaps adding the following to your persistence-test.xml?


                <property name="jboss.entity.manager.factory.jndi.name" value="java:/open18EntityManagerFactory" />


                • 5. Re: Running tests using Mysql Database
                  Dan Allen Master

                  Yes, but it depends on what is defined in the components.xml. Please reveal your components.xml file. You're problem is not with the datasource, but rather with your Seam managed persistence unit configuration.

                  • 6. Re: Running tests using Mysql Database
                    Ulises Fasoli Newbie

                    Sure here is my components.xml file


                    <?xml version="1.0" encoding="UTF-8"?>
                    <components xmlns="http://jboss.com/products/seam/components"
                                xmlns:core="http://jboss.com/products/seam/core"
                                xmlns:persistence="http://jboss.com/products/seam/persistence"
                                xmlns:drools="http://jboss.com/products/seam/drools"
                                xmlns:bpm="http://jboss.com/products/seam/bpm"
                                xmlns:security="http://jboss.com/products/seam/security"
                                xmlns:mail="http://jboss.com/products/seam/mail"
                                xmlns:web="http://jboss.com/products/seam/web"
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                xsi:schemaLocation=
                                    "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                                     http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                                     http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd
                                     http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd
                                     http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                                     http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                                     http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd
                                     http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
                    
                       <core:init debug="@debug@" jndi-pattern="@jndiPattern@"/>
                    
                       <core:manager concurrent-request-timeout="500"
                                     conversation-timeout="120000"
                                     conversation-id-parameter="cid"
                                     parent-conversation-id-parameter="pid"/>
                    
                       <web:hot-deploy-filter url-pattern="*.seam"/>
                    
                       <persistence:managed-persistence-context name="entityManager"
                                                         auto-create="true"
                                          persistence-unit-jndi-name="java:/open18EntityManagerFactory"/>
                    
                       <drools:rule-base name="securityRules">
                          <drools:rule-files>
                             <value>/security.drl</value>
                          </drools:rule-files>
                       </drools:rule-base>
                    
                       <security:rule-based-permission-resolver security-rules="#{securityRules}"/>
                    
                       <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>
                    
                       <event type="org.jboss.seam.security.notLoggedIn">
                          <action execute="#{redirect.captureCurrentView}"/>
                       </event>
                       <event type="org.jboss.seam.security.loginSuccessful">
                          <action execute="#{redirect.returnToCapturedView}"/>
                       </event>
                    
                       <mail:mail-session host="localhost" port="2525" username="test" password="test" />    
                    
                    
                    </components>
                    


                    • 7. Re: Running tests using Mysql Database
                      Ulises Fasoli Newbie

                      Marcio, adding the line :


                      <property name="jboss.entity.manager.factory.jndi.name" value="java:/open18EntityManagerFactory" />



                      did not work i now get this error



                      test:
                         [testng] [Parser] Running:
                         [testng]   /Users/ufasoli/workspaces/Idea/J2EE/Seam/open18/test-build/RegisterActionTest.xml
                         [testng] 
                         [testng] FAILED CONFIGURATION: @BeforeSuite startSeam
                         [testng] org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                         [testng] 
                         [testng] *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
                         [testng] 
                         [testng] persistence.units:jar=test-build.jar,unitName=open18
                         [testng]  -> <UNKNOWN>{Described:** UNRESOLVED Demands 'jboss.jca:name=MySQLDS,service=DataSourceBinding **}
                         [testng] 
                         [testng] 
                         [testng] *** CONTEXTS IN ERROR: Name -> Error
                         [testng] 
                         [testng] <UNKNOWN> -> ** UNRESOLVED Demands 'jboss.jca:name=MySQLDS,service=DataSourceBinding **
                         [testng] 
                         [testng] 
                         [testng]      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
                         [testng]      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
                         [testng]      at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
                         [testng]      at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
                         [testng]      at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
                         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
                         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
                         [testng]      at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
                         [testng] ... Removed 15 stack frames
                         [testng] SKIPPED CONFIGURATION: @BeforeClass setupClass
                         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
                         [testng] SKIPPED CONFIGURATION: @AfterMethod end
                         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
                         [testng] SKIPPED CONFIGURATION: @AfterMethod end
                         [testng] SKIPPED CONFIGURATION: @AfterClass cleanupClass
                         [testng] SKIPPED: test_register
                         [testng] SKIPPED: registerValidGolfer
                         [testng] 
                         [testng] ===============================================
                         [testng]     RegisterAction Test
                         [testng]     Tests run: 2, Failures: 0, Skips: 2
                         [testng]     Configuration Failures: 1, Skips: 6
                         [testng] ===============================================
                         [testng] 
                         [testng] 
                         [testng] ===============================================
                         [testng] RegisterAction Tests
                         [testng] Total tests run: 2, Failures: 0, Skips: 2
                         [testng] Configuration Failures: 1, Skips: 7
                         [testng] ===============================================
                         [testng] 
                      



                      • 8. Re: Running tests using Mysql Database
                        d sailer Newbie

                        at one point I tried switching my testng tests to use mysql instead of hsqldb. I had enough problems that it made me stop and rethink why I was doing that. You can use import.sql to set up a starting state for you hsqldb. You may have a good reasons but just thought I'd let ya know my experiences.

                        • 9. Re: Running tests using Mysql Database
                          Marcio Endo Newbie

                          d sailer made a good point here.


                          Anyways, it seems now that your open18-test-ds.xml is not getting deployed at all. Look through your logs and find the original exception which prevented its deployment. (you might need to enable the actual logging).

                          • 10. Re: Running tests using Mysql Database
                            Dan Allen Master

                            Yeah, it looks like you don't have the -ds.xml now. Double check that. Also...


                            If you are using:


                            <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/open18EntityManagerFactory"/>



                            you must also have the following property in your persistence.xml:


                            <property name="jboss.entity.manager.factory.jndi.name" value="java:/open18EntityManagerFactory" />



                            You should only be doing that if you are working with an EAR project.