3 Replies Latest reply on Jun 20, 2008 7:34 AM by dhinojosa

    ant test using JDK 1.6

      When I run ant test with JDK 1.6, I get a stacktrace that starts with:



      test:
         [testng] [Parser] Running:
         [testng]   /home/twoputt/projects/open18/test-build/RegisterActionTest.xml
         [testng]
         [testng] ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Described: name=BeanDeployer state=PreInstall
         [testng] java.lang.RuntimeException: java.lang.reflect.UndeclaredThrowableException
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.methodHash(ClassInfoMethodHashing.java:70)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.addDeclaredMethods(ClassInfoMethodHashing.java:169)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.populateMethodTables(ClassInfoMethodHashing.java:182)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.populateMethodTables(ClassInfoMethodHashing.java:181)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.populateMethodTables(ClassInfoMethodHashing.java:181)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.populateMethodTables(ClassInfoMethodHashing.java:181)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.populateMethodTables(ClassInfoMethodHashing.java:181)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.populateMethodTables(ClassInfoMethodHashing.java:181)
         [testng]     at org.jboss.aop.util.ClassInfoMethodHashing.getMethodMap(ClassInfoMethodHashing.java:188)
         [testng]     at org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getMethodAnnotationDependencies(AOPDependencyBuilder.java:197)
         [testng]     at org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getAnnotationDependencies(AOPDependencyBuilder.java:152)
         [testng]     at org.jboss.aop.microcontainer.integration.AOPDependencyBuilder.getDependencies(AOPDependencyBuilder.java:130)
         [testng]     at org.jboss.classadapter.plugins.BasicClassAdapter.getDependencies(BasicClassAdapter.java:80)
         [testng]     at org.jboss.beans.info.plugins.AbstractBeanInfo.getDependencies(AbstractBeanInfo.java:211)
      



      If I run with 1.5, everything works. Is there anything special I have to do to use 1.6?

        • 1. Re: ant test using JDK 1.6
          charliepower76

          It's because JBoss Embedded is incompatible with Java 6. But there is a patch to make it work, I don't know if it is official or not and if it works with the version of JBoss embedded shipped with Seam tough.

          • 2. Re: ant test using JDK 1.6

            In JBoss, I found mention of a JVM settiong



            -Dsun.lang.ClassLoader.allowArraySyntax=true




            but I don't know how to attach that setting to embedded JBoss. I didn't see any mention of a patch.


            Where else should I look?

            • 3. Re: ant test using JDK 1.6
              dhinojosa

              Oh you are here too...


              Documentation says that integration testing only works on Java 5.0 and not Java 6.0. I was able to make it work for Java 6.0 by adding:


              <sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/> to the testng task.
              



              I posted this on the Seam in Action post too.