1 2 3 Previous Next 36 Replies Latest reply on Nov 12, 2007 4:25 PM by bsmithjj Go to original post
      • 15. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
        pmuir

        Well, that, or you need to look at SeamTest and replicate the functionality of the @BeforeClass etc. annotations in JUnit

        • 16. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

          It looks like you actually need more than the libs in the ${JBOSS_SEAM_HOME}/lib/test/ directory. So far, I've had to add these dependencies as well:

           <dependency><!-- required to boot jboss embedded -->
           <groupId>org.jboss.seam</groupId>
           <artifactId>jboss-embedded-api</artifactId>
           <version>2.0.0.CR3</version>
           <scope>test</scope>
           </dependency>
          
           <dependency><!-- required to boot jboss embedded -->
           <groupId>org.jboss.seam</groupId>
           <artifactId>jboss-deployers</artifactId>
           <version>2.0.0.CR3</version>
           <scope>test</scope>
           </dependency>
          


          but now I'm getting this exception:

          Test set: SampleEJB3Test
          -------------------------------------------------------------------------------
          Tests run: 2, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 1.033 sec <<< FAILURE!
          init(com.javaplant.mapper.police.PersistenceUnitConfigurationTest) Time elapsed: 0.038 sec <<< FAILURE!
          org.jboss.deployers.spi.DeploymentException: Unable to find bootstrap file: conf/bootstrap-beans.xml in classpath
           at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:200)
           at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
           at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
           at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
           at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
           at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
           at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
           at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
           at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
           at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
           at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
           at org.testng.TestRunner.runWorkers(TestRunner.java:673)
           at org.testng.TestRunner.privateRun(TestRunner.java:620)
           at org.testng.TestRunner.run(TestRunner.java:480)
           at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
           at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
           at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
           at org.testng.SuiteRunner.run(SuiteRunner.java:168)
           at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
           at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
           at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
           at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
           at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
           at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
          




          • 17. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

            so it looks like all that I learned about using JBoss embedded in Seam 1.2.1 and earlier is null and void. I see that I need to now figure out a project configuration that will copy the bootstrap directory stuff into target/test-classes and figure out all the stuff like this:

            init(com.javaplant.mapper.police.PersistenceUnitConfigurationTest) Time elapsed: 0.008 sec <<< FAILURE!
            org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
            *** CONTEXTS IN ERROR: Name -> Error
            ResourcesToDeploy3 -> java.net.MalformedURLException: unknown protocol: vfsfile
            ResourcesToDeploy2 -> java.net.MalformedURLException: unknown protocol: vfsfile
            ResourcesToDeploy -> java.net.MalformedURLException: unknown protocol: vfsfile
             at org.jboss.embedded.Bootstrap.checkIncomplete(Bootstrap.java:144)
             at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:169)
             at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
             at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
             at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
             at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
             at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
             at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
             at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
             at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
             at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
             at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
             at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
             at org.testng.TestRunner.runWorkers(TestRunner.java:673)
             at org.testng.TestRunner.privateRun(TestRunner.java:620)
             at org.testng.TestRunner.run(TestRunner.java:480)
             at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
             at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
             at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
             at org.testng.SuiteRunner.run(SuiteRunner.java:168)
             at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
             at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
             at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
             at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
             at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
             at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
            
            


            A whole new research project, when I already had a decent working solution for testing Seam stuff via maven2 - Totally frustrating!


            • 18. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
              pmuir

              In Seam 1.2 and earlier we used Embedded EJB3, now we use Embedded JBoss, two different projects.

              These are the instructions that I wrote for using the Eclipse TestNG plugin which you may find useful:

              If you want to run tests using the Eclipse TestNG plugin, you'll need to add
              these jars to the top of your TestNG classpath. Using the Run Dialog, select
              xml suite to run, and add /lib/test/jboss-embedded-all.jar,
              /lib/test/hibernate-all.jar, /lib/test/thirdparty-all.jar, /lib/embedded-api.jar,
              /lib/jboss-deployers.jar and /bootstrap as the first entries in the User
              classpath.


              • 19. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                 

                "pete.muir@jboss.org" wrote:
                In Seam 1.2 and earlier we used Embedded EJB3, now we use Embedded JBoss, two different projects.


                Clearly!


                These are the instructions that I wrote for using the Eclipse TestNG plugin which you may find useful:


                Hopefully - thanks. :-|


                • 20. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                  Pete,

                  Do you know what's up with vfsfile as a protocol in JBoss Embedded?

                  ERROR [org.jboss.embedded.DeploymentScanner] Failed to deploy
                  org.jboss.deployers.spi.DeploymentException: Unable to find deployDir from url: file:/c:/work/BusinessIntelligence/InfoStratGui/app/target/test-clas
                  ses/deployers/
                   at org.jboss.embedded.DeploymentGroup.getDeployerDirUrls(DeploymentGroup.java:536)
                   at org.jboss.embedded.DeploymentGroup.getDeployerDirUrlsFromResource(DeploymentGroup.java:522)
                   at org.jboss.embedded.DeploymentGroup.addDirectoryByResource(DeploymentGroup.java:470)
                   at org.jboss.embedded.DeploymentScanner.start(DeploymentScanner.java:99)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
                   at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
                   at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
                   at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:145)
                   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
                   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
                   at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                   at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
                   at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
                   at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
                   at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
                   at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
                   at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
                   at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:150)
                   at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:162)
                   at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
                   at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
                   at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
                   at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
                   at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
                   at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
                   at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
                   at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
                   at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                   at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
                   at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
                   at org.testng.TestRunner.runWorkers(TestRunner.java:673)
                   at org.testng.TestRunner.privateRun(TestRunner.java:620)
                   at org.testng.TestRunner.run(TestRunner.java:480)
                   at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
                   at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
                   at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
                   at org.testng.SuiteRunner.run(SuiteRunner.java:168)
                   at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
                   at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
                   at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
                   at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
                   at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
                   at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
                  Caused by: java.net.MalformedURLException: unknown protocol: vfsfile
                   at java.net.URL.<init>(URL.java:574)
                   at java.net.URL.<init>(URL.java:464)
                   at java.net.URL.<init>(URL.java:413)
                   at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:75)
                   at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:89)
                   at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:253)
                   at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:186)
                   at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:150)
                   at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:124)
                   at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:113)
                   at org.jboss.virtual.plugins.context.file.FileSystemContextFactory.getVFS(FileSystemContextFactory.java:54)
                   at org.jboss.virtual.VFS.getVFS(VFS.java:132)
                   at org.jboss.virtual.VFS.getRoot(VFS.java:146)
                   at org.jboss.embedded.DeploymentGroup.getDeployerDirUrls(DeploymentGroup.java:532)
                   ... 62 more
                  


                  the directory "C:\work\BusinessIntelligence\InfoStratGui\app\target\test-classes" does indeed exist on my system (it's created by maven for the mvn test command - resources are copied there as well).

                  Thanks,
                  Brad

                  • 21. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
                    pmuir

                    Can you post the complete classpath you are using for running tests? I've seen something like this before.

                    • 22. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                       

                      [DEBUG] Test Classpath :
                      [DEBUG] c:\work\BusinessIntelligence\InfoStratGui\app\target\classes
                      [DEBUG] c:\work\BusinessIntelligence\InfoStratGui\app\target\test-classes
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\faces\jsf-impl\1.2_04\jsf-impl-1.2_04.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\transaction\jta\1.0.1B\jta-1.0.1B.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\servlet\el-api\2.1wFacelets1.1.4\el-api-2.1wFacelets1.1.4.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\persistence\ejb3-persistence\1.0\ejb3-persistence-1.0.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\jboss-embedded-all\2.0.0.CR3\jboss-embedded-all-2.0.0.CR3.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\jboss-ejb3x\4.0.4.EJB3.RC8\jboss-ejb3x-4.0.4.EJB3.RC8.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\jboss-embedded-api\2.0.0.CR3\jboss-embedded-api-2.0.0.CR3.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\jconnect\jconnect\6.0\jconnect-6.0.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\testng\testng\5.5\testng-5.5-jdk15.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\jboss-el\2.0.0.CR3\jboss-el-2.0.0.CR3.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\hibernate-all\2.0.0.CR3\hibernate-all-2.0.0.CR3.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\jboss-seam\2.0.0.CR3\jboss-seam-2.0.0.CR3.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\hibernate\hibernate-annotations\3.3.0.GA\hibernate-annotations-3.3.0.GA.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\servlet\el-ri\2.1wFacelets1.1.4\el-ri-2.1wFacelets1.1.4.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\com\evergreen\architecture\evg-jaas-components\1.0\evg-jaas-components-1.0.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\javax\faces\jsf-api\1.2_04\jsf-api-1.2_04.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\hibernate\hibernate-validator\3.0.0.GA\hibernate-validator-3.0.0.GA.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\thirdparty-all\2.0.0.CR3\thirdparty-all-2.0.0.CR3.jar
                      [DEBUG] C:\Documents and Settings\a428302\.m2\repository\org\jboss\seam\jboss-deployers\2.0.0.CR3\jboss-deployers-2.0.0.CR3.jar
                      [DEBUG] Setting system property [localRepository]=[C:\Documents and Settings\a428302\.m2\repository]
                      [DEBUG] Setting system property [basedir]=[c:\work\BusinessIntelligence\InfoStratGui\app]
                      


                      classes - my compiled application classes, EJB's, entities, JPA, etc.
                      test-classes - the test classes and the entire directory tree from the bootstrap directory in the Seam 2.0.0.CR3 and a /META-INF/components.xml. Seam is starting but the embedded container is having trouble here.

                      It seems like all the "ResourcesToDeploy3" blocks in bootstrap-beans.xml are failing - each one results in a message like this:

                      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=ResourcesToDeploy3 state=Create
                      org.jboss.deployers.spi.DeploymentException: Unable to find deployDir from url: file:/c:/work/BusinessIntelligence/InfoStratGui/app/target/test-clas
                      ses/deploy/
                       at org.jboss.embedded.DeploymentGroup.getDeployerDirUrls(DeploymentGroup.java:536)
                       at org.jboss.embedded.DeploymentGroup.getDeployerDirUrlsFromResource(DeploymentGroup.java:522)
                       at org.jboss.embedded.DeploymentGroup.addDirectoryByResource(DeploymentGroup.java:470)
                       at org.jboss.embedded.DeploymentScanner.start(DeploymentScanner.java:99)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:585)
                       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
                       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
                       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
                       at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:145)
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
                       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
                       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
                       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
                       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
                       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
                       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
                       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
                       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
                       at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
                       at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:150)
                       at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:162)
                       at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
                       at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
                       at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
                       at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
                       at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
                       at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:585)
                       at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
                       at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
                       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
                       at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                       at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
                       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
                       at org.testng.TestRunner.runWorkers(TestRunner.java:673)
                       at org.testng.TestRunner.privateRun(TestRunner.java:620)
                       at org.testng.TestRunner.run(TestRunner.java:480)
                       at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
                       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
                       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
                       at org.testng.SuiteRunner.run(SuiteRunner.java:168)
                       at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
                       at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
                       at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
                       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
                       at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
                       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                       at java.lang.reflect.Method.invoke(Method.java:585)
                       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
                       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
                      Caused by: java.net.MalformedURLException: unknown protocol: vfsfile
                       at java.net.URL.<init>(URL.java:574)
                       at java.net.URL.<init>(URL.java:464)
                       at java.net.URL.<init>(URL.java:413)
                       at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:75)
                       at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:89)
                       at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:253)
                       at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:186)
                       at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:150)
                       at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:124)
                       at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:113)
                       at org.jboss.virtual.plugins.context.file.FileSystemContextFactory.getVFS(FileSystemContextFactory.java:54)
                       at org.jboss.virtual.VFS.getVFS(VFS.java:132)
                       at org.jboss.virtual.VFS.getRoot(VFS.java:146)
                       at org.jboss.embedded.DeploymentGroup.getDeployerDirUrls(DeploymentGroup.java:532)
                       ... 62 more
                      


                      Thanks,
                      Brad

                      • 23. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                        Pete,

                        I have this figured out now. No need to investigate any further.

                        Thanks,
                        Brad

                        • 24. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
                          pmuir

                          What was wrong?

                          • 25. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                            I don't believe wrong is the correct term to describe the situation, rather, from your (Seam team) perspective, you provide examples that are based on 'things' being in places in the Seam 2.0.0.CR(X) distribution. Thus, jars like "jboss-embedded-all.jar" are not truly all. I say that because I had to discover (the hard way) that I needed to add jboss-embedded-api.jar and jboss-deployers.jar to my repo and test-scoped dependencies to my pom.xml. No, this is not in the Seam 2.0.0.CR3 docs - I double checked. I'm guessing your ant scripts build up classpaths using the lib and the lib/test directories in the distro and so it's easy to miss this kind of thing. I also just discovered that I need to add hibernate-commons-annotations.jar to my test-scoped dependencies, and thus, again, hibernate-all.jar is not truly all. It would be nice if the 'all' jars were truly 'all'. ;-)

                            I also needed to learn the jboss embedded container layout a bit; this is so that I could put appropriate maven2 testResource instructions into my pom(s) and reproduce the bootstrap directory layout. And... I needed to figure out that I need to copy my target/classes contents to the bootstrap deploy dir (I haven't figured out how to get the bootstrap to treat target/classes as part of the classpath). I'm close now.

                            Thanks,
                            Brad

                            • 26. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                              ok, now I have this to figure out:

                              On=null whenRequired=Described resolved=false demand=persistence.units:jar=classes.jar,unitName=InfoStratGui} **
                              persistence.units:jar=classes.jar,unitName=InfoStratGui -> java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getReflectionManag
                              er()Lorg/hibernate/reflection/ReflectionManager;
                              
                               at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.java:151)
                               at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
                               at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:307)
                               at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:14)
                               at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
                               at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
                               at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                              


                              • 27. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                                I see that if hibernate-annotations 3.3.0 is in the classpath, I get the last error, now I am up to this:

                                *** CONTEXTS IN ERROR: Name -> Error
                                <UNKNOWN> -> ** UNRESOLVED AbstractDemandMetaData$DemandDependencyItem@1f2b0dd{name=jboss.j2ee:jar=classes,name=RatingsHelperBean,service=EJB3 depen
                                dsOn=null whenRequired=Described resolved=false demand=persistence.units:jar=classes.jar,unitName=InfoStratGui} **
                                persistence.units:jar=classes.jar,unitName=InfoStratGui -> java.lang.SecurityException: Invalid authentication attempt, principal=null
                                
                                 at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.java:151)
                                 at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
                                 at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:307)
                                 at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:14)
                                 at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
                                 at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
                                 at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                 at java.lang.reflect.Method.invoke(Method.java:585)
                                 at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
                                 at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
                                 at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
                                 at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                                 at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
                                 at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
                                 at org.testng.TestRunner.runWorkers(TestRunner.java:673)
                                 at org.testng.TestRunner.privateRun(TestRunner.java:620)
                                 at org.testng.TestRunner.run(TestRunner.java:480)
                                 at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
                                 at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
                                 at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
                                 at org.testng.SuiteRunner.run(SuiteRunner.java:168)
                                 at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
                                 at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
                                 at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
                                 at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
                                 at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                 at java.lang.reflect.Method.invoke(Method.java:585)
                                 at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
                                 at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
                                


                                How do I turn off the security stuff for testing?

                                Thanks,
                                Brad

                                • 28. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                                  It looks like when the local-jdbc connection pool manager is trying to connect to the DB, it's running into issues:

                                  13:43:18,374 DEBUG org.jboss.ejb3.entity.PersistenceUnitDeployment.(start:187) - Found persistence.xml file in EJB3 jar
                                  13:43:20,156 WARN org.jboss.resource.connectionmanager.JBossManagedConnectionPool.(getConnection:278) - Throwable while attempting to get a new con
                                  nection: null
                                  org.jboss.resource.JBossResourceException: No matching credentials in Subject!
                                   at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:472)
                                  
                                   at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:158)
                                   at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:586)
                                   at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:254)
                                   at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:580)
                                   at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
                                   at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:351)
                                   at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:394)
                                   at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
                                   at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                                   at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
                                   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
                                   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
                                   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
                                   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
                                   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
                                   at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
                                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                   at java.lang.reflect.Method.invoke(Method.java:585)
                                   at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
                                   at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
                                   at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                                   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
                                   at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:145)
                                   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
                                   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
                                   at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                                   at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
                                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
                                   at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
                                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
                                   at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
                                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
                                   at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
                                   at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:84)
                                   at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:78)
                                   at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:141)
                                   at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:519)
                                   at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:324)
                                   at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:54)
                                   at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
                                   at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:170)
                                   at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:592)
                                   at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:476)
                                   at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:406)
                                   at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
                                   at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:307)
                                   at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:14)
                                   at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
                                   at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
                                   at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                   at java.lang.reflect.Method.invoke(Method.java:585)
                                   at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
                                   at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
                                   at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
                                   at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                                   at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
                                   at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
                                   at org.testng.TestRunner.runWorkers(TestRunner.java:673)
                                   at org.testng.TestRunner.privateRun(TestRunner.java:620)
                                   at org.testng.TestRunner.run(TestRunner.java:480)
                                   at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
                                   at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
                                   at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
                                   at org.testng.SuiteRunner.run(SuiteRunner.java:168)
                                   at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
                                   at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
                                   at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
                                   at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
                                   at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
                                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                   at java.lang.reflect.Method.invoke(Method.java:585)
                                   at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
                                   at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
                                  


                                  • 29. Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?

                                    hopefully this is the last question I have on the jboss embedded container.

                                    I'm currently having trouble on boot - it says here:

                                    init(com.wachovia.evergreen.apps.infostrat.BootStrapTest) Time elapsed: 0 sec <<< FAILURE!
                                    java.lang.RuntimeException: Could not create Component: commercialPaperHelper
                                     at org.jboss.seam.init.Initialization.addComponent(Initialization.java:976)
                                     at org.jboss.seam.init.Initialization.installComponents(Initialization.java:903)
                                     at org.jboss.seam.init.Initialization.init(Initialization.java:548)
                                     at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:939)
                                     at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                     at java.lang.reflect.Method.invoke(Method.java:585)
                                     at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
                                     at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
                                     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
                                     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
                                     at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
                                     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
                                     at org.testng.TestRunner.runWorkers(TestRunner.java:673)
                                     at org.testng.TestRunner.privateRun(TestRunner.java:620)
                                     at org.testng.TestRunner.run(TestRunner.java:480)
                                     at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
                                     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
                                     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
                                     at org.testng.SuiteRunner.run(SuiteRunner.java:168)
                                     at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
                                     at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
                                     at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
                                     at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
                                     at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                     at java.lang.reflect.Method.invoke(Method.java:585)
                                     at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
                                     at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
                                    Caused by: java.lang.IllegalArgumentException: You must specify org.jboss.seam.core.init.jndiPattern or use @JndiName: commercialPaperHelper
                                     at org.jboss.seam.Component.getJndiName(Component.java:437)
                                     at org.jboss.seam.Component.<init>(Component.java:242)
                                     at org.jboss.seam.Component.<init>(Component.java:216)
                                     at org.jboss.seam.init.Initialization.addComponent(Initialization.java:961)
                                     ... 32 more
                                    


                                    I've examined the server log and it's not clear to me where in the JNDI tree the server is deploying the EJB's. My components.xml has the following core:init tag:

                                    <core:init debug="true" jndi-pattern="#{ejbName}/local"/>
                                    


                                    In my Seam 1.2.1 app, which uses the (old?) jboss microcontainer, my core:init tag is identical:

                                    <core:init jndi-pattern="#{ejbName}/local" debug="true"/>
                                    


                                    and that has and does work fine. Since I can't easily see what's going on with JBoss naming (org.jboss.naming) even with DEBUG level logging on, I'm not sure what the pattern is. Does anyone know?

                                    Thanks,
                                    Brad
                                    <core:init jndi-pattern="#{ejbName}/local" debug="true"/>