0 Replies Latest reply on Jan 26, 2010 9:00 PM by mstoeckel.mstoeckel.cognodyne.com

    seangen generated TestNG configuration

    mstoeckel.mstoeckel.cognodyne.com

      I have a seamgen generated project (Seam 2.2.0GA with JBoss 5.1.0GA and Oracle 10G). When I run the TestNG by typing 'ant test' from a command line, I get the following error.




      test:
         [testng] [Parser] Running:
         [testng]   /Users/mstoeckel/projects/BFEM/bfem/test-build/BfemTest.xml
         [testng] 
         [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: testIsEmpty
         [testng] SKIPPED: testEquals
         [testng] 
         [testng] ===============================================
         [testng]     Unit Test
         [testng]     Tests run: 2, Failures: 0, Skips: 2
         [testng]     Configuration Failures: 0, Skips: 6
         [testng] ===============================================
         [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] jboss.jca:name=bfemDatasource,service=DataSourceBinding
         [testng]  -> jboss:service=invoker,type=jrmp{Create:** NOT FOUND **}
         [testng]  -> jboss:service=invoker,type=jrmp{Start:** NOT FOUND **}
         [testng] 
         [testng] 
         [testng] *** CONTEXTS IN ERROR: Name -> Error
         [testng] 
         [testng] jboss:service=invoker,type=jrmp -> ** NOT FOUND **
         [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.Bootstrap.bootstrapURL(Bootstrap.java:149)
         [testng]      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183)
         [testng]      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195)
         [testng]      at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
         [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: @AfterClass cleanupClass
         [testng] SKIPPED: testAuthentication
         [testng] 
         [testng] ===============================================
         [testng]     Integration Test
         [testng]     Tests run: 1, Failures: 0, Skips: 1
         [testng]     Configuration Failures: 1, Skips: 4
         [testng] ===============================================
         [testng] 
         [testng] 
         [testng] ===============================================
         [testng] Bfem Tests
         [testng] Total tests run: 3, Failures: 0, Skips: 3
         [testng] Configuration Failures: 1, Skips: 11
         [testng] ===============================================
         [testng] 
      



      My persistence.xml is



      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Persistence deployment descriptor for dev profile -->
      <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="bfem">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>bfemDatasource</jta-data-source>
            <properties>
               <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
               <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
               <property name="hibernate.show_sql" value="true"/>
               <property name="hibernate.format_sql" value="true"/>
               <property name="hibernate.default_schema" value="bfem"/>
               <property name="jboss.entity.manager.factory.jndi.name" value="java:/bfemEntityManagerFactory"/>
            </properties>
         </persistence-unit>
         
      </persistence>



      and the content of bootstrap/deploy/bfemtest-ds.xml is



      <?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>bfemDatasource</jndi-name>
                      <use-java-context>false</use-java-context>
                      <connection-url>jdbc:oracle:thin:@bfem_db:1521:epabfm</connection-url>
                      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                      <user-name>bfemtest</user-name>
                      <password>xxxxxx</password>
              </local-tx-datasource>
      
      </datasources>
      



      According to the seam reference 2.2.0 (Chapter 37.3.1), if you want to use another db (other than the Hypersonic),then simply drop a datasource file into bootstrap/deploy directory.  So, what do I need to do to make this work?
      I do not have any problem with deploying the same datasource file into the regular (non-embedded) JBoss 5.1.0GA server.
      Any help will be greatly appreciated.


      Thanks in advance,
      Michael