1 Reply Latest reply on Mar 3, 2009 1:33 AM by schmurgon

    Run Seam Tests from IntelliJ with TestNG plugin

    schmurgon
      Has anyone managed to run the booking example tests from within IntelliJ IDEA 8.x using the TestNG plugin?  I've tried averything I can think of with no success.  I can run the ant test task from the Ant plugin and I've ensured that the tests work correctly.

      Environment
      = IntelliJ IDEA 8.1(with latest TestNG plugin)
      = JDK 1.6.0_11
      = Seam 2.1.1.GA
      = Windows XP (or OSX 10.5.6 both have the same issue)

      I have a project library which contains the entire contents of the seam/lib directory with the exception of the jboss-system.jar.  It is a dependency of the booking module.

      In the TestNG run/debug configuration:

      VM Params
      "-Dsun.lang.ClassLoader.allowArraySyntax true -Xbootclasspath/p:{seampath}/bootstrap;{seampath}/lib/test/*;"

      Working Directory
      "{seampath}/examples/booking/test-build"

      Before Launch Section

      Make
      (selected)

      Run Ant Target test (from the build.xml file in the examples/booking folder.  I have removed the \\<testng\\> task from the test target since this should be performed by the plugin)

      Exception:
      java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
          at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
          at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
          at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
          at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:120)
          at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
          at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:123)
          at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:70)
          at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
          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)
          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:597)
          at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
          at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:416)
          at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
          at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
          at org.testng.SuiteRunner.privateRun(SuiteRunner.java:284)
          at org.testng.SuiteRunner.run(SuiteRunner.java:204)
          at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:864)
          at org.testng.TestNG.runSuitesLocally(TestNG.java:830)
          at org.testng.TestNG.run(TestNG.java:748)
          at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
          at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
      Caused by: java.lang.NullPointerException
          at org.jboss.config.plugins.property.PropertyConfiguration.loadFromProperties(PropertyConfiguration.java:126)
          at org.jboss.config.plugins.property.PropertyConfiguration.createDefaultClassAdapterFactory(PropertyConfiguration.java:86)
          at org.jboss.config.plugins.AbstractConfiguration.getClassAdapterFactory(AbstractConfiguration.java:215)
          at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:70)
          at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:55)
          at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:157)
          at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:118)
          at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
          ... 25 more


        • 1. Re: Run Seam Tests from IntelliJ with TestNG plugin
          schmurgon
          output window displays the following (classpath e.t.c).  I've shortened the full path of each of the libs to "seam" for brevity


          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -ea -Dsun.lang.ClassLoader.allowArraySyntax=true -Xbootclasspath/p:
          {seam}/bootstrap:
          {seam}/lib/test/hibernate-all.jar:
          {seam}/lib/test/jboss-embedded-all.jar:
          {seam}/lib/test/thirdparty-all.jar

          -Dfile.encoding=MacRoman
          -classpath
          /Applications/IntelliJ IDEA 8.1.app/plugins/testng/lib/testng-jdk15.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/deploy.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/dt.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/javaws.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/jce.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/management-agent.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/plugin.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/sa-jdi.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/charsets.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/classes.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/dt.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/jce.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/jconsole.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/jsse.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/laf.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/management-agent.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/../Classes/ui.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/ext/apple_provider.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/ext/dnsns.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/ext/localedata.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/ext/sunjce_provider.jar:
          /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/ext/sunpkcs11.jar:
          {seam}/examples/booking/out/test/Booking:
          {seam}/examples/booking/out/production/Booking:
          /Applications/IntelliJ IDEA 8.1.app/lib/javaee.jar:
          {seam}/lib/jboss-seam-mail.jar:
          {seam}/lib/el-api.jar:
          {seam}/lib/wicket-datetime.jar:
          {seam}/lib/richfaces-ui.jar:
          {seam}/lib/htmlparser.jar:
          {seam}/lib/jboss-logging-spi.jar:
          {seam}/lib/ejb-api.jar:
          {seam}/lib/gwt-servlet.jar:
          {seam}/lib/saaj-api.jar:
          {seam}/lib/jboss-seam.jar:
          {seam}/lib/meldware-mailjmx.jar:
          {seam}/lib/ehcache.jar:
          {seam}/lib/core.jar:
          {seam}/lib/itext.jar:
          {seam}/lib/jboss-jmx.jar:
          {seam}/lib/drools-core.jar:
          {seam}/lib/slf4j-api.jar:
          {seam}/lib/portlet-api.jar:
          {seam}/lib/hibernate-validator.jar:
          {seam}/lib/jaxrs-api.jar:
          {seam}/lib/janino.jar:
          {seam}/lib/jfreechart.jar:
          {seam}/lib/lucene-core.jar:
          {seam}/lib/groovy-all.jar:
          {seam}/lib/jboss-common-core.jar:
          {seam}/lib/jms.jar:
          {seam}/lib/wicket-extensions.jar:
          {seam}/lib/jsf-api.jar:
          {seam}/lib/jboss-seam-wicket-ant.jar:
          {seam}/lib/urlrewritefilter.jar:
          {seam}/lib/mvel14.jar:
          {seam}/lib/openid4java.jar:
          {seam}/lib/commons-lang.jar:
          {seam}/lib/slf4j-log4j12.jar:
          {seam}/lib/hibernate-annotations.jar:
          {seam}/lib/commons-digester.jar:
          {seam}/lib/jboss-deployers-client-spi.jar:
          {seam}/lib/openxri-client.jar:
          {seam}/lib/jbosscache-core.jar:
          {seam}/lib/asm.jar:
          {seam}/lib/quartz.jar:
          {seam}/lib/richfaces-api.jar:
          {seam}/lib/log4j.jar:
          {seam}/lib/jsp-api.jar:
          {seam}/lib/meldware-mailapi.jar:
          {seam}/lib/yarfraw.jar:
          {seam}/lib/jboss-seam-jul.jar:
          {seam}/lib/jcommon.jar:
          {seam}/lib/servlet-api.jar:
          {seam}/lib/jboss-seam-debug.jar:
          {seam}/lib/itext-rtf.jar:
          {seam}/lib/jboss-seam-ioc.jar:
          {seam}/lib/javassist.jar:
          {seam}/lib/jboss-seam-remoting.jar:
          {seam}/lib/jboss-seam-resteasy.jar:
          {seam}/lib/antlr-runtime.jar:
          {seam}/lib/commons-beanutils.jar:
          {seam}/lib/cglib-nodep.jar:
          {seam}/lib/commons-httpclient.jar:
          {seam}/lib/cglib.jar:
          {seam}/lib/jboss-el.jar:
          {seam}/lib/joda-time.jar:
          {seam}/lib/concurrent.jar:
          {seam}/lib/jbpm-jpdl.jar:
          {seam}/lib/hibernate-commons-annotations.jar:
          {seam}/lib/jboss-seam-wicket.jar:
          {seam}/lib/wicket-ioc.jar:
          {seam}/lib/hsqldb.jar:
          {seam}/lib/hibernate.jar:
          {seam}/lib/hibernate-search.jar:
          {seam}/lib/jboss-seam-excel.jar:
          {seam}/lib/antlr.jar:
          {seam}/lib/spring.jar:
          {seam}/lib/jgroups.jar:
          {seam}/lib/jsr250-api.jar:
          {seam}/lib/jta.jar:
          {seam}/lib/commons-logging.jar:
          {seam}/lib/jsf-facelets.jar:
          {seam}/lib/stax-api.jar:
          {seam}/lib/asm-attrs.jar:
          {seam}/lib/jboss-seam-rss.jar:
          {seam}/lib/drools-compiler.jar:
          {seam}/lib/jaxws-api.jar:
          {seam}/lib/persistence-api.jar:
          {seam}/lib/richfaces-impl.jar:
          {seam}/lib/jboss-seam-pdf.jar:
          {seam}/lib/jxl.jar:
          {seam}/lib/jaxb-api.jar:
          {seam}/lib/bsh.jar:
          {seam}/lib/dbunit.jar:
          {seam}/lib/commons-collections.jar:
          {seam}/lib/mail.jar:
          {seam}/lib/resteasy-jaxrs.jar:
          {seam}/lib/jboss-embedded-api.jar:
          {seam}/lib/jsf-impl.jar:
          {seam}/lib/hibernate-entitymanager.jar:
          {seam}/lib/jboss-cache.jar:
          {seam}/lib/jsr181-api.jar:
          {seam}/lib/ant-antlr.jar:
          {seam}/lib/jboss-seam-ui.jar:
          {seam}/lib/openxri-syntax.jar:
          {seam}/lib/jboss-deployers-core-spi.jar:
          {seam}/lib/wicket.jar:
          {seam}/lib/commons-io.jar:
          {seam}/lib/dom4j.jar:
          /Applications/IntelliJ IDEA 8.1.app/lib/idea_rt.jar org.testng.remote.RemoteTestNG -port 5000 -sourcedir {seam}/examples/booking/src /Users/Ben/Library/Caches/IntelliJIDEA8x/temp-testng-customsuite.xml