5 Replies Latest reply on Aug 16, 2010 3:20 PM by dotnetmobile

    Issue by running a SeamTest

    dotnetmobile

      I am developing a Web project with seam 2.1 which is available at
      http://code.google.com/p/ezmanager.
      I have created a SeamTest for testing a specific web page:


      http://code.google.com/p/ezmanager/source/browse/trunk/project/ezmanager-test/test-src/org/ezmanager/test/BaseStatusListPageTest.java


      Toe test it I have installed TestNG under eclipse.
      Then I have created a debug configuration under testNG to select the test class BaseStatusListPageTest and the method testConnection.


      By trying to debug it I get the following errors. Could you please help me to set up correctly the test?




      -------------------------------------------------------
      [Parser] Running:
        /tmp/testng-eclipse/testng-customsuite.xml
      
      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Described: name=BeanDeployer state=PreInstall
      java.lang.RuntimeException: java.lang.reflect.UndeclaredThrowableException
      
      ...
      FAILED CONFIGURATION: @BeforeSuite startSeam
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      SARDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      ServiceDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      ServiceClassLoaderDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      BeanDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      ServiceDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      BeanMetaDataDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      KernelDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
      
      
              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
              at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:149)
              at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183)
              at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195)
              at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
              at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
              at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
              at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
      ... Removed 15 stack frames
      SKIPPED CONFIGURATION: @BeforeClass setupClass
      SKIPPED CONFIGURATION: @BeforeMethod begin
      SKIPPED CONFIGURATION: @AfterMethod end
      SKIPPED CONFIGURATION: @AfterClass cleanupClass
      SKIPPED: testConnection
      
      ===============================================
          org.ezmanager.test.BaseStatusListPageTest
          Tests run: 1, Failures: 0, Skips: 1
          Configuration Failures: 1, Skips: 4
      ===============================================
      
      
      ===============================================
      ezmanager-test
      Total tests run: 1, Failures: 0, Skips: 1
      Configuration Failures: 1, Skips: 5
      ===============================================



        • 1. Re: Issue by running a SeamTest
          hbender
          Seems to be the java 6 array classloading issue.
          Try to run with command line:
          -Dsun.lang.ClassLoader.allowArraySyntax=true

          See also:
          http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212

          Heri
          • 2. Re: Issue by running a SeamTest
            dotnetmobile


            Hi Heri,
            
            First of all many thanks for your feedback. I am currently using java version 1.6.0_20.
            I have the feeling that the issue is much more related to the way I am setting up the eclipse testNG to run the specified test above.
            Do you know if there is somewhere a video showing how to test a user interface by using testNG under eclipse.
            I have bough the book Seam in Action from Dan Allen but by reading the section how to create a SeamTest I don't find any explanation showing how to configure it properly under eclipse.
            
            I am a little bit frustrated because my project is running perfectly and I want to consolidate it by putting some user interface tests which I am not able to see them running under my eclipse environment.
            
            Best Regards
            Michel



            • 3. Re: Issue by running a SeamTest
              hbender
              I'm not an expert at all, and do not know any videos about seam. I had the same problem when I tried to run my first NG test which could be solved by the mentioned command line.

              The cited exception is typically for this issue:

              java.lang.ClassNotFoundException: [Ljava.lang.Class;

              Try to run your NG test with the commandline:

              -Dsun.lang.ClassLoader.allowArraySyntax=true

              and you should go fine.

              Heri
              • 4. Re: Issue by running a SeamTest
                dotnetmobile

                Hi Henri,


                I tried it but it didn't work.


                Michel

                • 5. Re: Issue by running a SeamTest
                  dotnetmobile

                  Hi Henry,
                  finally I got it running. For sure I had to add the options you mentioned above but my most important issue was the way I have generated the project. Initially I used JBossTools under eclipse to create the project. After some investigation I decided to recreate the project structure by using seam-gen: the folders structure is completely different and it is appropriated to run the SeamTest.
                  Many thanks for your help.
                  Michel